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

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

Issue 2195773002: Rename EarlGrey test classes with TestCase suffix. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: after successful sync Created 4 years, 4 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
« no previous file with comments | « ios/web/shell/test/navigation_egtest.mm ('k') | ios/web/shell/test/pdf_egtest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 PageStateTest : ShellBaseTestCase 55 @interface PageStateTestCase : ShellBaseTestCase
56 @end 56 @end
57 57
58 @implementation PageStateTest 58 @implementation PageStateTestCase
59 59
60 // 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
61 // page via the back/forward buttons. 61 // page via the back/forward buttons.
62 - (void)testScrollPositionRestoring { 62 - (void)testScrollPositionRestoring {
63 web::test::SetUpFileBasedHttpServer(); 63 web::test::SetUpFileBasedHttpServer();
64 64
65 // Load first URL which is a long page. 65 // Load first URL which is a long page.
66 LoadUrl(HttpServer::MakeUrl(kLongPage1)); 66 LoadUrl(HttpServer::MakeUrl(kLongPage1));
67 // 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
68 // completion. 68 // completion.
(...skipping 29 matching lines...) Expand all
98 assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset1))]; 98 assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset1))];
99 99
100 // 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.
101 [[EarlGrey selectElementWithMatcher:web::forwardButton()] 101 [[EarlGrey selectElementWithMatcher:web::forwardButton()]
102 performAction:grey_tap()]; 102 performAction:grey_tap()];
103 [[EarlGrey selectElementWithMatcher:web::webViewScrollView()] 103 [[EarlGrey selectElementWithMatcher:web::webViewScrollView()]
104 assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset2))]; 104 assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset2))];
105 } 105 }
106 106
107 @end 107 @end
OLDNEW
« no previous file with comments | « ios/web/shell/test/navigation_egtest.mm ('k') | ios/web/shell/test/pdf_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698