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

Unified Diff: content/browser/web_contents/web_contents_view_aura_browsertest.cc

Issue 286943005: Reducing CPU cycles of hidden/minimized browser windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing windows shutdown issue Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_view_aura_browsertest.cc
diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
index 330f624685b00f9f3ec4a9546c72edd1784e7983..740af533264de3dc5796e94ecc02030afd9bd82d 100644
--- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc
+++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
@@ -594,8 +594,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
window->AddChild(shell()->web_contents()->GetContentNativeView());
}
-IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
- ContentWindowClose) {
+IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, ContentWindowClose) {
ASSERT_NO_FATAL_FAILURE(
StartTestWithPage("files/overscroll_navigation.html"));
@@ -684,4 +683,18 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
EXPECT_FALSE(controller.CanGoForward());
}
+// Verify that hiding a parent of the renderer will hide the content too.
+IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, HideContentOnParenHide) {
+ ASSERT_NO_FATAL_FAILURE(StartTestWithPage("files/title1.html"));
+ WebContentsImpl* web_contents =
+ static_cast<WebContentsImpl*>(shell()->web_contents());
+ aura::Window* content = web_contents->GetNativeView()->parent();
+ aura::Window* parent = content->parent();
+ EXPECT_TRUE(web_contents->should_normally_be_visible());
+ parent->Hide();
+ EXPECT_FALSE(web_contents->should_normally_be_visible());
+ parent->Show();
+ EXPECT_TRUE(web_contents->should_normally_be_visible());
+}
+
} // namespace content
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698