OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import <XCTest/XCTest.h> | 5 #import <XCTest/XCTest.h> |
6 | 6 |
7 #include "base/ios/ios_util.h" | 7 #include "base/ios/ios_util.h" |
8 #include "components/strings/grit/components_strings.h" | 8 #include "components/strings/grit/components_strings.h" |
9 #include "ios/chrome/test/app/web_view_interaction_test_util.h" | 9 #include "ios/chrome/test/app/web_view_interaction_test_util.h" |
10 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 10 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 // Tap the forward button in the toolbar and verify the second URL is loaded. | 371 // Tap the forward button in the toolbar and verify the second URL is loaded. |
372 [[EarlGrey selectElementWithMatcher:forwardButton()] | 372 [[EarlGrey selectElementWithMatcher:forwardButton()] |
373 performAction:grey_tap()]; | 373 performAction:grey_tap()]; |
374 [[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText( | 374 [[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText( |
375 secondURL.GetContent())] | 375 secondURL.GetContent())] |
376 assertWithMatcher:grey_notNil()]; | 376 assertWithMatcher:grey_notNil()]; |
377 } | 377 } |
378 | 378 |
379 // Tests going back via back button then forward via history.forward(). | 379 // Tests going back via back button then forward via history.forward(). |
380 - (void)testHistoryForwardNavigation { | 380 - (void)testHistoryForwardNavigation { |
| 381 // TODO(crbug.com/677129): Reenable this test. |
| 382 #if TARGET_OS_IPHONE |
| 383 EARL_GREY_TEST_SKIPPED(@"flaky on devices"); |
| 384 #endif // TARGET_OS_IPHONE |
| 385 |
381 SetupBackAndForwardResponseProvider(); | 386 SetupBackAndForwardResponseProvider(); |
382 | 387 |
383 // Navigate to an HTML page with a forward button. | 388 // Navigate to an HTML page with a forward button. |
384 const GURL firstURL = web::test::HttpServer::MakeUrl(kForwardURL); | 389 const GURL firstURL = web::test::HttpServer::MakeUrl(kForwardURL); |
385 [ChromeEarlGrey loadURL:firstURL]; | 390 [ChromeEarlGrey loadURL:firstURL]; |
386 | 391 |
387 // Navigate to some other page. | 392 // Navigate to some other page. |
388 const GURL secondURL = web::test::HttpServer::MakeUrl(kTestURL); | 393 const GURL secondURL = web::test::HttpServer::MakeUrl(kTestURL); |
389 [ChromeEarlGrey loadURL:secondURL]; | 394 [ChromeEarlGrey loadURL:secondURL]; |
390 | 395 |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 // Navigate forward and assert the the resulting page is the proper | 688 // Navigate forward and assert the the resulting page is the proper |
684 // destination. | 689 // destination. |
685 [[EarlGrey selectElementWithMatcher:forwardButton()] | 690 [[EarlGrey selectElementWithMatcher:forwardButton()] |
686 performAction:grey_tap()]; | 691 performAction:grey_tap()]; |
687 [[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText( | 692 [[EarlGrey selectElementWithMatcher:chrome_test_util::omniboxText( |
688 destinationURL.GetContent())] | 693 destinationURL.GetContent())] |
689 assertWithMatcher:grey_notNil()]; | 694 assertWithMatcher:grey_notNil()]; |
690 } | 695 } |
691 | 696 |
692 @end | 697 @end |
OLD | NEW |