Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: chrome/browser/apps/web_view_browsertest.cc

Issue 618823002: GuestView: Move lifetime management out of content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/app_view.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 #if defined(OS_WIN) 812 #if defined(OS_WIN)
813 // Flaky on XP bot http://crbug.com/299507 813 // Flaky on XP bot http://crbug.com/299507
814 if (base::win::GetVersion() <= base::win::VERSION_XP) 814 if (base::win::GetVersion() <= base::win::VERSION_XP)
815 return; 815 return;
816 #endif 816 #endif
817 817
818 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/autosize")) 818 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/autosize"))
819 << message_; 819 << message_;
820 } 820 }
821 821
822 // Tests that a <webview> that is set to "display: none" after load and then
823 // setting "display: block" re-renders the plugin properly.
824 //
825 // Initially after loading the <webview> and the test sets <webview> to
826 // "display: none".
827 // This causes the browser plugin to be destroyed, we then set the
828 // style.display of the <webview> to block again and check that loadstop
829 // fires properly.
830 IN_PROC_BROWSER_TEST_F(WebViewTest, DisplayNoneAndBack) {
831 LoadAppWithGuest("web_view/display_none_and_back");
832
833 scoped_refptr<content::MessageLoopRunner> loop_runner(
834 new content::MessageLoopRunner);
835 WebContentsHiddenObserver observer(GetGuestWebContents(),
836 loop_runner->QuitClosure());
837
838 // Handled in platform_apps/web_view/display_none_and_back/main.js
839 SendMessageToEmbedder("hide-guest");
840 GetGuestViewManager()->WaitForGuestDeleted();
841 ExtensionTestMessageListener test_passed_listener("WebViewTest.PASSED",
842 false);
843
844 SendMessageToEmbedder("show-guest");
845 GetGuestViewManager()->WaitForGuestCreated();
846 EXPECT_TRUE(test_passed_listener.WaitUntilSatisfied());
847 }
848
849 // http://crbug.com/326332 822 // http://crbug.com/326332
850 IN_PROC_BROWSER_TEST_F(WebViewTest, DISABLED_Shim_TestAutosizeAfterNavigation) { 823 IN_PROC_BROWSER_TEST_F(WebViewTest, DISABLED_Shim_TestAutosizeAfterNavigation) {
851 TestHelper("testAutosizeAfterNavigation", "web_view/shim", NO_TEST_SERVER); 824 TestHelper("testAutosizeAfterNavigation", "web_view/shim", NO_TEST_SERVER);
852 } 825 }
853 826
854 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAllowTransparencyAttribute) { 827 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAllowTransparencyAttribute) {
855 TestHelper("testAllowTransparencyAttribute", "web_view/shim", NO_TEST_SERVER); 828 TestHelper("testAllowTransparencyAttribute", "web_view/shim", NO_TEST_SERVER);
856 } 829 }
857 830
858 IN_PROC_BROWSER_TEST_F(WebViewDPITest, Shim_TestAutosizeHeight) { 831 IN_PROC_BROWSER_TEST_F(WebViewDPITest, Shim_TestAutosizeHeight) {
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
2317 // http://crbug.com/403325 2290 // http://crbug.com/403325
2318 #define MAYBE_WebViewInBackgroundPage \ 2291 #define MAYBE_WebViewInBackgroundPage \
2319 DISABLED_WebViewInBackgroundPage 2292 DISABLED_WebViewInBackgroundPage
2320 #else 2293 #else
2321 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage 2294 #define MAYBE_WebViewInBackgroundPage WebViewInBackgroundPage
2322 #endif 2295 #endif
2323 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_WebViewInBackgroundPage) { 2296 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_WebViewInBackgroundPage) {
2324 ASSERT_TRUE(RunExtensionTest("platform_apps/web_view/background")) 2297 ASSERT_TRUE(RunExtensionTest("platform_apps/web_view/background"))
2325 << message_; 2298 << message_;
2326 } 2299 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/app_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698