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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // http://crbug.com/176122: This test is flaky on Windows. | 245 // http://crbug.com/176122: This test is flaky on Windows. |
246 #if defined(OS_WIN) | 246 #if defined(OS_WIN) |
247 #define MAYBE_Shim DISABLED_Shim | 247 #define MAYBE_Shim DISABLED_Shim |
248 #else | 248 #else |
249 #define MAYBE_Shim Shim | 249 #define MAYBE_Shim Shim |
250 #endif | 250 #endif |
251 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_Shim) { | 251 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_Shim) { |
252 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/shim")) << message_; | 252 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/shim")) << message_; |
253 } | 253 } |
254 | 254 |
255 IN_PROC_BROWSER_TEST_F(WebViewTest, ShimSrcAttribute) { | 255 // http://crbug.com/176122: This test is flaky on Linux. |
| 256 #if defined(OS_LINUX) |
| 257 #define MAYBE_ShimSrcAttribute DISABLED_ShimSrcAttribute |
| 258 #else |
| 259 #define MAYBE_ShimSrcAttribute ShimSrcAttribute |
| 260 #endif |
| 261 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_ShimSrcAttribute) { |
256 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/src_attribute")) | 262 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/src_attribute")) |
257 << message_; | 263 << message_; |
258 } | 264 } |
259 | 265 |
260 // This test verifies that prerendering has been disabled inside <webview>. | 266 // This test verifies that prerendering has been disabled inside <webview>. |
261 // This test is here rather than in PrerenderBrowserTest for testing convenience | 267 // This test is here rather than in PrerenderBrowserTest for testing convenience |
262 // only. If it breaks then this is a bug in the prerenderer. | 268 // only. If it breaks then this is a bug in the prerenderer. |
263 IN_PROC_BROWSER_TEST_F(WebViewTest, NoPrerenderer) { | 269 IN_PROC_BROWSER_TEST_F(WebViewTest, NoPrerenderer) { |
264 ASSERT_TRUE(StartTestServer()); | 270 ASSERT_TRUE(StartTestServer()); |
265 std::string host_str("localhost"); // Must stay in scope with replace_host. | 271 std::string host_str("localhost"); // Must stay in scope with replace_host. |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 // Click on the guest (center of the WebContents), the guest is rendered in a | 707 // Click on the guest (center of the WebContents), the guest is rendered in a |
702 // way that this will trigger clicking on speech recognition input mic. | 708 // way that this will trigger clicking on speech recognition input mic. |
703 SimulateMouseClick(guest_web_contents, 0, WebKit::WebMouseEvent::ButtonLeft); | 709 SimulateMouseClick(guest_web_contents, 0, WebKit::WebMouseEvent::ButtonLeft); |
704 | 710 |
705 string16 expected_title(ASCIIToUTF16("PASSED")); | 711 string16 expected_title(ASCIIToUTF16("PASSED")); |
706 string16 error_title(ASCIIToUTF16("FAILED")); | 712 string16 error_title(ASCIIToUTF16("FAILED")); |
707 content::TitleWatcher title_watcher(guest_web_contents, expected_title); | 713 content::TitleWatcher title_watcher(guest_web_contents, expected_title); |
708 title_watcher.AlsoWaitForTitle(error_title); | 714 title_watcher.AlsoWaitForTitle(error_title); |
709 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 715 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
710 } | 716 } |
OLD | NEW |