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..9f9ede0e5a64ff0160a00c9f11173c99c73715bc 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->GetContentNativeView()->parent(); |
sky
2014/05/21 16:15:16
My confusion here is is that what you care about i
Mr4D (OOO till 08-26)
2014/05/21 21:25:25
Done.
|
+ 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 |