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 <limits> | 5 #include <limits> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "content/public/common/content_switches.h" | 26 #include "content/public/common/content_switches.h" |
27 #include "content/public/common/url_utils.h" | 27 #include "content/public/common/url_utils.h" |
28 #include "content/public/test/browser_test_utils.h" | 28 #include "content/public/test/browser_test_utils.h" |
29 #include "content/public/test/content_browser_test.h" | 29 #include "content/public/test/content_browser_test.h" |
30 #include "content/public/test/content_browser_test_utils.h" | 30 #include "content/public/test/content_browser_test_utils.h" |
31 #include "content/shell/browser/shell.h" | 31 #include "content/shell/browser/shell.h" |
32 #include "content/test/data/web_ui_test_mojo_bindings.mojom.h" | 32 #include "content/test/data/web_ui_test_mojo_bindings.mojom.h" |
33 #include "mojo/public/cpp/bindings/binding.h" | 33 #include "mojo/public/cpp/bindings/binding.h" |
34 #include "mojo/public/cpp/bindings/interface_request.h" | 34 #include "mojo/public/cpp/bindings/interface_request.h" |
35 #include "net/test/embedded_test_server/embedded_test_server.h" | 35 #include "net/test/embedded_test_server/embedded_test_server.h" |
36 #include "services/service_manager/public/cpp/interface_registry.h" | 36 #include "services/service_manager/public/cpp/binder_registry.h" |
37 | 37 |
38 namespace content { | 38 namespace content { |
39 namespace { | 39 namespace { |
40 | 40 |
41 bool g_got_message = false; | 41 bool g_got_message = false; |
42 | 42 |
43 base::FilePath GetFilePathForJSResource(const std::string& path) { | 43 base::FilePath GetFilePathForJSResource(const std::string& path) { |
44 base::ThreadRestrictions::ScopedAllowIO allow_io_from_test_callbacks; | 44 base::ThreadRestrictions::ScopedAllowIO allow_io_from_test_callbacks; |
45 | 45 |
46 std::string binding_path = "gen/" + path + ".js"; | 46 std::string binding_path = "gen/" + path + ".js"; |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 NavigateToURL(other_shell, test_url); | 232 NavigateToURL(other_shell, test_url); |
233 // RunLoop is quit when message received from page. | 233 // RunLoop is quit when message received from page. |
234 other_run_loop.Run(); | 234 other_run_loop.Run(); |
235 EXPECT_TRUE(g_got_message); | 235 EXPECT_TRUE(g_got_message); |
236 EXPECT_EQ(shell()->web_contents()->GetRenderProcessHost(), | 236 EXPECT_EQ(shell()->web_contents()->GetRenderProcessHost(), |
237 other_shell->web_contents()->GetRenderProcessHost()); | 237 other_shell->web_contents()->GetRenderProcessHost()); |
238 } | 238 } |
239 | 239 |
240 } // namespace | 240 } // namespace |
241 } // namespace content | 241 } // namespace content |
OLD | NEW |