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

Unified Diff: chrome/test/base/ui_test_utils.cc

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
« no previous file with comments | « chrome/test/base/ui_test_utils.h ('k') | chrome/test/reliability/page_load_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/ui_test_utils.cc
===================================================================
--- chrome/test/base/ui_test_utils.cc (revision 106380)
+++ chrome/test/base/ui_test_utils.cc (working copy)
@@ -46,6 +46,7 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -291,7 +292,7 @@
Browser* WaitForNewBrowser() {
TestNotificationObserver observer;
RegisterAndWait(&observer, chrome::NOTIFICATION_BROWSER_WINDOW_READY,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
return content::Source<Browser>(observer.source()).ptr();
}
@@ -314,7 +315,8 @@
}
void NavigateToURL(browser::NavigateParams* params) {
- TestNavigationObserver observer(NotificationService::AllSources(), NULL, 1);
+ TestNavigationObserver observer(
+ content::NotificationService::AllSources(), NULL, 1);
browser::Navigate(params);
observer.WaitForObservation();
}
@@ -349,7 +351,7 @@
WindowedNotificationObserver tab_added_observer(
content::NOTIFICATION_TAB_ADDED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
browser->OpenURL(url, GURL(), disposition, content::PAGE_TRANSITION_TYPED);
if (browser_test_flags & BROWSER_TEST_WAIT_FOR_BROWSER)
@@ -490,7 +492,7 @@
AppModalDialog* WaitForAppModalDialog() {
TestNotificationObserver observer;
RegisterAndWait(&observer, chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
return content::Source<AppModalDialog>(observer.source()).ptr();
}
@@ -555,7 +557,7 @@
browser->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS);
WindowedNotificationObserver history_loaded_observer(
chrome::NOTIFICATION_HISTORY_LOADED,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
if (!history_service->BackendLoaded())
history_loaded_observer.Wait();
}
@@ -769,7 +771,7 @@
}
TestNotificationObserver::TestNotificationObserver()
- : source_(NotificationService::AllSources()) {
+ : source_(content::NotificationService::AllSources()) {
}
TestNotificationObserver::~TestNotificationObserver() {}
@@ -795,7 +797,7 @@
WindowedNotificationObserver::~WindowedNotificationObserver() {}
void WindowedNotificationObserver::Wait() {
- if (seen_ || (waiting_for_ == NotificationService::AllSources() &&
+ if (seen_ || (waiting_for_ == content::NotificationService::AllSources() &&
!sources_seen_.empty())) {
return;
}
@@ -809,7 +811,7 @@
const content::NotificationSource& source,
const content::NotificationDetails& details) {
if (waiting_for_ == source ||
- (running_ && waiting_for_ == NotificationService::AllSources())) {
+ (running_ && waiting_for_ == content::NotificationService::AllSources())) {
seen_ = true;
if (running_)
MessageLoopForUI::current()->Quit();
@@ -883,7 +885,7 @@
DOMMessageQueue::DOMMessageQueue() {
registrar_.Add(this, chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
- NotificationService::AllSources());
+ content::NotificationService::AllSources());
}
DOMMessageQueue::~DOMMessageQueue() {}
« no previous file with comments | « chrome/test/base/ui_test_utils.h ('k') | chrome/test/reliability/page_load_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698