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

Side by Side Diff: ios/web/shell/test/page_state_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 <CoreGraphics/CoreGraphics.h> 5 #import <CoreGraphics/CoreGraphics.h>
6 #import <EarlGrey/EarlGrey.h> 6 #import <EarlGrey/EarlGrey.h>
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 #import <XCTest/XCTest.h> 8 #import <XCTest/XCTest.h>
9 9
10 #import "ios/web/public/test/http_server.h" 10 #import "ios/web/public/test/http_server.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 nil); 45 nil);
46 } 46 }
47 47
48 } // namespace 48 } // namespace
49 49
50 using web::shell_test_util::LoadUrl; 50 using web::shell_test_util::LoadUrl;
51 using web::test::HttpServer; 51 using web::test::HttpServer;
52 using web::webViewContainingText; 52 using web::webViewContainingText;
53 53
54 // Page state test cases for the web shell. 54 // Page state test cases for the web shell.
55 @interface CRWWebShellPageStateTest : ShellBaseTestCase 55 @interface PageStateTest : ShellBaseTestCase
56
baxley 2016/07/22 18:36:18 super-tiny nit: Should we make this the same in th
Eugene But (OOO till 7-30) 2016/07/22 22:56:57 There is no rule for this, probably did by acciden
57 @end 56 @end
58 57
59 @implementation CRWWebShellPageStateTest 58 @implementation PageStateTest
60 59
61 // Tests that page scroll position of a page is restored upon returning to the 60 // Tests that page scroll position of a page is restored upon returning to the
62 // page via the back/forward buttons. 61 // page via the back/forward buttons.
63 - (void)testScrollPositionRestoring { 62 - (void)testScrollPositionRestoring {
64 web::test::SetUpFileBasedHttpServer(); 63 web::test::SetUpFileBasedHttpServer();
65 64
66 // Load first URL which is a long page. 65 // Load first URL which is a long page.
67 LoadUrl(HttpServer::MakeUrl(kLongPage1)); 66 LoadUrl(HttpServer::MakeUrl(kLongPage1));
68 // TODO(crbug.com/629116): Remove this once |LoadUrl| waits for the load 67 // TODO(crbug.com/629116): Remove this once |LoadUrl| waits for the load
69 // completion. 68 // completion.
(...skipping 29 matching lines...) Expand all
99 assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset1))]; 98 assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset1))];
100 99
101 // Go forward and verify that the second page offset has been restored. 100 // Go forward and verify that the second page offset has been restored.
102 [[EarlGrey selectElementWithMatcher:web::forwardButton()] 101 [[EarlGrey selectElementWithMatcher:web::forwardButton()]
103 performAction:grey_tap()]; 102 performAction:grey_tap()];
104 [[EarlGrey selectElementWithMatcher:web::webViewScrollView()] 103 [[EarlGrey selectElementWithMatcher:web::webViewScrollView()]
105 assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset2))]; 104 assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset2))];
106 } 105 }
107 106
108 @end 107 @end
OLDNEW
« no previous file with comments | « ios/web/shell/test/navigation_egtest.mm ('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