| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 NSInteger WebIntTest::GetIndexOfNavigationItem( | 146 NSInteger WebIntTest::GetIndexOfNavigationItem( |
| 147 const web::NavigationItem* item) { | 147 const web::NavigationItem* item) { |
| 148 for (NSInteger i = 0; i < navigation_manager()->GetItemCount(); ++i) { | 148 for (NSInteger i = 0; i < navigation_manager()->GetItemCount(); ++i) { |
| 149 if (navigation_manager()->GetItemAtIndex(i) == item) | 149 if (navigation_manager()->GetItemAtIndex(i) == item) |
| 150 return i; | 150 return i; |
| 151 } | 151 } |
| 152 return NSNotFound; | 152 return NSNotFound; |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace web | 155 } // namespace web |
| OLD | NEW |