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 #import "ios/web/test/web_int_test.h" | 5 #import "ios/web/test/web_int_test.h" |
6 | 6 |
7 #import "base/ios/block_types.h" | 7 #import "base/ios/block_types.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #import "base/test/ios/wait_util.h" | 9 #import "base/test/ios/wait_util.h" |
10 #import "ios/web/public/test/http_server.h" | 10 #import "ios/web/public/test/http_server/http_server.h" |
11 #import "ios/web/public/test/js_test_util.h" | 11 #import "ios/web/public/test/js_test_util.h" |
12 #include "ios/web/public/web_state/web_state_observer.h" | 12 #include "ios/web/public/web_state/web_state_observer.h" |
13 #import "ios/web/public/web_view_creation_util.h" | 13 #import "ios/web/public/web_view_creation_util.h" |
14 | 14 |
15 namespace web { | 15 namespace web { |
16 | 16 |
17 #pragma mark - IntTestWebStateObserver | 17 #pragma mark - IntTestWebStateObserver |
18 | 18 |
19 // WebStateObserver class that is used to track when page loads finish. | 19 // WebStateObserver class that is used to track when page loads finish. |
20 class IntTestWebStateObserver : public web::WebStateObserver { | 20 class IntTestWebStateObserver : public web::WebStateObserver { |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 NSInteger WebIntTest::GetIndexOfNavigationItem( | 152 NSInteger WebIntTest::GetIndexOfNavigationItem( |
153 const web::NavigationItem* item) { | 153 const web::NavigationItem* item) { |
154 for (NSInteger i = 0; i < navigation_manager()->GetItemCount(); ++i) { | 154 for (NSInteger i = 0; i < navigation_manager()->GetItemCount(); ++i) { |
155 if (navigation_manager()->GetItemAtIndex(i) == item) | 155 if (navigation_manager()->GetItemAtIndex(i) == item) |
156 return i; | 156 return i; |
157 } | 157 } |
158 return NSNotFound; | 158 return NSNotFound; |
159 } | 159 } |
160 | 160 |
161 } // namespace web | 161 } // namespace web |
OLD | NEW |