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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 base::RunLoop other_run_loop; | 221 base::RunLoop other_run_loop; |
222 factory()->set_run_loop(&other_run_loop); | 222 factory()->set_run_loop(&other_run_loop); |
223 NavigateToURL(other_shell, test_url); | 223 NavigateToURL(other_shell, test_url); |
224 // RunLoop is quit when message received from page. | 224 // RunLoop is quit when message received from page. |
225 other_run_loop.Run(); | 225 other_run_loop.Run(); |
226 EXPECT_TRUE(got_message); | 226 EXPECT_TRUE(got_message); |
227 EXPECT_EQ(shell()->web_contents()->GetRenderProcessHost(), | 227 EXPECT_EQ(shell()->web_contents()->GetRenderProcessHost(), |
228 other_shell->web_contents()->GetRenderProcessHost()); | 228 other_shell->web_contents()->GetRenderProcessHost()); |
229 } | 229 } |
230 | 230 |
231 // Loads a webui page that connects to a test Mojo application via the browser's | |
232 // Mojo shell interface. | |
233 IN_PROC_BROWSER_TEST_F(WebUIMojoTest, ConnectToApplication) { | |
234 if (!IsGeneratedResourceAvailable( | |
235 "content/public/test/test_mojo_service.mojom")) | |
236 return; | |
237 | |
238 ASSERT_TRUE(embedded_test_server()->Start()); | |
239 NavigateToURL(shell(), | |
240 GURL("chrome://mojo-web-ui/web_ui_mojo_shell_test.html")); | |
241 | |
242 DOMMessageQueue message_queue; | |
243 std::string message; | |
244 ASSERT_TRUE(message_queue.WaitForMessage(&message)); | |
245 EXPECT_EQ("true", message); | |
246 } | |
247 | |
248 } // namespace | 231 } // namespace |
249 } // namespace content | 232 } // namespace content |
OLD | NEW |