Index: ios/web/shell/test/earl_grey/shell_base_test_case.mm |
diff --git a/ios/web/shell/test/earl_grey/shell_base_test_case.mm b/ios/web/shell/test/earl_grey/shell_base_test_case.mm |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e30ea64fbea7762d65a55216e8a844157c44857c |
--- /dev/null |
+++ b/ios/web/shell/test/earl_grey/shell_base_test_case.mm |
@@ -0,0 +1,37 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#import "ios/web/shell/test/earl_grey/shell_base_test_case.h" |
+ |
+#import <EarlGrey/EarlGrey.h> |
+ |
+#import "ios/web/public/test/http_server.h" |
+#import "ios/web/shell/test/earl_grey/shell_matchers.h" |
+ |
+using web::test::HttpServer; |
+using web::webViewContainingText; |
+ |
+@implementation ShellBaseTestCase |
+ |
+// Set up called once for the class. |
++ (void)setUp { |
+ [super setUp]; |
+ [[EarlGrey selectElementWithMatcher:webViewContainingText("Chromium")] |
+ assertWithMatcher:grey_notNil()]; |
+ HttpServer::GetSharedInstance().StartOrDie(); |
+} |
+ |
+// Tear down called once for the class. |
++ (void)tearDown { |
+ HttpServer::GetSharedInstance().Stop(); |
+ [super tearDown]; |
+} |
+ |
+// Tear down called after each test. |
+- (void)tearDown { |
+ HttpServer::GetSharedInstance().RemoveAllResponseProviders(); |
+ [super tearDown]; |
+} |
+ |
+@end |