OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef IOS_WEB_TEST_WEB_INT_TEST_H_ | 5 #ifndef IOS_WEB_TEST_WEB_INT_TEST_H_ |
6 #define IOS_WEB_TEST_WEB_INT_TEST_H_ | 6 #define IOS_WEB_TEST_WEB_INT_TEST_H_ |
7 | 7 |
8 #import <WebKit/WebKit.h> | 8 #import <WebKit/WebKit.h> |
9 | 9 |
10 #import "base/ios/block_types.h" | 10 #import "base/ios/block_types.h" |
11 #import "ios/web/public/navigation_manager.h" | 11 #import "ios/web/public/navigation_manager.h" |
| 12 #import "ios/web/public/test/fakes/test_web_state_delegate.h" |
12 #include "ios/web/public/test/web_test.h" | 13 #include "ios/web/public/test/web_test.h" |
13 #import "ios/web/public/web_state/web_state.h" | 14 #import "ios/web/public/web_state/web_state.h" |
14 | 15 |
15 class GURL; | 16 class GURL; |
16 | 17 |
17 namespace web { | 18 namespace web { |
18 | 19 |
19 class IntTestWebStateObserver; | 20 class IntTestWebStateObserver; |
20 | 21 |
21 // A test fixture for integration tests that need to bring up the HttpServer. | 22 // A test fixture for integration tests that need to bring up the HttpServer. |
(...skipping 26 matching lines...) Expand all Loading... |
48 // Synchronously removes data from |data_store|. | 49 // Synchronously removes data from |data_store|. |
49 // |websiteDataTypes| is from the constants defined in | 50 // |websiteDataTypes| is from the constants defined in |
50 // "WebKit/WKWebsiteDataRecord". | 51 // "WebKit/WKWebsiteDataRecord". |
51 void RemoveWKWebViewCreatedData(WKWebsiteDataStore* data_store, | 52 void RemoveWKWebViewCreatedData(WKWebsiteDataStore* data_store, |
52 NSSet* websiteDataTypes); | 53 NSSet* websiteDataTypes); |
53 | 54 |
54 // Returns the index of |item| in the |navigation_manager|'s session history, | 55 // Returns the index of |item| in the |navigation_manager|'s session history, |
55 // or NSNotFound if it is not present. | 56 // or NSNotFound if it is not present. |
56 NSInteger GetIndexOfNavigationItem(const web::NavigationItem* item); | 57 NSInteger GetIndexOfNavigationItem(const web::NavigationItem* item); |
57 | 58 |
| 59 web::TestWebStateDelegate web_state_delegate_; |
| 60 |
58 private: | 61 private: |
59 // WebState used to load pages. | 62 // WebState used to load pages. |
60 std::unique_ptr<WebState> web_state_; | 63 std::unique_ptr<WebState> web_state_; |
61 // WebStateObserver used to wait for page loads. | 64 // WebStateObserver used to wait for page loads. |
62 std::unique_ptr<IntTestWebStateObserver> observer_; | 65 std::unique_ptr<IntTestWebStateObserver> observer_; |
63 }; | 66 }; |
64 | 67 |
65 } // namespace web | 68 } // namespace web |
66 | 69 |
67 #endif // IOS_WEB_TEST_WEB_INT_TEST_H_ | 70 #endif // IOS_WEB_TEST_WEB_INT_TEST_H_ |
OLD | NEW |