OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/google/core/browser/google_url_tracker.h" | 5 #include "components/google/core/browser/google_url_tracker.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 return unique_id_; | 200 return unique_id_; |
201 } | 201 } |
202 | 202 |
203 } // namespace | 203 } // namespace |
204 | 204 |
205 // GoogleURLTrackerTest ------------------------------------------------------- | 205 // GoogleURLTrackerTest ------------------------------------------------------- |
206 | 206 |
207 class GoogleURLTrackerTest : public testing::Test { | 207 class GoogleURLTrackerTest : public testing::Test { |
208 protected: | 208 protected: |
209 GoogleURLTrackerTest(); | 209 GoogleURLTrackerTest(); |
210 virtual ~GoogleURLTrackerTest(); | 210 ~GoogleURLTrackerTest() override; |
211 | 211 |
212 // testing::Test | 212 // testing::Test |
213 virtual void SetUp() override; | 213 void SetUp() override; |
214 virtual void TearDown() override; | 214 void TearDown() override; |
215 | 215 |
216 net::TestURLFetcher* GetFetcher(); | 216 net::TestURLFetcher* GetFetcher(); |
217 void MockSearchDomainCheckResponse(const std::string& domain); | 217 void MockSearchDomainCheckResponse(const std::string& domain); |
218 void RequestServerCheck(); | 218 void RequestServerCheck(); |
219 void FinishSleep(); | 219 void FinishSleep(); |
220 void NotifyNetworkChanged(); | 220 void NotifyNetworkChanged(); |
221 GURL fetched_google_url() const { | 221 GURL fetched_google_url() const { |
222 return google_url_tracker_->fetched_google_url(); | 222 return google_url_tracker_->fetched_google_url(); |
223 } | 223 } |
224 void set_google_url(const GURL& url) { | 224 void set_google_url(const GURL& url) { |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 EXPECT_FALSE(GetInfoBarDelegate(&infobar_manager) == NULL); | 1044 EXPECT_FALSE(GetInfoBarDelegate(&infobar_manager) == NULL); |
1045 GoogleURLTrackerInfoBarDelegate* delegate2 = | 1045 GoogleURLTrackerInfoBarDelegate* delegate2 = |
1046 GetInfoBarDelegate(&infobar_manager2); | 1046 GetInfoBarDelegate(&infobar_manager2); |
1047 ASSERT_FALSE(delegate2 == NULL); | 1047 ASSERT_FALSE(delegate2 == NULL); |
1048 SetNavigationPending(&infobar_manager, true); | 1048 SetNavigationPending(&infobar_manager, true); |
1049 ASSERT_NO_FATAL_FAILURE(ExpectListeningForCommit(&infobar_manager, true)); | 1049 ASSERT_NO_FATAL_FAILURE(ExpectListeningForCommit(&infobar_manager, true)); |
1050 delegate2->Close(false); | 1050 delegate2->Close(false); |
1051 SetNavigationPending(&infobar_manager, false); | 1051 SetNavigationPending(&infobar_manager, false); |
1052 ASSERT_NO_FATAL_FAILURE(ExpectListeningForCommit(&infobar_manager, false)); | 1052 ASSERT_NO_FATAL_FAILURE(ExpectListeningForCommit(&infobar_manager, false)); |
1053 } | 1053 } |
OLD | NEW |