| 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 #include <memory> | 5 #include <memory> |
| 6 | 6 |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #import "base/test/ios/wait_util.h" | 8 #import "base/test/ios/wait_util.h" |
| 9 #import "ios/web/public/navigation_manager.h" | 9 #import "ios/web/public/navigation_manager.h" |
| 10 #include "ios/web/public/web_ui_ios_data_source.h" | 10 #include "ios/web/public/web_ui_ios_data_source.h" |
| 11 #include "ios/web/public/webui/web_ui_ios_controller.h" | 11 #include "ios/web/public/webui/web_ui_ios_controller.h" |
| 12 #include "ios/web/public/webui/web_ui_ios_controller_factory.h" | 12 #include "ios/web/public/webui/web_ui_ios_controller_factory.h" |
| 13 #include "ios/web/test/grit/test_resources.h" | 13 #include "ios/web/test/grit/test_resources.h" |
| 14 #include "ios/web/test/mojo_test.mojom.h" | 14 #include "ios/web/test/mojo_test.mojom.h" |
| 15 #include "ios/web/test/test_url_constants.h" | 15 #include "ios/web/test/test_url_constants.h" |
| 16 #import "ios/web/test/web_int_test.h" | 16 #import "ios/web/test/web_int_test.h" |
| 17 #import "ios/web/web_state/ui/crw_web_controller.h" | 17 #import "ios/web/web_state/ui/crw_web_controller.h" |
| 18 #import "ios/web/web_state/web_state_impl.h" | 18 #import "ios/web/web_state/web_state_impl.h" |
| 19 #include "mojo/public/cpp/bindings/binding_set.h" | 19 #include "mojo/public/cpp/bindings/binding_set.h" |
| 20 #include "services/shell/public/cpp/identity.h" | 20 #include "services/service_manager/public/cpp/identity.h" |
| 21 #include "services/shell/public/cpp/interface_registry.h" | 21 #include "services/service_manager/public/cpp/interface_registry.h" |
| 22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
| 23 #include "url/scheme_host_port.h" | 23 #include "url/scheme_host_port.h" |
| 24 | 24 |
| 25 namespace web { | 25 namespace web { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // Hostname for test WebUI page. | 29 // Hostname for test WebUI page. |
| 30 const char kTestWebUIURLHost[] = "testwebui"; | 30 const char kTestWebUIURLHost[] = "testwebui"; |
| 31 | 31 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 web_state()->GetNavigationManager()->LoadURLWithParams(load_params); | 158 web_state()->GetNavigationManager()->LoadURLWithParams(load_params); |
| 159 | 159 |
| 160 // Wait until |TestUIHandler| receives "ack" message from WebUI page. | 160 // Wait until |TestUIHandler| receives "ack" message from WebUI page. |
| 161 base::test::ios::WaitUntilCondition(^{ | 161 base::test::ios::WaitUntilCondition(^{ |
| 162 base::RunLoop().RunUntilIdle(); | 162 base::RunLoop().RunUntilIdle(); |
| 163 return test_ui_handler()->IsFinReceived(); | 163 return test_ui_handler()->IsFinReceived(); |
| 164 }); | 164 }); |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace web | 167 } // namespace web |
| OLD | NEW |