Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Unified Diff: ios/chrome/browser/web/navigation_egtest.mm

Issue 2635553003: Fix testHistoryForwardNavigation. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/web/navigation_egtest.mm
diff --git a/ios/chrome/browser/web/navigation_egtest.mm b/ios/chrome/browser/web/navigation_egtest.mm
index 702193e4269861bd5c2fbc087c4a03db8faeafeb..739f3f93a82abb9ed0a9ceb96329b997a5858214 100644
--- a/ios/chrome/browser/web/navigation_egtest.mm
+++ b/ios/chrome/browser/web/navigation_egtest.mm
@@ -58,6 +58,7 @@
const char kBackHTMLButtonLabel[] = "BackHTMLButton";
const char kForwardHTMLButtonLabel[] = "ForwardHTMLButton";
const char kForwardHTMLSentinel[] = "Forward page loaded";
+const char kTestPageSentinel[] = "Test Page";
const char kBackURL[] = "http://back";
const char kForwardURL[] = "http://forward";
const char kTestURL[] = "http://test";
@@ -378,11 +379,6 @@ - (void)testHistoryBackNavigation {
// Tests going back via back button then forward via history.forward().
- (void)testHistoryForwardNavigation {
-// TODO(crbug.com/677129): Reenable this test.
-#if TARGET_OS_IPHONE
- EARL_GREY_TEST_SKIPPED(@"flaky on devices");
-#endif // TARGET_OS_IPHONE
-
SetupBackAndForwardResponseProvider();
// Navigate to an HTML page with a forward button.
@@ -396,15 +392,17 @@ - (void)testHistoryForwardNavigation {
// Tap the back button in the toolbar and verify the page with forward button
// is loaded.
[[EarlGrey selectElementWithMatcher:backButton()] performAction:grey_tap()];
- [[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText(
- firstURL.GetContent())]
- assertWithMatcher:grey_notNil()];
[[EarlGrey
selectElementWithMatcher:webViewContainingText(kForwardHTMLSentinel)]
assertWithMatcher:grey_notNil()];
+ [[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText(
+ firstURL.GetContent())]
+ assertWithMatcher:grey_notNil()];
// Tap the forward button in the HTML and verify the second URL is loaded.
TapWebViewElementWithId(kForwardHTMLButtonLabel);
+ [[EarlGrey selectElementWithMatcher:webViewContainingText(kTestPageSentinel)]
+ assertWithMatcher:grey_notNil()];
[[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText(
secondURL.GetContent())]
assertWithMatcher:grey_notNil()];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698