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 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
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/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 TestWebUIControllerFactory* factory() { return &factory_; } | 190 TestWebUIControllerFactory* factory() { return &factory_; } |
191 | 191 |
192 private: | 192 private: |
193 TestWebUIControllerFactory factory_; | 193 TestWebUIControllerFactory factory_; |
194 | 194 |
195 DISALLOW_COPY_AND_ASSIGN(WebUIMojoTest); | 195 DISALLOW_COPY_AND_ASSIGN(WebUIMojoTest); |
196 }; | 196 }; |
197 | 197 |
198 // Loads a webui page that contains mojo bindings and verifies a message makes | 198 // Loads a webui page that contains mojo bindings and verifies a message makes |
199 // it from the browser to the page and back. | 199 // it from the browser to the page and back. |
200 IN_PROC_BROWSER_TEST_F(WebUIMojoTest, EndToEndPing) { | 200 // Fails on Win only. http://crbug.com/418019 |
| 201 #if defined(OS_WIN) |
| 202 #define MAYBE_EndToEndPing DISABLED_EndToEndPing |
| 203 #else |
| 204 #define MAYBE_EndToEndPing EndToEndPing |
| 205 #endif |
| 206 IN_PROC_BROWSER_TEST_F(WebUIMojoTest, MAYBE_EndToEndPing) { |
201 // Currently there is no way to have a generated file included in the isolate | 207 // Currently there is no way to have a generated file included in the isolate |
202 // files. If the bindings file doesn't exist assume we're on such a bot and | 208 // files. If the bindings file doesn't exist assume we're on such a bot and |
203 // pass. | 209 // pass. |
204 // TODO(sky): remove this conditional when isolates support copying from gen. | 210 // TODO(sky): remove this conditional when isolates support copying from gen. |
205 const base::FilePath test_file_path( | 211 const base::FilePath test_file_path( |
206 mojo::test::GetFilePathForJSResource( | 212 mojo::test::GetFilePathForJSResource( |
207 "content/test/data/web_ui_test_mojo_bindings.mojom")); | 213 "content/test/data/web_ui_test_mojo_bindings.mojom")); |
208 if (!base::PathExists(test_file_path)) { | 214 if (!base::PathExists(test_file_path)) { |
209 LOG(WARNING) << " mojom binding file doesn't exist, assuming on isolate"; | 215 LOG(WARNING) << " mojom binding file doesn't exist, assuming on isolate"; |
210 return; | 216 return; |
(...skipping 18 matching lines...) Expand all Loading... |
229 NavigateToURL(other_shell, test_url); | 235 NavigateToURL(other_shell, test_url); |
230 // RunLoop is quit when message received from page. | 236 // RunLoop is quit when message received from page. |
231 other_run_loop.Run(); | 237 other_run_loop.Run(); |
232 EXPECT_TRUE(got_message); | 238 EXPECT_TRUE(got_message); |
233 EXPECT_EQ(shell()->web_contents()->GetRenderProcessHost(), | 239 EXPECT_EQ(shell()->web_contents()->GetRenderProcessHost(), |
234 other_shell->web_contents()->GetRenderProcessHost()); | 240 other_shell->web_contents()->GetRenderProcessHost()); |
235 } | 241 } |
236 | 242 |
237 } // namespace | 243 } // namespace |
238 } // namespace content | 244 } // namespace content |
OLD | NEW |