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

Unified Diff: ios/web/shell/test/web_shell_navigation_egtest.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/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()];
« no previous file with comments | « ios/web/shell/test/earl_grey/shell_base_test_case.mm ('k') | ios/web/shell/test/web_shell_page_state_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698