OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "chrome/browser/automation/automation_util.h" | 6 #include "chrome/browser/automation/automation_util.h" |
7 #include "chrome/browser/extensions/extension_test_message_listener.h" | 7 #include "chrome/browser/extensions/extension_test_message_listener.h" |
8 #include "chrome/browser/extensions/platform_app_browsertest_util.h" | 8 #include "chrome/browser/extensions/platform_app_browsertest_util.h" |
9 #include "chrome/browser/prerender/prerender_link_manager.h" | 9 #include "chrome/browser/prerender/prerender_link_manager.h" |
10 #include "chrome/browser/prerender/prerender_link_manager_factory.h" | 10 #include "chrome/browser/prerender/prerender_link_manager_factory.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 content::TitleWatcher title_watcher(web_contents, expected_title); | 235 content::TitleWatcher title_watcher(web_contents, expected_title); |
236 title_watcher.AlsoWaitForTitle(error_title); | 236 title_watcher.AlsoWaitForTitle(error_title); |
237 EXPECT_TRUE(content::ExecuteScript(web_contents, script)); | 237 EXPECT_TRUE(content::ExecuteScript(web_contents, script)); |
238 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 238 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
239 } | 239 } |
240 | 240 |
241 scoped_ptr<content::FakeSpeechRecognitionManager> | 241 scoped_ptr<content::FakeSpeechRecognitionManager> |
242 fake_speech_recognition_manager_; | 242 fake_speech_recognition_manager_; |
243 }; | 243 }; |
244 | 244 |
245 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim) { | 245 // http://crbug.com/176122: This test is flaky on Windows. |
| 246 #if defined(OS_WIN) |
| 247 #define MAYBE_Shim DISABLED_Shim |
| 248 #else |
| 249 #define MAYBE_Shim Shim |
| 250 #endif |
| 251 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_Shim) { |
246 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/shim")) << message_; | 252 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/shim")) << message_; |
247 } | 253 } |
248 | 254 |
249 IN_PROC_BROWSER_TEST_F(WebViewTest, ShimSrcAttribute) { | 255 IN_PROC_BROWSER_TEST_F(WebViewTest, ShimSrcAttribute) { |
250 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/src_attribute")) | 256 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/src_attribute")) |
251 << message_; | 257 << message_; |
252 } | 258 } |
253 | 259 |
254 // This test verifies that prerendering has been disabled inside <webview>. | 260 // This test verifies that prerendering has been disabled inside <webview>. |
255 // This test is here rather than in PrerenderBrowserTest for testing convenience | 261 // This test is here rather than in PrerenderBrowserTest for testing convenience |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 // Click on the guest (center of the WebContents), the guest is rendered in a | 701 // Click on the guest (center of the WebContents), the guest is rendered in a |
696 // way that this will trigger clicking on speech recognition input mic. | 702 // way that this will trigger clicking on speech recognition input mic. |
697 SimulateMouseClick(guest_web_contents, 0, WebKit::WebMouseEvent::ButtonLeft); | 703 SimulateMouseClick(guest_web_contents, 0, WebKit::WebMouseEvent::ButtonLeft); |
698 | 704 |
699 string16 expected_title(ASCIIToUTF16("PASSED")); | 705 string16 expected_title(ASCIIToUTF16("PASSED")); |
700 string16 error_title(ASCIIToUTF16("FAILED")); | 706 string16 error_title(ASCIIToUTF16("FAILED")); |
701 content::TitleWatcher title_watcher(guest_web_contents, expected_title); | 707 content::TitleWatcher title_watcher(guest_web_contents, expected_title); |
702 title_watcher.AlsoWaitForTitle(error_title); | 708 title_watcher.AlsoWaitForTitle(error_title); |
703 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 709 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
704 } | 710 } |
OLD | NEW |