| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| 11 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 11 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| 12 #include "content/common/mojo/mojo_channel_init.h" | 12 #include "content/common/mojo/mojo_channel_init.h" |
| 13 #include "content/public/browser/browser_context.h" | 13 #include "content/public/browser/browser_context.h" |
| 14 #include "content/public/browser/render_view_host.h" | 14 #include "content/public/browser/render_view_host.h" |
| 15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
| 16 #include "content/public/browser/web_ui_controller.h" | 16 #include "content/public/browser/web_ui_controller.h" |
| 17 #include "content/public/browser/web_ui_data_source.h" | 17 #include "content/public/browser/web_ui_data_source.h" |
| 18 #include "content/public/common/content_paths.h" | 18 #include "content/public/common/content_paths.h" |
| 19 #include "content/public/common/content_switches.h" | 19 #include "content/public/common/content_switches.h" |
| 20 #include "content/public/common/url_utils.h" | 20 #include "content/public/common/url_utils.h" |
| 21 #include "content/test/content_browser_test.h" | 21 #include "content/public/test/content_browser_test.h" |
| 22 #include "content/test/content_browser_test_utils.h" | 22 #include "content/public/test/content_browser_test_utils.h" |
| 23 #include "content/test/data/web_ui_test_mojo_bindings.mojom.h" | 23 #include "content/test/data/web_ui_test_mojo_bindings.mojom.h" |
| 24 #include "grit/content_resources.h" | 24 #include "grit/content_resources.h" |
| 25 #include "mojo/public/bindings/js/constants.h" | 25 #include "mojo/public/bindings/js/constants.h" |
| 26 #include "mojo/public/bindings/remote_ptr.h" | 26 #include "mojo/public/bindings/remote_ptr.h" |
| 27 | 27 |
| 28 namespace content { | 28 namespace content { |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 bool got_message = false; | 31 bool got_message = false; |
| 32 | 32 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 factory()->set_run_loop(&run_loop); | 185 factory()->set_run_loop(&run_loop); |
| 186 GURL test_url(test_server()->GetURL("files/web_ui_mojo.html")); | 186 GURL test_url(test_server()->GetURL("files/web_ui_mojo.html")); |
| 187 NavigateToURL(shell(), test_url); | 187 NavigateToURL(shell(), test_url); |
| 188 // RunLoop is quit when message received from page. | 188 // RunLoop is quit when message received from page. |
| 189 run_loop.Run(); | 189 run_loop.Run(); |
| 190 EXPECT_TRUE(got_message); | 190 EXPECT_TRUE(got_message); |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace | 193 } // namespace |
| 194 } // namespace content | 194 } // namespace content |
| OLD | NEW |