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

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

Issue 1713473002: Make TestRenderWidgetHostView::Show/Hide call through to RWHI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@crash
Patch Set: Tentatively undo render_widget_host_view_base.cc modification Created 3 years, 10 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 | « components/visitedlink/test/visitedlink_unittest.cc ('k') | content/public/test/test_renderer_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 53a86d7cd7902c39816404fbd63203f49f0c0da2..011be070c233414281996b07d2443a9e14d8156d 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 @@ class TestInterstitialPage : public InterstitialPageImpl {
bool is_showing() const {
return static_cast<TestRenderWidgetHostView*>(
GetMainFrame()->GetRenderViewHost()->GetWidget()->GetView())
- ->is_showing();
+ ->IsShowing();
}
void ClearStates() {
@@ -1684,7 +1684,6 @@ 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_FALSE(contents()->ShowingInterstitialPage());
EXPECT_EQ(nullptr, contents()->GetInterstitialPage());
// Let's commit the interstitial navigation.
@@ -1732,7 +1731,6 @@ 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_FALSE(contents()->ShowingInterstitialPage());
EXPECT_EQ(nullptr, contents()->GetInterstitialPage());
// Let's commit the interstitial navigation.
@@ -1777,7 +1775,6 @@ 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_FALSE(contents()->ShowingInterstitialPage());
EXPECT_EQ(nullptr, contents()->GetInterstitialPage());
// Let's commit the interstitial navigation.
@@ -1829,7 +1826,6 @@ 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_FALSE(contents()->ShowingInterstitialPage());
EXPECT_EQ(nullptr, contents()->GetInterstitialPage());
// Let's commit the interstitial navigation.
@@ -1889,7 +1885,6 @@ 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_FALSE(contents()->ShowingInterstitialPage());
EXPECT_EQ(nullptr, contents()->GetInterstitialPage());
// Let's commit the interstitial navigation.
@@ -1946,7 +1941,6 @@ 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_FALSE(contents()->ShowingInterstitialPage());
EXPECT_EQ(nullptr, contents()->GetInterstitialPage());
// Let's commit the interstitial navigation.
@@ -2331,7 +2325,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);
@@ -2703,22 +2697,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) {
« no previous file with comments | « components/visitedlink/test/visitedlink_unittest.cc ('k') | content/public/test/test_renderer_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698