Chromium Code Reviews| Index: chrome/browser/google/google_url_tracker_unittest.cc |
| diff --git a/chrome/browser/google/google_url_tracker_unittest.cc b/chrome/browser/google/google_url_tracker_unittest.cc |
| index 1ebe61369cfad3fc5d09681fe5f7d55e12707313..766b62dbb18818e0b8577a94eeea079c123e81a1 100644 |
| --- a/chrome/browser/google/google_url_tracker_unittest.cc |
| +++ b/chrome/browser/google/google_url_tracker_unittest.cc |
| @@ -62,37 +62,46 @@ class TestInfoBarDelegate : public GoogleURLTrackerInfoBarDelegate { |
| // The member function definitions come after the declaration of |
| // GoogleURLTrackerTest, so they can call members on it. |
|
Peter Kasting
2014/05/16 23:23:45
Nit: Preserve two blank lines here
blundell
2014/05/17 11:25:36
Done.
|
| +// TestCallbackListener --------------------------------------------------- |
| -// TestNotificationObserver --------------------------------------------------- |
| - |
| -class TestNotificationObserver : public content::NotificationObserver { |
| +class TestCallbackListener { |
| public: |
| - TestNotificationObserver(); |
| - virtual ~TestNotificationObserver(); |
| + TestCallbackListener(); |
| + virtual ~TestCallbackListener(); |
| + |
| + bool HasRegisteredCallback(); |
| + void RegisterCallback(GoogleURLTracker* google_url_tracker); |
| - virtual void Observe(int type, |
| - const content::NotificationSource& source, |
| - const content::NotificationDetails& details) OVERRIDE; |
| bool notified() const { return notified_; } |
| void clear_notified() { notified_ = false; } |
| private: |
| + void OnGoogleURLUpdated(GURL old_url, GURL new_url); |
| + |
| bool notified_; |
| + scoped_ptr<GoogleURLTracker::Subscription> google_url_updated_subscription_; |
| }; |
| -TestNotificationObserver::TestNotificationObserver() : notified_(false) { |
| +TestCallbackListener::TestCallbackListener() : notified_(false) { |
| } |
| -TestNotificationObserver::~TestNotificationObserver() { |
| +TestCallbackListener::~TestCallbackListener() { |
| } |
| -void TestNotificationObserver::Observe( |
| - int type, |
| - const content::NotificationSource& source, |
| - const content::NotificationDetails& details) { |
| +void TestCallbackListener::OnGoogleURLUpdated(GURL old_url, GURL new_url) { |
| notified_ = true; |
| } |
| +bool TestCallbackListener::HasRegisteredCallback() { |
| + return google_url_updated_subscription_.get(); |
| +} |
| + |
| +void TestCallbackListener::RegisterCallback( |
| + GoogleURLTracker* google_url_tracker) { |
| + google_url_updated_subscription_ = |
| + google_url_tracker->RegisterCallback(base::Bind( |
| + &TestCallbackListener::OnGoogleURLUpdated, base::Unretained(this))); |
| +} |
| // TestGoogleURLTrackerNavigationHelper ------------------------------------- |
| @@ -232,8 +241,8 @@ class GoogleURLTrackerTest : public testing::Test { |
| GoogleURLTrackerInfoBarDelegate* GetInfoBarDelegate(intptr_t unique_id); |
| void ExpectDefaultURLs() const; |
| void ExpectListeningForCommit(intptr_t unique_id, bool listening); |
| - bool observer_notified() const { return observer_.notified(); } |
| - void clear_observer_notified() { observer_.clear_notified(); } |
| + bool listener_notified() const { return listener_.notified(); } |
| + void clear_listener_notified() { listener_.clear_notified(); } |
| private: |
| // Since |infobar_service| is really a magic number rather than an actual |
| @@ -251,11 +260,10 @@ class GoogleURLTrackerTest : public testing::Test { |
| // net::NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(). |
| scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
| net::TestURLFetcherFactory fetcher_factory_; |
| - content::NotificationRegistrar registrar_; |
| - TestNotificationObserver observer_; |
| GoogleURLTrackerNavigationHelper* nav_helper_; |
| TestingProfile profile_; |
| scoped_ptr<GoogleURLTracker> google_url_tracker_; |
| + TestCallbackListener listener_; |
| // This tracks the different "tabs" a test has "opened", so we can close them |
| // properly before shutting down |google_url_tracker_|, which expects that. |
| std::set<int> unique_ids_seen_; |
| @@ -307,7 +315,6 @@ void GoogleURLTrackerTest::TearDown() { |
| CloseTab(*unique_ids_seen_.begin()); |
| nav_helper_ = NULL; |
| - google_url_tracker_.reset(); |
| network_change_notifier_.reset(); |
| } |
| @@ -331,12 +338,8 @@ void GoogleURLTrackerTest::MockSearchDomainCheckResponse( |
| } |
| void GoogleURLTrackerTest::RequestServerCheck() { |
| - if (!registrar_.IsRegistered(&observer_, |
| - chrome::NOTIFICATION_GOOGLE_URL_UPDATED, |
| - content::Source<Profile>(&profile_))) { |
| - registrar_.Add(&observer_, chrome::NOTIFICATION_GOOGLE_URL_UPDATED, |
| - content::Source<Profile>(&profile_)); |
| - } |
| + if (!listener_.HasRegisteredCallback()) |
| + listener_.RegisterCallback(google_url_tracker_.get()); |
| google_url_tracker_->SetNeedToFetch(); |
| } |
| @@ -507,21 +510,21 @@ TEST_F(GoogleURLTrackerTest, DontFetchWhenNoOneRequestsCheck) { |
| EXPECT_FALSE(GetFetcher()); |
| MockSearchDomainCheckResponse("http://www.google.co.uk/"); |
| ExpectDefaultURLs(); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, UpdateOnFirstRun) { |
| RequestServerCheck(); |
| EXPECT_FALSE(GetFetcher()); |
| ExpectDefaultURLs(); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| FinishSleep(); |
| MockSearchDomainCheckResponse("http://www.google.co.uk/"); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), fetched_google_url()); |
| // GoogleURL should be updated, becase there was no last prompted URL. |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), google_url()); |
| - EXPECT_TRUE(observer_notified()); |
| + EXPECT_TRUE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, DontUpdateWhenUnchanged) { |
| @@ -530,7 +533,7 @@ TEST_F(GoogleURLTrackerTest, DontUpdateWhenUnchanged) { |
| RequestServerCheck(); |
| EXPECT_FALSE(GetFetcher()); |
| ExpectDefaultURLs(); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| FinishSleep(); |
| MockSearchDomainCheckResponse("http://www.google.co.uk/"); |
| @@ -538,7 +541,7 @@ TEST_F(GoogleURLTrackerTest, DontUpdateWhenUnchanged) { |
| // GoogleURL should not be updated, because the fetched and prompted URLs |
| // match. |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, DontPromptOnBadReplies) { |
| @@ -547,14 +550,14 @@ TEST_F(GoogleURLTrackerTest, DontPromptOnBadReplies) { |
| RequestServerCheck(); |
| EXPECT_FALSE(GetFetcher()); |
| ExpectDefaultURLs(); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| // Old-style domain string. |
| FinishSleep(); |
| MockSearchDomainCheckResponse(".google.co.in"); |
| EXPECT_EQ(GURL(), fetched_google_url()); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| SetNavigationPending(1, true); |
| CommitSearch(1, GURL("http://www.google.co.uk/search?q=test")); |
| EXPECT_TRUE(GetMapEntry(1) == NULL); |
| @@ -564,7 +567,7 @@ TEST_F(GoogleURLTrackerTest, DontPromptOnBadReplies) { |
| MockSearchDomainCheckResponse("http://mail.google.com/"); |
| EXPECT_EQ(GURL(), fetched_google_url()); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| SetNavigationPending(1, true); |
| CommitSearch(1, GURL("http://www.google.co.uk/search?q=test")); |
| EXPECT_TRUE(GetMapEntry(1) == NULL); |
| @@ -574,7 +577,7 @@ TEST_F(GoogleURLTrackerTest, DontPromptOnBadReplies) { |
| MockSearchDomainCheckResponse("http://www.google.com/search"); |
| EXPECT_EQ(GURL(), fetched_google_url()); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| SetNavigationPending(1, true); |
| CommitSearch(1, GURL("http://www.google.co.uk/search?q=test")); |
| EXPECT_TRUE(GetMapEntry(1) == NULL); |
| @@ -584,7 +587,7 @@ TEST_F(GoogleURLTrackerTest, DontPromptOnBadReplies) { |
| MockSearchDomainCheckResponse("http://www.google.com/?q=foo"); |
| EXPECT_EQ(GURL(), fetched_google_url()); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| SetNavigationPending(1, true); |
| CommitSearch(1, GURL("http://www.google.co.uk/search?q=test")); |
| EXPECT_TRUE(GetMapEntry(1) == NULL); |
| @@ -594,7 +597,7 @@ TEST_F(GoogleURLTrackerTest, DontPromptOnBadReplies) { |
| MockSearchDomainCheckResponse("http://www.google.com/#anchor"); |
| EXPECT_EQ(GURL(), fetched_google_url()); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| SetNavigationPending(1, true); |
| CommitSearch(1, GURL("http://www.google.co.uk/search?q=test")); |
| EXPECT_TRUE(GetMapEntry(1) == NULL); |
| @@ -604,7 +607,7 @@ TEST_F(GoogleURLTrackerTest, DontPromptOnBadReplies) { |
| MockSearchDomainCheckResponse("HJ)*qF)_*&@f1"); |
| EXPECT_EQ(GURL(), fetched_google_url()); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| SetNavigationPending(1, true); |
| CommitSearch(1, GURL("http://www.google.co.uk/search?q=test")); |
| EXPECT_TRUE(GetMapEntry(1) == NULL); |
| @@ -619,7 +622,7 @@ TEST_F(GoogleURLTrackerTest, UpdatePromptedURLOnReturnToPreviousLocation) { |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), fetched_google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), GetLastPromptedGoogleURL()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, SilentlyAcceptSchemeChange) { |
| @@ -633,14 +636,14 @@ TEST_F(GoogleURLTrackerTest, SilentlyAcceptSchemeChange) { |
| EXPECT_EQ(GURL("https://www.google.co.uk/"), fetched_google_url()); |
| EXPECT_EQ(GURL("https://www.google.co.uk/"), google_url()); |
| EXPECT_EQ(GURL("https://www.google.co.uk/"), GetLastPromptedGoogleURL()); |
| - EXPECT_TRUE(observer_notified()); |
| + EXPECT_TRUE(listener_notified()); |
| NotifyIPAddressChanged(); |
| MockSearchDomainCheckResponse("http://www.google.co.uk/"); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), fetched_google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), GetLastPromptedGoogleURL()); |
| - EXPECT_TRUE(observer_notified()); |
| + EXPECT_TRUE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, RefetchOnIPAddressChange) { |
| @@ -649,15 +652,15 @@ TEST_F(GoogleURLTrackerTest, RefetchOnIPAddressChange) { |
| MockSearchDomainCheckResponse("http://www.google.co.uk/"); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), fetched_google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), google_url()); |
| - EXPECT_TRUE(observer_notified()); |
| - clear_observer_notified(); |
| + EXPECT_TRUE(listener_notified()); |
| + clear_listener_notified(); |
| NotifyIPAddressChanged(); |
| MockSearchDomainCheckResponse("http://www.google.co.in/"); |
| EXPECT_EQ(GURL("http://www.google.co.in/"), fetched_google_url()); |
| // Just fetching a new URL shouldn't reset things without a prompt. |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), google_url()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, DontRefetchWhenNoOneRequestsCheck) { |
| @@ -667,7 +670,7 @@ TEST_F(GoogleURLTrackerTest, DontRefetchWhenNoOneRequestsCheck) { |
| EXPECT_FALSE(GetFetcher()); |
| MockSearchDomainCheckResponse("http://www.google.co.uk/"); |
| ExpectDefaultURLs(); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, FetchOnLateRequest) { |
| @@ -681,7 +684,7 @@ TEST_F(GoogleURLTrackerTest, FetchOnLateRequest) { |
| MockSearchDomainCheckResponse("http://www.google.co.uk/"); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), fetched_google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), google_url()); |
| - EXPECT_TRUE(observer_notified()); |
| + EXPECT_TRUE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, DontFetchTwiceOnLateRequests) { |
| @@ -695,8 +698,8 @@ TEST_F(GoogleURLTrackerTest, DontFetchTwiceOnLateRequests) { |
| MockSearchDomainCheckResponse("http://www.google.co.uk/"); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), fetched_google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), google_url()); |
| - EXPECT_TRUE(observer_notified()); |
| - clear_observer_notified(); |
| + EXPECT_TRUE(listener_notified()); |
| + clear_listener_notified(); |
| RequestServerCheck(); |
| // The second request should be ignored. |
| @@ -704,7 +707,7 @@ TEST_F(GoogleURLTrackerTest, DontFetchTwiceOnLateRequests) { |
| MockSearchDomainCheckResponse("http://www.google.co.in/"); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), fetched_google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), google_url()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, SearchingDoesNothingIfNoNeedToPrompt) { |
| @@ -714,8 +717,8 @@ TEST_F(GoogleURLTrackerTest, SearchingDoesNothingIfNoNeedToPrompt) { |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), fetched_google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), GetLastPromptedGoogleURL()); |
| - EXPECT_TRUE(observer_notified()); |
| - clear_observer_notified(); |
| + EXPECT_TRUE(listener_notified()); |
| + clear_listener_notified(); |
| SetNavigationPending(1, true); |
| CommitSearch(1, GURL("http://www.google.co.uk/search?q=test")); |
| @@ -723,7 +726,7 @@ TEST_F(GoogleURLTrackerTest, SearchingDoesNothingIfNoNeedToPrompt) { |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), fetched_google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), GetLastPromptedGoogleURL()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, TabClosedOnPendingSearch) { |
| @@ -734,7 +737,7 @@ TEST_F(GoogleURLTrackerTest, TabClosedOnPendingSearch) { |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.jp/"), fetched_google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), GetLastPromptedGoogleURL()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| SetNavigationPending(1, true); |
| GoogleURLTrackerMapEntry* map_entry = GetMapEntry(1); |
| @@ -742,13 +745,13 @@ TEST_F(GoogleURLTrackerTest, TabClosedOnPendingSearch) { |
| EXPECT_FALSE(map_entry->has_infobar_delegate()); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), GetLastPromptedGoogleURL()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| CloseTab(1); |
| EXPECT_TRUE(GetMapEntry(1) == NULL); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), GetLastPromptedGoogleURL()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, TabClosedOnCommittedSearch) { |
| @@ -765,7 +768,7 @@ TEST_F(GoogleURLTrackerTest, TabClosedOnCommittedSearch) { |
| EXPECT_TRUE(GetMapEntry(1) == NULL); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), GetLastPromptedGoogleURL()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, InfoBarClosed) { |
| @@ -783,7 +786,7 @@ TEST_F(GoogleURLTrackerTest, InfoBarClosed) { |
| EXPECT_TRUE(GetMapEntry(1) == NULL); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), GetLastPromptedGoogleURL()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, InfoBarRefused) { |
| @@ -801,7 +804,7 @@ TEST_F(GoogleURLTrackerTest, InfoBarRefused) { |
| EXPECT_TRUE(GetMapEntry(1) == NULL); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.jp/"), GetLastPromptedGoogleURL()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, InfoBarAccepted) { |
| @@ -819,7 +822,7 @@ TEST_F(GoogleURLTrackerTest, InfoBarAccepted) { |
| EXPECT_TRUE(GetMapEntry(1) == NULL); |
| EXPECT_EQ(GURL("http://www.google.co.jp/"), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.jp/"), GetLastPromptedGoogleURL()); |
| - EXPECT_TRUE(observer_notified()); |
| + EXPECT_TRUE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, FetchesCanAutomaticallyCloseInfoBars) { |
| @@ -942,7 +945,7 @@ TEST_F(GoogleURLTrackerTest, NavigationsAfterPendingSearch) { |
| EXPECT_TRUE(map_entry->has_infobar_delegate()); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), GetLastPromptedGoogleURL()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| ASSERT_NO_FATAL_FAILURE(ExpectListeningForCommit(1, false)); |
| } |
| @@ -1014,7 +1017,7 @@ TEST_F(GoogleURLTrackerTest, NavigationsAfterCommittedSearch) { |
| ASSERT_NO_FATAL_FAILURE(ExpectListeningForCommit(1, false)); |
| EXPECT_EQ(GURL(GoogleURLTracker::kDefaultGoogleHomepage), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.uk/"), GetLastPromptedGoogleURL()); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, MultipleMapEntries) { |
| @@ -1052,7 +1055,7 @@ TEST_F(GoogleURLTrackerTest, MultipleMapEntries) { |
| delegate2->Close(false); |
| EXPECT_TRUE(GetMapEntry(2) == NULL); |
| - EXPECT_FALSE(observer_notified()); |
| + EXPECT_FALSE(listener_notified()); |
| delegate4->Accept(); |
| EXPECT_TRUE(GetMapEntry(1) == NULL); |
| @@ -1060,7 +1063,7 @@ TEST_F(GoogleURLTrackerTest, MultipleMapEntries) { |
| EXPECT_TRUE(GetMapEntry(4) == NULL); |
| EXPECT_EQ(GURL("http://www.google.co.jp/"), google_url()); |
| EXPECT_EQ(GURL("http://www.google.co.jp/"), GetLastPromptedGoogleURL()); |
| - EXPECT_TRUE(observer_notified()); |
| + EXPECT_TRUE(listener_notified()); |
| } |
| TEST_F(GoogleURLTrackerTest, IgnoreIrrelevantNavigation) { |