OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/path_service.h" | 5 #include "base/path_service.h" |
6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/apps/app_browsertest_util.h" | 8 #include "chrome/browser/apps/app_browsertest_util.h" |
9 #include "chrome/browser/chrome_content_browser_client.h" | 9 #include "chrome/browser/chrome_content_browser_client.h" |
10 #include "chrome/browser/prerender/prerender_link_manager.h" | 10 #include "chrome/browser/prerender/prerender_link_manager.h" |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 #if defined(OS_WIN) | 791 #if defined(OS_WIN) |
792 // Flaky on XP bot http://crbug.com/299507 | 792 // Flaky on XP bot http://crbug.com/299507 |
793 if (base::win::GetVersion() <= base::win::VERSION_XP) | 793 if (base::win::GetVersion() <= base::win::VERSION_XP) |
794 return; | 794 return; |
795 #endif | 795 #endif |
796 | 796 |
797 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/autosize")) | 797 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/autosize")) |
798 << message_; | 798 << message_; |
799 } | 799 } |
800 | 800 |
801 // Tests that a <webview> that is set to "display: none" after load and then | |
802 // setting "display: block" re-renders the plugin properly. | |
803 // | |
804 // Initially after loading the <webview> and the test sets <webview> to | |
805 // "display: none". | |
806 // This causes the browser plugin to be destroyed, we then set the | |
807 // style.display of the <webview> to block again and check that loadstop | |
808 // fires properly. | |
809 IN_PROC_BROWSER_TEST_F(WebViewTest, DisplayNoneAndBack) { | |
810 LoadAppWithGuest("web_view/display_none_and_back"); | |
811 | |
812 scoped_refptr<content::MessageLoopRunner> loop_runner( | |
813 new content::MessageLoopRunner); | |
814 WebContentsHiddenObserver observer(GetGuestWebContents(), | |
815 loop_runner->QuitClosure()); | |
816 | |
817 // Handled in platform_apps/web_view/display_none_and_back/main.js | |
818 SendMessageToEmbedder("hide-guest"); | |
819 GetGuestViewManager()->WaitForGuestDeleted(); | |
820 ExtensionTestMessageListener test_passed_listener("WebViewTest.PASSED", | |
821 false); | |
822 | |
823 SendMessageToEmbedder("show-guest"); | |
824 GetGuestViewManager()->WaitForGuestCreated(); | |
825 EXPECT_TRUE(test_passed_listener.WaitUntilSatisfied()); | |
826 } | |
827 | |
828 // http://crbug.com/326332 | 801 // http://crbug.com/326332 |
829 IN_PROC_BROWSER_TEST_F(WebViewTest, DISABLED_Shim_TestAutosizeAfterNavigation) { | 802 IN_PROC_BROWSER_TEST_F(WebViewTest, DISABLED_Shim_TestAutosizeAfterNavigation) { |
830 TestHelper("testAutosizeAfterNavigation", "web_view/shim", NO_TEST_SERVER); | 803 TestHelper("testAutosizeAfterNavigation", "web_view/shim", NO_TEST_SERVER); |
831 } | 804 } |
832 | 805 |
833 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAllowTransparencyAttribute) { | 806 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAllowTransparencyAttribute) { |
834 TestHelper("testAllowTransparencyAttribute", "web_view/shim", NO_TEST_SERVER); | 807 TestHelper("testAllowTransparencyAttribute", "web_view/shim", NO_TEST_SERVER); |
835 } | 808 } |
836 | 809 |
837 IN_PROC_BROWSER_TEST_F(WebViewDPITest, Shim_TestAutosizeHeight) { | 810 IN_PROC_BROWSER_TEST_F(WebViewDPITest, Shim_TestAutosizeHeight) { |
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2276 // http://crbug.com/403325 | 2249 // http://crbug.com/403325 |
2277 #define MAYBE_WebViewInBackgroundPage \ | 2250 #define MAYBE_WebViewInBackgroundPage \ |
2278 DISABLED_WebViewInBackgroundPage | 2251 DISABLED_WebViewInBackgroundPage |
2279 #else | 2252 #else |
2280 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage | 2253 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage |
2281 #endif | 2254 #endif |
2282 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_WebViewInBackgroundPage) { | 2255 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_WebViewInBackgroundPage) { |
2283 ASSERT_TRUE(RunExtensionTest("platform_apps/web_view/background")) | 2256 ASSERT_TRUE(RunExtensionTest("platform_apps/web_view/background")) |
2284 << message_; | 2257 << message_; |
2285 } | 2258 } |
OLD | NEW |