Commit c5459e48 authored by Sebastien Lalancette's avatar Sebastien Lalancette Committed by Commit Bot

[iOS] Remove Drag-Drop EG Test Hook

The current EarlGrey version has the fix for the original issue. The
test hook is no longer required.

Bug: 1129058
Change-Id: Idf287df68d149c57f26b3e01e2936dc210acec82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2544806Reviewed-by: default avataredchin <edchin@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Sebastien Lalancette <seblalancette@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828890}
parent 932a8b0e
...@@ -31,9 +31,6 @@ bool DisableUpdateService() { ...@@ -31,9 +31,6 @@ bool DisableUpdateService() {
bool DisableMainThreadFreezeDetection() { bool DisableMainThreadFreezeDetection() {
return false; return false;
} }
bool DisableTableDragAndDrop() {
return false;
}
policy::ConfigurationPolicyProvider* GetOverriddenPlatformPolicyProvider() { policy::ConfigurationPolicyProvider* GetOverriddenPlatformPolicyProvider() {
return nullptr; return nullptr;
} }
......
...@@ -41,12 +41,6 @@ bool DisableUpdateService(); ...@@ -41,12 +41,6 @@ bool DisableUpdateService();
// Return true if it should be disabled. // Return true if it should be disabled.
bool DisableMainThreadFreezeDetection(); bool DisableMainThreadFreezeDetection();
// Returns true if drag-and-drop should be disabled in native table views (e.g.
// Bookmarks, History).
// TODO(crbug.com/1129058): Clean this up when EarlGrey allows interacting with
// context menus that can be dragged.
bool DisableTableDragAndDrop();
// Returns a policy provider that should be installed as the platform policy // Returns a policy provider that should be installed as the platform policy
// provider when testing. May return nullptr. // provider when testing. May return nullptr.
policy::ConfigurationPolicyProvider* GetOverriddenPlatformPolicyProvider(); policy::ConfigurationPolicyProvider* GetOverriddenPlatformPolicyProvider();
......
...@@ -496,8 +496,7 @@ std::vector<GURL> GetUrlsToOpen(const std::vector<const BookmarkNode*>& nodes) { ...@@ -496,8 +496,7 @@ std::vector<GURL> GetUrlsToOpen(const std::vector<const BookmarkNode*>& nodes) {
self.dragDropHandler.dropDelegate = self; self.dragDropHandler.dropDelegate = self;
self.tableView.dragDelegate = self.dragDropHandler; self.tableView.dragDelegate = self.dragDropHandler;
self.tableView.dropDelegate = self.dragDropHandler; self.tableView.dropDelegate = self.dragDropHandler;
self.tableView.dragInteractionEnabled = self.tableView.dragInteractionEnabled = true;
!tests_hook::DisableTableDragAndDrop();
} }
// Configure the table view. // Configure the table view.
......
...@@ -199,8 +199,7 @@ const CGFloat kButtonHorizontalPadding = 30.0; ...@@ -199,8 +199,7 @@ const CGFloat kButtonHorizontalPadding = 30.0;
self.dragDropHandler.origin = WindowActivityHistoryOrigin; self.dragDropHandler.origin = WindowActivityHistoryOrigin;
self.dragDropHandler.dragDataSource = self; self.dragDropHandler.dragDataSource = self;
self.tableView.dragDelegate = self.dragDropHandler; self.tableView.dragDelegate = self.dragDropHandler;
self.tableView.dragInteractionEnabled = self.tableView.dragInteractionEnabled = true;
!tests_hook::DisableTableDragAndDrop();
} }
// NavigationController configuration. // NavigationController configuration.
......
...@@ -231,8 +231,7 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts( ...@@ -231,8 +231,7 @@ ReadingListSelectionState GetSelectionStateForSelectedCounts(
self.dragDropHandler.origin = WindowActivityReadingListOrigin; self.dragDropHandler.origin = WindowActivityReadingListOrigin;
self.dragDropHandler.dragDataSource = self; self.dragDropHandler.dragDataSource = self;
self.tableView.dragDelegate = self.dragDropHandler; self.tableView.dragDelegate = self.dragDropHandler;
self.tableView.dragInteractionEnabled = self.tableView.dragInteractionEnabled = true;
!tests_hook::DisableTableDragAndDrop();
} }
} }
......
...@@ -183,11 +183,7 @@ API_AVAILABLE(ios(13.0)) ...@@ -183,11 +183,7 @@ API_AVAILABLE(ios(13.0))
self.dragDropHandler.origin = WindowActivityRecentTabsOrigin; self.dragDropHandler.origin = WindowActivityRecentTabsOrigin;
self.dragDropHandler.dragDataSource = self; self.dragDropHandler.dragDataSource = self;
self.tableView.dragDelegate = self.dragDropHandler; self.tableView.dragDelegate = self.dragDropHandler;
self.tableView.dragInteractionEnabled = true;
// TODO(crbug.com/1129058): Clean this up when EarlGrey allows interacting
// with context menus that can be dragged.
self.tableView.dragInteractionEnabled =
!tests_hook::DisableTableDragAndDrop();
} }
} }
......
...@@ -42,10 +42,6 @@ bool DisableMainThreadFreezeDetection() { ...@@ -42,10 +42,6 @@ bool DisableMainThreadFreezeDetection() {
return true; return true;
} }
bool DisableTableDragAndDrop() {
return true;
}
policy::ConfigurationPolicyProvider* GetOverriddenPlatformPolicyProvider() { policy::ConfigurationPolicyProvider* GetOverriddenPlatformPolicyProvider() {
if (base::CommandLine::ForCurrentProcess()->HasSwitch( if (base::CommandLine::ForCurrentProcess()->HasSwitch(
"com.apple.configuration.managed")) { "com.apple.configuration.managed")) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment