Chromium Code Reviews| 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 5464042094821e5d93ca97ed05469898b28d9013..dc8c29b1486143fc873cd8a423eceaea2854037a 100644 |
| --- a/content/browser/web_contents/web_contents_impl_unittest.cc |
| +++ b/content/browser/web_contents/web_contents_impl_unittest.cc |
| @@ -157,7 +157,7 @@ class TestInterstitialPage : public InterstitialPageImpl { |
| bool is_showing() const { |
| return static_cast<TestRenderWidgetHostView*>( |
| GetMainFrame()->GetRenderViewHost()->GetWidget()->GetView()) |
| - ->is_showing(); |
| + ->IsShowing(); |
| } |
| void ClearStates() { |
| @@ -1696,7 +1696,7 @@ TEST_F(WebContentsImplTest, |
| 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_TRUE(interstitial->is_showing()); |
|
no sievers
2016/02/18 21:22:09
Agreed that this was hardcoding the wrong expectat
no sievers
2016/02/18 21:29:43
Btw feel free to file a separate bug for someone v
johnme
2016/08/11 14:11:44
I've filed https://crbug.com/636953 to ask someone
|
| EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
| EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); |
| // Let's commit the interstitial navigation. |
| @@ -1744,7 +1744,7 @@ TEST_F(WebContentsImplTest, |
| 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_TRUE(interstitial->is_showing()); |
| EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
| EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); |
| // Let's commit the interstitial navigation. |
| @@ -1789,7 +1789,7 @@ TEST_F(WebContentsImplTest, ShowInterstitialNoNewNavigationDontProceed) { |
| TestInterstitialPageStateGuard state_guard(interstitial); |
| interstitial->Show(); |
| // The interstitial should not show until its navigation has committed. |
| - EXPECT_FALSE(interstitial->is_showing()); |
| + EXPECT_TRUE(interstitial->is_showing()); |
| EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
| EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); |
| // Let's commit the interstitial navigation. |
| @@ -1841,7 +1841,7 @@ TEST_F(WebContentsImplTest, |
| 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_TRUE(interstitial->is_showing()); |
| EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
| EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); |
| // Let's commit the interstitial navigation. |
| @@ -1901,7 +1901,7 @@ TEST_F(WebContentsImplTest, |
| 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_TRUE(interstitial->is_showing()); |
| EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
| EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); |
| // Let's commit the interstitial navigation. |
| @@ -1958,7 +1958,7 @@ TEST_F(WebContentsImplTest, ShowInterstitialNoNewNavigationProceed) { |
| TestInterstitialPageStateGuard state_guard(interstitial); |
| interstitial->Show(); |
| // The interstitial should not show until its navigation has committed. |
| - EXPECT_FALSE(interstitial->is_showing()); |
| + EXPECT_TRUE(interstitial->is_showing()); |
| EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
| EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); |
| // Let's commit the interstitial navigation. |
| @@ -2343,7 +2343,7 @@ TEST_F(WebContentsImplTest, NavigateBeforeInterstitialShows) { |
| const GURL url("http://www.google.com"); |
| controller().LoadURL( |
| url, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); |
| - EXPECT_FALSE(interstitial->is_showing()); |
| + EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
| RunAllPendingInMessageLoop(); |
| ASSERT_FALSE(deleted); |
| @@ -2696,22 +2696,20 @@ TEST_F(WebContentsImplTest, CapturerPreventsHiding) { |
| // With no capturers, setting and un-setting occlusion should change the |
| // view's occlusion state. |
| - EXPECT_FALSE(view->is_showing()); |
| - contents()->WasShown(); |
| - EXPECT_TRUE(view->is_showing()); |
| + EXPECT_TRUE(view->IsShowing()); |
| contents()->WasHidden(); |
| - EXPECT_FALSE(view->is_showing()); |
| + EXPECT_FALSE(view->IsShowing()); |
| contents()->WasShown(); |
| - EXPECT_TRUE(view->is_showing()); |
| + EXPECT_TRUE(view->IsShowing()); |
| // Add a capturer and try to hide the contents. The view will remain visible. |
| contents()->IncrementCapturerCount(gfx::Size()); |
| contents()->WasHidden(); |
| - EXPECT_TRUE(view->is_showing()); |
| + EXPECT_TRUE(view->IsShowing()); |
| // Remove the capturer, and the WasHidden should take effect. |
| contents()->DecrementCapturerCount(); |
| - EXPECT_FALSE(view->is_showing()); |
| + EXPECT_FALSE(view->IsShowing()); |
| } |
| TEST_F(WebContentsImplTest, CapturerPreventsOcclusion) { |