Commit 0bbfe5f3 authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Fix flakyness on OmniboxPopup test

This CL makes sure that the Switch to Tab element is present before
closing the tab in the testSwitchToClosedTab test.
It might reduce flakyness as it is possible that the tab is closed
before the suggestion is displayed. If it is the case then the
suggestion appears as if no tab with this URL is opened, making the
test fails.

Bug: 936085
Change-Id: Ief59c0436677d02c915d65543d93f1c081ab83bd
Reviewed-on: https://chromium-review.googlesource.com/c/1491613
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636733}
parent d32329ef
...@@ -299,6 +299,10 @@ std::unique_ptr<net::test_server::HttpResponse> StandardResponse( ...@@ -299,6 +299,10 @@ std::unique_ptr<net::test_server::HttpResponse> StandardResponse(
// Start typing url of the first page. // Start typing url of the first page.
[ChromeEarlGreyUI focusOmniboxAndType:base::SysUTF8ToNSString(kPage1URL)]; [ChromeEarlGreyUI focusOmniboxAndType:base::SysUTF8ToNSString(kPage1URL)];
// Make sure that the "Switch to Open Tab" element is visible.
[[EarlGrey selectElementWithMatcher:SwitchTabElementForUrl(URL1)]
assertWithMatcher:grey_sufficientlyVisible()];
// Close the first page. // Close the first page.
chrome_test_util::CloseTabAtIndex(0); chrome_test_util::CloseTabAtIndex(0);
[ChromeEarlGrey waitForMainTabCount:1]; [ChromeEarlGrey waitForMainTabCount:1];
......
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