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

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

Issue 23618036: Merge NOTIFICATION_RENDER_VIEW_HOST_CHANGED into NOTIFICATION_WEB_CONTENTS_SWAPPED. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 2 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: content/browser/web_contents/render_view_host_manager_unittest.cc
diff --git a/content/browser/web_contents/render_view_host_manager_unittest.cc b/content/browser/web_contents/render_view_host_manager_unittest.cc
index 7e071f177e42627df2f53937c3a35d71cb54b2f0..17ac84bc3ac8d186db27b2f7be5fc956f58cc91e 100644
--- a/content/browser/web_contents/render_view_host_manager_unittest.cc
+++ b/content/browser/web_contents/render_view_host_manager_unittest.cc
@@ -584,9 +584,8 @@ TEST_F(RenderViewHostManagerTest, Navigate) {
scoped_ptr<TestWebContents> web_contents(
TestWebContents::Create(browser_context(), instance));
- notifications.ListenFor(
- NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- Source<NavigationController>(&web_contents->GetController()));
+ notifications.ListenFor(NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
+ Source<WebContents>(web_contents.get()));
// Create.
RenderViewHostManager manager(web_contents.get(), web_contents.get(),
@@ -662,8 +661,8 @@ TEST_F(RenderViewHostManagerTest, Navigate) {
EXPECT_FALSE(manager.pending_render_view_host());
// We should observe a notification.
- EXPECT_TRUE(notifications.Check1AndReset(
- NOTIFICATION_RENDER_VIEW_HOST_CHANGED));
+ EXPECT_TRUE(
+ notifications.Check1AndReset(NOTIFICATION_RENDER_VIEW_HOST_CHANGED));
}
// Tests the Navigate function. In this unit test we verify that the Navigate
@@ -677,9 +676,8 @@ TEST_F(RenderViewHostManagerTest, NavigateWithEarlyReNavigation) {
scoped_ptr<TestWebContents> web_contents(
TestWebContents::Create(browser_context(), instance));
- notifications.ListenFor(
- NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- Source<NavigationController>(&web_contents->GetController()));
+ notifications.ListenFor(NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
+ Source<WebContents>(web_contents.get()));
// Create.
RenderViewHostManager manager(web_contents.get(), web_contents.get(),
@@ -700,8 +698,8 @@ TEST_F(RenderViewHostManagerTest, NavigateWithEarlyReNavigation) {
EXPECT_FALSE(manager.pending_render_view_host());
// We should observe a notification.
- EXPECT_TRUE(notifications.Check1AndReset(
- NOTIFICATION_RENDER_VIEW_HOST_CHANGED));
+ EXPECT_TRUE(
+ notifications.Check1AndReset(NOTIFICATION_RENDER_VIEW_HOST_CHANGED));
notifications.Reset();
// Commit.
@@ -814,8 +812,8 @@ TEST_F(RenderViewHostManagerTest, NavigateWithEarlyReNavigation) {
EXPECT_FALSE(manager.pending_render_view_host());
// We should observe a notification.
- EXPECT_TRUE(notifications.Check1AndReset(
- NOTIFICATION_RENDER_VIEW_HOST_CHANGED));
+ EXPECT_TRUE(
+ notifications.Check1AndReset(NOTIFICATION_RENDER_VIEW_HOST_CHANGED));
}
// Tests WebUI creation.
@@ -1242,9 +1240,8 @@ TEST_F(RenderViewHostManagerTest, NavigateWithEarlyClose) {
scoped_ptr<TestWebContents> web_contents(
TestWebContents::Create(browser_context(), instance));
web_contents->SetDelegate(&delegate);
- notifications.ListenFor(
- NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- Source<NavigationController>(&web_contents->GetController()));
+ notifications.ListenFor(NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
+ Source<WebContents>(web_contents.get()));
// Create.
RenderViewHostManager manager(web_contents.get(), web_contents.get(),
@@ -1265,8 +1262,8 @@ TEST_F(RenderViewHostManagerTest, NavigateWithEarlyClose) {
EXPECT_FALSE(manager.pending_render_view_host());
// We should observe a notification.
- EXPECT_TRUE(notifications.Check1AndReset(
- NOTIFICATION_RENDER_VIEW_HOST_CHANGED));
+ EXPECT_TRUE(
+ notifications.Check1AndReset(NOTIFICATION_RENDER_VIEW_HOST_CHANGED));
notifications.Reset();
// Commit.
« no previous file with comments | « content/browser/web_contents/render_view_host_manager.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698