OLD | NEW |
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 #include "base/ios/ios_util.h" | 10 #include "base/ios/ios_util.h" |
11 #import "ios/testing/earl_grey/disabled_test_macros.h" | 11 #include "ios/testing/earl_grey/disabled_test_macros.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 #import "ios/web/shell/test/earl_grey/shell_base_test_case.h" | 14 #import "ios/web/shell/test/earl_grey/shell_base_test_case.h" |
15 #import "ios/web/shell/test/earl_grey/shell_earl_grey.h" | 15 #import "ios/web/shell/test/earl_grey/shell_earl_grey.h" |
16 #import "ios/web/shell/test/earl_grey/shell_matchers.h" | 16 #import "ios/web/shell/test/earl_grey/shell_matchers.h" |
17 | 17 |
18 #if !defined(__has_feature) || !__has_feature(objc_arc) | 18 #if !defined(__has_feature) || !__has_feature(objc_arc) |
19 #error "This file requires ARC support." | 19 #error "This file requires ARC support." |
20 #endif | 20 #endif |
21 | 21 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset1))]; | 97 assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset1))]; |
98 | 98 |
99 // Go forward and verify that the second page offset has been restored. | 99 // Go forward and verify that the second page offset has been restored. |
100 [[EarlGrey selectElementWithMatcher:web::forwardButton()] | 100 [[EarlGrey selectElementWithMatcher:web::forwardButton()] |
101 performAction:grey_tap()]; | 101 performAction:grey_tap()]; |
102 [[EarlGrey selectElementWithMatcher:web::webViewScrollView()] | 102 [[EarlGrey selectElementWithMatcher:web::webViewScrollView()] |
103 assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset2))]; | 103 assertWithMatcher:contentOffset(CGPointMake(0, kScrollOffset2))]; |
104 } | 104 } |
105 | 105 |
106 @end | 106 @end |
OLD | NEW |