OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/google/google_url_tracker.h" | 5 #include "chrome/browser/google/google_url_tracker.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 // TestNotificationObserver --------------------------------------------------- | 67 // TestNotificationObserver --------------------------------------------------- |
68 | 68 |
69 class TestNotificationObserver : public content::NotificationObserver { | 69 class TestNotificationObserver : public content::NotificationObserver { |
70 public: | 70 public: |
71 TestNotificationObserver(); | 71 TestNotificationObserver(); |
72 virtual ~TestNotificationObserver(); | 72 virtual ~TestNotificationObserver(); |
73 | 73 |
74 virtual void Observe(int type, | 74 virtual void Observe(int type, |
75 const content::NotificationSource& source, | 75 const content::NotificationSource& source, |
76 const content::NotificationDetails& details); | 76 const content::NotificationDetails& details) OVERRIDE; |
77 bool notified() const { return notified_; } | 77 bool notified() const { return notified_; } |
78 void clear_notified() { notified_ = false; } | 78 void clear_notified() { notified_ = false; } |
79 | 79 |
80 private: | 80 private: |
81 bool notified_; | 81 bool notified_; |
82 }; | 82 }; |
83 | 83 |
84 TestNotificationObserver::TestNotificationObserver() : notified_(false) { | 84 TestNotificationObserver::TestNotificationObserver() : notified_(false) { |
85 } | 85 } |
86 | 86 |
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 CommitSearch(2, GURL("http://www.google.co.uk/search?q=test2")); | 1050 CommitSearch(2, GURL("http://www.google.co.uk/search?q=test2")); |
1051 EXPECT_FALSE(GetInfoBar(1) == NULL); | 1051 EXPECT_FALSE(GetInfoBar(1) == NULL); |
1052 GoogleURLTrackerInfoBarDelegate* infobar2 = GetInfoBar(2); | 1052 GoogleURLTrackerInfoBarDelegate* infobar2 = GetInfoBar(2); |
1053 ASSERT_FALSE(infobar2 == NULL); | 1053 ASSERT_FALSE(infobar2 == NULL); |
1054 SetNavigationPending(1, true); | 1054 SetNavigationPending(1, true); |
1055 ASSERT_NO_FATAL_FAILURE(ExpectListeningForCommit(1, true)); | 1055 ASSERT_NO_FATAL_FAILURE(ExpectListeningForCommit(1, true)); |
1056 infobar2->Close(false); | 1056 infobar2->Close(false); |
1057 SetNavigationPending(1, false); | 1057 SetNavigationPending(1, false); |
1058 ASSERT_NO_FATAL_FAILURE(ExpectListeningForCommit(1, false)); | 1058 ASSERT_NO_FATAL_FAILURE(ExpectListeningForCommit(1, false)); |
1059 } | 1059 } |
OLD | NEW |