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

Unified Diff: ios/web/shell/test/earl_grey/shell_base_test_case.mm

Issue 2166043004: Create base class for web shell Earl Grey tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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
« no previous file with comments | « ios/web/shell/test/earl_grey/shell_base_test_case.h ('k') | ios/web/shell/test/web_shell_navigation_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698