| Index: content/browser/web_contents/web_contents_impl_unittest.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
|
| index 011be070c233414281996b07d2443a9e14d8156d..53a86d7cd7902c39816404fbd63203f49f0c0da2 100644
|
| --- a/content/browser/web_contents/web_contents_impl_unittest.cc
|
| +++ b/content/browser/web_contents/web_contents_impl_unittest.cc
|
| @@ -162,7 +162,7 @@
|
| bool is_showing() const {
|
| return static_cast<TestRenderWidgetHostView*>(
|
| GetMainFrame()->GetRenderViewHost()->GetWidget()->GetView())
|
| - ->IsShowing();
|
| + ->is_showing();
|
| }
|
|
|
| void ClearStates() {
|
| @@ -1684,6 +1684,7 @@
|
| interstitial->Show();
|
| int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID();
|
| // The interstitial should not show until its navigation has committed.
|
| + EXPECT_FALSE(interstitial->is_showing());
|
| EXPECT_FALSE(contents()->ShowingInterstitialPage());
|
| EXPECT_EQ(nullptr, contents()->GetInterstitialPage());
|
| // Let's commit the interstitial navigation.
|
| @@ -1731,6 +1732,7 @@
|
| interstitial->Show();
|
| int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID();
|
| // The interstitial should not show until its navigation has committed.
|
| + EXPECT_FALSE(interstitial->is_showing());
|
| EXPECT_FALSE(contents()->ShowingInterstitialPage());
|
| EXPECT_EQ(nullptr, contents()->GetInterstitialPage());
|
| // Let's commit the interstitial navigation.
|
| @@ -1775,6 +1777,7 @@
|
| TestInterstitialPageStateGuard state_guard(interstitial);
|
| interstitial->Show();
|
| // The interstitial should not show until its navigation has committed.
|
| + EXPECT_FALSE(interstitial->is_showing());
|
| EXPECT_FALSE(contents()->ShowingInterstitialPage());
|
| EXPECT_EQ(nullptr, contents()->GetInterstitialPage());
|
| // Let's commit the interstitial navigation.
|
| @@ -1826,6 +1829,7 @@
|
| interstitial->Show();
|
| int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID();
|
| // The interstitial should not show until its navigation has committed.
|
| + EXPECT_FALSE(interstitial->is_showing());
|
| EXPECT_FALSE(contents()->ShowingInterstitialPage());
|
| EXPECT_EQ(nullptr, contents()->GetInterstitialPage());
|
| // Let's commit the interstitial navigation.
|
| @@ -1885,6 +1889,7 @@
|
| interstitial->Show();
|
| int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID();
|
| // The interstitial should not show until its navigation has committed.
|
| + EXPECT_FALSE(interstitial->is_showing());
|
| EXPECT_FALSE(contents()->ShowingInterstitialPage());
|
| EXPECT_EQ(nullptr, contents()->GetInterstitialPage());
|
| // Let's commit the interstitial navigation.
|
| @@ -1941,6 +1946,7 @@
|
| TestInterstitialPageStateGuard state_guard(interstitial);
|
| interstitial->Show();
|
| // The interstitial should not show until its navigation has committed.
|
| + EXPECT_FALSE(interstitial->is_showing());
|
| EXPECT_FALSE(contents()->ShowingInterstitialPage());
|
| EXPECT_EQ(nullptr, contents()->GetInterstitialPage());
|
| // Let's commit the interstitial navigation.
|
| @@ -2325,7 +2331,7 @@
|
| const GURL url("http://www.google.com");
|
| controller().LoadURL(
|
| url, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string());
|
| - EXPECT_FALSE(contents()->ShowingInterstitialPage());
|
| + EXPECT_FALSE(interstitial->is_showing());
|
| RunAllPendingInMessageLoop();
|
| ASSERT_FALSE(deleted);
|
|
|
| @@ -2697,20 +2703,22 @@
|
|
|
| // With no capturers, setting and un-setting occlusion should change the
|
| // view's occlusion state.
|
| - EXPECT_TRUE(view->IsShowing());
|
| + EXPECT_FALSE(view->is_showing());
|
| + contents()->WasShown();
|
| + EXPECT_TRUE(view->is_showing());
|
| contents()->WasHidden();
|
| - EXPECT_FALSE(view->IsShowing());
|
| + EXPECT_FALSE(view->is_showing());
|
| contents()->WasShown();
|
| - EXPECT_TRUE(view->IsShowing());
|
| + EXPECT_TRUE(view->is_showing());
|
|
|
| // Add a capturer and try to hide the contents. The view will remain visible.
|
| contents()->IncrementCapturerCount(gfx::Size());
|
| contents()->WasHidden();
|
| - EXPECT_TRUE(view->IsShowing());
|
| + EXPECT_TRUE(view->is_showing());
|
|
|
| // Remove the capturer, and the WasHidden should take effect.
|
| contents()->DecrementCapturerCount();
|
| - EXPECT_FALSE(view->IsShowing());
|
| + EXPECT_FALSE(view->is_showing());
|
| }
|
|
|
| TEST_F(WebContentsImplTest, CapturerPreventsOcclusion) {
|
|
|