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

Unified Diff: chrome/browser/push_messaging/push_messaging_notification_manager_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
Index: chrome/browser/push_messaging/push_messaging_notification_manager_unittest.cc
diff --git a/chrome/browser/push_messaging/push_messaging_notification_manager_unittest.cc b/chrome/browser/push_messaging/push_messaging_notification_manager_unittest.cc
index f6c8556e3ca45e2224c2ccf82f89484aa004e58d..a1fdaff1deb4ee38c3636431b065d01f534f69e8 100644
--- a/chrome/browser/push_messaging/push_messaging_notification_manager_unittest.cc
+++ b/chrome/browser/push_messaging/push_messaging_notification_manager_unittest.cc
@@ -6,8 +6,8 @@
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
+#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/test/test_renderer_host.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -25,10 +25,10 @@ TEST_F(PushMessagingNotificationManagerTest, IsTabVisible) {
GURL("https://chrome.com/")));
EXPECT_TRUE(manager.IsTabVisible(profile(), web_contents(), origin));
- content::RenderViewHostTester::For(rvh())->SimulateWasHidden();
+ web_contents()->GetRenderWidgetHostView()->Hide();
EXPECT_FALSE(manager.IsTabVisible(profile(), web_contents(), origin));
- content::RenderViewHostTester::For(rvh())->SimulateWasShown();
+ web_contents()->GetRenderWidgetHostView()->Show();
EXPECT_TRUE(manager.IsTabVisible(profile(), web_contents(), origin));
}
@@ -43,6 +43,6 @@ TEST_F(PushMessagingNotificationManagerTest, IsTabVisibleViewSource) {
ASSERT_EQ(view_source_page, web_contents()->GetVisibleURL());
EXPECT_TRUE(manager.IsTabVisible(profile(), web_contents(), origin));
- content::RenderViewHostTester::For(rvh())->SimulateWasHidden();
+ web_contents()->GetRenderWidgetHostView()->Hide();
EXPECT_FALSE(manager.IsTabVisible(profile(), web_contents(), origin));
}

Powered by Google App Engine
This is Rietveld 408576698