Index: ios/web/shell/test/web_shell_navigation_egtest.mm |
diff --git a/ios/web/shell/test/web_shell_navigation_egtest.mm b/ios/web/shell/test/web_shell_navigation_egtest.mm |
index b3180c62d5178ac158da8e5acea30dba12d1f3c2..d51781ff2d88ff04616b26625cbfb4c4142403b2 100644 |
--- a/ios/web/shell/test/web_shell_navigation_egtest.mm |
+++ b/ios/web/shell/test/web_shell_navigation_egtest.mm |
@@ -13,49 +13,23 @@ |
#include "ios/web/public/test/http_server_util.h" |
#include "ios/web/shell/test/app/navigation_test_util.h" |
#include "ios/web/shell/test/app/web_view_interaction_test_util.h" |
+#import "ios/web/shell/test/earl_grey/shell_base_test_case.h" |
#import "ios/web/shell/test/earl_grey/shell_matchers.h" |
// Navigation test cases for the web shell. These are Earl Grey integration |
// tests, which are based on XCTest. |
-@interface CRWWebShellNavigationTest : XCTestCase |
+@interface CRWWebShellNavigationTest : ShellBaseTestCase |
@end |
@implementation CRWWebShellNavigationTest |
-// Set up called once for the class. |
-+ (void)setUp { |
- [super setUp]; |
- [[EarlGrey selectElementWithMatcher:web::webViewContainingText("Chromium")] |
- assertWithMatcher:grey_notNil()]; |
- web::test::HttpServer& server = web::test::HttpServer::GetSharedInstance(); |
- server.StartOrDie(); |
- DCHECK(server.IsRunning()); |
-} |
- |
-// Tear down called once for the class. |
-+ (void)tearDown { |
- [super tearDown]; |
- web::test::HttpServer& server = web::test::HttpServer::GetSharedInstance(); |
- server.Stop(); |
- DCHECK(!server.IsRunning()); |
-} |
- |
-// Tear down called after each test. |
-- (void)tearDown { |
- [super tearDown]; |
- web::test::HttpServer& server = web::test::HttpServer::GetSharedInstance(); |
- server.RemoveAllResponseProviders(); |
-} |
- |
// Tests clicking a link to about:blank. |
- (void)testNavigationLinkToAboutBlank { |
const GURL URL = web::test::HttpServer::MakeUrl( |
"http://ios/web/shell/test/http_server_files/basic_navigation_test.html"); |
web::test::SetUpFileBasedHttpServer(); |
- // TODO(crbug.com/611515): Create web shell utility that only requires URL, |
- // and gets the web state and passes it in to the web view utility. |
web::shell_test_util::LoadUrl(URL); |
[[EarlGrey selectElementWithMatcher:web::addressFieldText(URL.spec())] |
assertWithMatcher:grey_notNil()]; |