Commit 3fef6172 authored by Eugene But's avatar Eugene But Committed by Commit Bot

[ios] Fix and reenable testChildTabOrdering EG test

The fix was copied from context_menu_egtest.mm which is to add a matcher
for context menu button.

Bug: 1106739
Change-Id: I1e89c3ccbc081aa0ff254a0a8bef535ed02054a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2304963
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Auto-Submit: Eugene But <eugenebut@chromium.org>
Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790046}
parent c455cd88
...@@ -47,8 +47,7 @@ const char kLinksTestURL2Text[] = "arrived"; ...@@ -47,8 +47,7 @@ const char kLinksTestURL2Text[] = "arrived";
@implementation TabOrderTestCase @implementation TabOrderTestCase
// Tests that new tabs are always inserted after their parent tab. // Tests that new tabs are always inserted after their parent tab.
// TODO(crbug.com/1106739): reenable this test. - (void)testChildTabOrdering {
- (void)DISABLED_testChildTabOrdering {
GREYAssertTrue(self.testServer->Start(), @"Test server failed to start."); GREYAssertTrue(self.testServer->Start(), @"Test server failed to start.");
const GURL URL1 = self.testServer->GetURL(kLinksTestURL1); const GURL URL1 = self.testServer->GetURL(kLinksTestURL1);
...@@ -61,6 +60,8 @@ const char kLinksTestURL2Text[] = "arrived"; ...@@ -61,6 +60,8 @@ const char kLinksTestURL2Text[] = "arrived";
performAction:chrome_test_util::LongPressElementForContextMenu( performAction:chrome_test_util::LongPressElementForContextMenu(
[ElementSelector selectorWithElementID:kLinkSelectorID], [ElementSelector selectorWithElementID:kLinkSelectorID],
true /* menu should appear */)]; true /* menu should appear */)];
[[EarlGrey selectElementWithMatcher:OpenLinkInNewTabButton()]
assertWithMatcher:grey_notNil()];
[[EarlGrey selectElementWithMatcher:OpenLinkInNewTabButton()] [[EarlGrey selectElementWithMatcher:OpenLinkInNewTabButton()]
performAction:grey_tap()]; performAction:grey_tap()];
[ChromeEarlGrey waitForMainTabCount:2U]; [ChromeEarlGrey waitForMainTabCount:2U];
......
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