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

Side by Side Diff: ios/web/shell/test/navigation_egtest.mm

Issue 2170243002: [ios] Implemented Meta Tags EarlGrey tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename-tests
Patch Set: Addressed review comments 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <UIKit/UIKit.h> 5 #import <UIKit/UIKit.h>
6 #import <WebKit/WebKit.h> 6 #import <WebKit/WebKit.h>
7 #import <XCTest/XCTest.h> 7 #import <XCTest/XCTest.h>
8 8
9 #import <EarlGrey/EarlGrey.h> 9 #import <EarlGrey/EarlGrey.h>
10 10
11 #include "base/strings/sys_string_conversions.h" 11 #include "base/strings/sys_string_conversions.h"
12 #import "ios/web/public/test/http_server.h" 12 #import "ios/web/public/test/http_server.h"
13 #include "ios/web/public/test/http_server_util.h" 13 #include "ios/web/public/test/http_server_util.h"
14 #include "ios/web/shell/test/app/navigation_test_util.h" 14 #include "ios/web/shell/test/app/navigation_test_util.h"
15 #include "ios/web/shell/test/app/web_view_interaction_test_util.h" 15 #include "ios/web/shell/test/app/web_view_interaction_test_util.h"
16 #import "ios/web/shell/test/earl_grey/shell_base_test_case.h" 16 #import "ios/web/shell/test/earl_grey/shell_base_test_case.h"
17 #import "ios/web/shell/test/earl_grey/shell_matchers.h" 17 #import "ios/web/shell/test/earl_grey/shell_matchers.h"
18 18
19 #if !defined(__has_feature) || !__has_feature(objc_arc) 19 #if !defined(__has_feature) || !__has_feature(objc_arc)
20 #error "This file requires ARC support." 20 #error "This file requires ARC support."
21 #endif 21 #endif
22 22
23 // Navigation test cases for the web shell. These are Earl Grey integration 23 // Navigation test cases for the web shell. These are Earl Grey integration
24 // tests, which are based on XCTest. 24 // tests, which are based on XCTest.
25 @interface CRWWebShellNavigationTest : ShellBaseTestCase 25 @interface NavigationTest : ShellBaseTestCase
26 26
27 @end 27 @end
28 28
29 @implementation CRWWebShellNavigationTest 29 @implementation NavigationTest
30 30
31 // Tests clicking a link to about:blank. 31 // Tests clicking a link to about:blank.
32 - (void)testNavigationLinkToAboutBlank { 32 - (void)testNavigationLinkToAboutBlank {
33 const GURL URL = web::test::HttpServer::MakeUrl( 33 const GURL URL = web::test::HttpServer::MakeUrl(
34 "http://ios/web/shell/test/http_server_files/basic_navigation_test.html"); 34 "http://ios/web/shell/test/http_server_files/basic_navigation_test.html");
35 web::test::SetUpFileBasedHttpServer(); 35 web::test::SetUpFileBasedHttpServer();
36 36
37 web::shell_test_util::LoadUrl(URL); 37 web::shell_test_util::LoadUrl(URL);
38 [[EarlGrey selectElementWithMatcher:web::addressFieldText(URL.spec())] 38 [[EarlGrey selectElementWithMatcher:web::addressFieldText(URL.spec())]
39 assertWithMatcher:grey_notNil()]; 39 assertWithMatcher:grey_notNil()];
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 web::shell_test_util::TapWebViewElementWithId("link"); 175 web::shell_test_util::TapWebViewElementWithId("link");
176 176
177 [[EarlGrey selectElementWithMatcher:web::addressFieldText(URL.spec())] 177 [[EarlGrey selectElementWithMatcher:web::addressFieldText(URL.spec())]
178 assertWithMatcher:grey_notNil()]; 178 assertWithMatcher:grey_notNil()];
179 [[EarlGrey 179 [[EarlGrey
180 selectElementWithMatcher:web::webViewContainingText("No navigation!")] 180 selectElementWithMatcher:web::webViewContainingText("No navigation!")]
181 assertWithMatcher:grey_notNil()]; 181 assertWithMatcher:grey_notNil()];
182 } 182 }
183 183
184 @end 184 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698