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

Unified Diff: chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc

Issue 1374053002: Remove AboutToNavigateRenderFrame, issue custom notification for DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased, win test fix Created 5 years, 3 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/ui/sync/one_click_signin_sync_observer_unittest.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc b/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc
index b7f43a88a77f6a788c0de99b3b11aedeaeb92983..0926aa5025a436f29f8bce50da167eb3d0879510 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc
@@ -39,8 +39,8 @@ class MockWebContentsObserver : public content::WebContentsObserver {
// to the continue URL. Navigations in unit_tests never complete, but a
// navigation start is a sufficient signal for the purposes of this test.
// Listening for this call also has the advantage of being synchronous.
- MOCK_METHOD2(AboutToNavigateRenderFrame, void(content::RenderFrameHost*,
- content::RenderFrameHost*));
+ MOCK_METHOD2(DidStartNavigationToPendingEntry,
+ void(const GURL&, content::NavigationController::ReloadType));
};
class OneClickTestProfileSyncService : public TestProfileSyncService {
@@ -170,7 +170,7 @@ TEST_F(OneClickSigninSyncObserverTest, NoSyncService_RedirectsImmediately) {
profile(), BuildNullService));
// The observer should immediately redirect to the continue URL.
- EXPECT_CALL(*web_contents_observer_, AboutToNavigateRenderFrame(_, _));
+ EXPECT_CALL(*web_contents_observer_, DidStartNavigationToPendingEntry(_, _));
CreateSyncObserver(kContinueUrl);
EXPECT_EQ(GURL(kContinueUrl), web_contents()->GetVisibleURL());
@@ -183,7 +183,7 @@ TEST_F(OneClickSigninSyncObserverTest, NoSyncService_RedirectsImmediately) {
// firing, the observer cleans up its memory without loading the continue URL.
TEST_F(OneClickSigninSyncObserverTest, WebContentsDestroyed) {
EXPECT_CALL(*web_contents_observer_,
- AboutToNavigateRenderFrame(_, _)).Times(0);
+ DidStartNavigationToPendingEntry(_, _)).Times(0);
CreateSyncObserver(kContinueUrl);
SetContents(NULL);
}
@@ -196,7 +196,7 @@ TEST_F(OneClickSigninSyncObserverTest,
sync_service_->set_first_setup_in_progress(false);
sync_service_->set_sync_active(true);
- EXPECT_CALL(*web_contents_observer_, AboutToNavigateRenderFrame(_, _));
+ EXPECT_CALL(*web_contents_observer_, DidStartNavigationToPendingEntry(_, _));
sync_service_->NotifyObservers();
EXPECT_EQ(GURL(kContinueUrl), web_contents()->GetVisibleURL());
}
@@ -210,7 +210,7 @@ TEST_F(OneClickSigninSyncObserverTest,
sync_service_->set_sync_active(false);
EXPECT_CALL(*web_contents_observer_,
- AboutToNavigateRenderFrame(_, _)).Times(0);
+ DidStartNavigationToPendingEntry(_, _)).Times(0);
sync_service_->NotifyObservers();
EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL());
}
@@ -224,7 +224,7 @@ TEST_F(OneClickSigninSyncObserverTest,
sync_service_->set_sync_active(false);
EXPECT_CALL(*web_contents_observer_,
- AboutToNavigateRenderFrame(_, _)).Times(0);
+ DidStartNavigationToPendingEntry(_, _)).Times(0);
sync_service_->NotifyObservers();
EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL());
@@ -243,7 +243,7 @@ TEST_F(OneClickSigninSyncObserverTest,
sync_service_->set_sync_active(true);
EXPECT_CALL(*web_contents_observer_,
- AboutToNavigateRenderFrame(_, _)).Times(0);
+ DidStartNavigationToPendingEntry(_, _)).Times(0);
sync_service_->NotifyObservers();
EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL());
}
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.cc ('k') | content/browser/devtools/protocol/devtools_protocol_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698