Index: ios/web/shell/test/page_state_egtest.mm |
diff --git a/ios/web/shell/test/page_state_egtest.mm b/ios/web/shell/test/page_state_egtest.mm |
index f60215c12d900a3c72ca156b38bf8fc97d0bb085..41f513e3562235eeceab20cf30ba2aa211395372 100644 |
--- a/ios/web/shell/test/page_state_egtest.mm |
+++ b/ios/web/shell/test/page_state_egtest.mm |
@@ -9,8 +9,8 @@ |
#import "ios/web/public/test/http_server.h" |
#include "ios/web/public/test/http_server_util.h" |
-#include "ios/web/shell/test/app/navigation_test_util.h" |
#import "ios/web/shell/test/earl_grey/shell_base_test_case.h" |
+#import "ios/web/shell/test/earl_grey/shell_earl_grey.h" |
#import "ios/web/shell/test/earl_grey/shell_matchers.h" |
#if !defined(__has_feature) || !__has_feature(objc_arc) |
@@ -47,9 +47,7 @@ id<GREYMatcher> contentOffset(CGPoint offset) { |
} // namespace |
-using web::shell_test_util::LoadUrl; |
using web::test::HttpServer; |
-using web::webViewContainingText; |
// Page state test cases for the web shell. |
@interface PageStateTestCase : ShellBaseTestCase |
@@ -63,11 +61,7 @@ using web::webViewContainingText; |
web::test::SetUpFileBasedHttpServer(); |
// Load first URL which is a long page. |
- LoadUrl(HttpServer::MakeUrl(kLongPage1)); |
- // TODO(crbug.com/629116): Remove this once |LoadUrl| waits for the load |
- // completion. |
- [[EarlGrey selectElementWithMatcher:webViewContainingText("List of numbers")] |
- assertWithMatcher:grey_notNil()]; |
+ [ShellEarlGrey loadURL:HttpServer::MakeUrl(kLongPage1)]; |
// Scroll the first page and verify the offset. |
[[EarlGrey selectElementWithMatcher:web::webViewScrollView()] |
@@ -76,14 +70,7 @@ using web::webViewContainingText; |
assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset1))]; |
// Load second URL, which is also a long page. |
- GURL URL2 = HttpServer::MakeUrl(kLongPage2); |
- LoadUrl(URL2); |
- // TODO(crbug.com/629116): Remove these once |LoadUrl| waits for the load |
- // completion. |
- [[EarlGrey selectElementWithMatcher:web::addressFieldText(URL2.spec())] |
- assertWithMatcher:grey_notNil()]; |
- [[EarlGrey selectElementWithMatcher:webViewContainingText("List of numbers")] |
- assertWithMatcher:grey_notNil()]; |
+ [ShellEarlGrey loadURL:HttpServer::MakeUrl(kLongPage2)]; |
// Scroll the second page and verify the offset. |
[[EarlGrey selectElementWithMatcher:web::webViewScrollView()] |