diff options
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/base/in_process_browser_test.cc | 3 | ||||
-rw-r--r-- | chrome/test/base/test_html_dialog_observer.cc | 6 | ||||
-rw-r--r-- | chrome/test/base/testing_browser_process.h | 4 | ||||
-rw-r--r-- | chrome/test/base/testing_profile.cc | 12 | ||||
-rw-r--r-- | chrome/test/base/ui_test_utils.cc | 20 | ||||
-rw-r--r-- | chrome/test/base/ui_test_utils.h | 2 | ||||
-rw-r--r-- | chrome/test/reliability/page_load_test.cc | 1 | ||||
-rw-r--r-- | chrome/test/test_navigation_observer.cc | 5 |
8 files changed, 28 insertions, 25 deletions
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc index 377dc7a..d7df59e 100644 --- a/chrome/test/base/in_process_browser_test.cc +++ b/chrome/test/base/in_process_browser_test.cc @@ -32,6 +32,7 @@ #include "content/browser/browser_thread.h" #include "content/browser/renderer_host/render_process_host.h" #include "content/browser/tab_contents/tab_contents.h" +#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_types.h" #include "content/renderer/mock_content_renderer_client.h" #include "net/base/mock_host_resolver.h" @@ -231,7 +232,7 @@ Browser* InProcessBrowserTest::CreateBrowserForPopup(Profile* profile) { void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) { ui_test_utils::WindowedNotificationObserver observer( content::NOTIFICATION_LOAD_STOP, - NotificationService::AllSources()); + content::NotificationService::AllSources()); browser->AddSelectedTabWithURL( GURL(chrome::kAboutBlankURL), content::PAGE_TRANSITION_START_PAGE); observer.Wait(); diff --git a/chrome/test/base/test_html_dialog_observer.cc b/chrome/test/base/test_html_dialog_observer.cc index 3b8fd8c..6f51eb7 100644 --- a/chrome/test/base/test_html_dialog_observer.cc +++ b/chrome/test/base/test_html_dialog_observer.cc @@ -5,7 +5,7 @@ #include "chrome/test/base/test_html_dialog_observer.h" #include "chrome/common/chrome_notification_types.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_service.h" #include "content/browser/tab_contents/navigation_controller.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/webui/web_ui.h" @@ -17,7 +17,7 @@ TestHtmlDialogObserver::TestHtmlDialogObserver() : web_ui_(NULL), done_(false), running_(false) { registrar_.Add(this, chrome::NOTIFICATION_HTML_DIALOG_SHOWN, - NotificationService::AllSources()); + content::NotificationService::AllSources()); } TestHtmlDialogObserver::~TestHtmlDialogObserver() { @@ -31,7 +31,7 @@ void TestHtmlDialogObserver::Observe( case chrome::NOTIFICATION_HTML_DIALOG_SHOWN: web_ui_ = content::Source<WebUI>(source).ptr(); registrar_.Remove(this, chrome::NOTIFICATION_HTML_DIALOG_SHOWN, - NotificationService::AllSources()); + content::NotificationService::AllSources()); // Wait for navigation on the new WebUI instance to complete. This depends // on receiving the notification of the HtmlDialog being shown before the // NavigationController finishes loading. The HtmlDialog notification is diff --git a/chrome/test/base/testing_browser_process.h b/chrome/test/base/testing_browser_process.h index 9f8b4b9..2a561f9 100644 --- a/chrome/test/base/testing_browser_process.h +++ b/chrome/test/base/testing_browser_process.h @@ -16,7 +16,7 @@ #include "base/memory/scoped_ptr.h" #include "build/build_config.h" #include "chrome/browser/browser_process.h" -#include "content/common/notification_service.h" +#include "content/browser/notification_service_impl.h" class BackgroundModeManager; class CRLSetFetcher; @@ -134,7 +134,7 @@ class TestingBrowserProcess : public BrowserProcess { void SetDevToolsManager(DevToolsManager*); private: - NotificationService notification_service_; + NotificationServiceImpl notification_service_; unsigned int module_ref_count_; scoped_ptr<ui::Clipboard> clipboard_; std::string app_locale_; diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc index fc17948..0fe3bf2 100644 --- a/chrome/test/base/testing_profile.cc +++ b/chrome/test/base/testing_profile.cc @@ -51,7 +51,7 @@ #include "content/browser/browser_thread.h" #include "content/browser/in_process_webkit/webkit_context.h" #include "content/browser/mock_resource_context.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_service.h" #include "net/base/cookie_monster.h" #include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context_getter.h" @@ -174,17 +174,17 @@ void TestingProfile::Init() { DesktopNotificationServiceFactory::GetInstance()->SetTestingFactory( this, CreateTestDesktopNotificationService); - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_PROFILE_CREATED, content::Source<Profile>(static_cast<Profile*>(this)), - NotificationService::NoDetails()); + content::NotificationService::NoDetails()); } TestingProfile::~TestingProfile() { - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_PROFILE_DESTROYED, content::Source<Profile>(static_cast<Profile*>(this)), - NotificationService::NoDetails()); + content::NotificationService::NoDetails()); profile_dependency_manager_->DestroyProfileServices(this); @@ -318,7 +318,7 @@ void TestingProfile::BlockUntilBookmarkModelLoaded() { void TestingProfile::BlockUntilTopSitesLoaded() { ui_test_utils::WindowedNotificationObserver top_sites_loaded_observer( chrome::NOTIFICATION_TOP_SITES_LOADED, - NotificationService::AllSources()); + content::NotificationService::AllSources()); if (!GetHistoryService(Profile::EXPLICIT_ACCESS)) GetTopSites()->HistoryLoaded(); top_sites_loaded_observer.Wait(); diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc index f471f61..80e2316 100644 --- a/chrome/test/base/ui_test_utils.cc +++ b/chrome/test/base/ui_test_utils.cc @@ -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 @@ void WaitForLoadStop(TabContents* tab) { 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 OpenURLOffTheRecord(Profile* profile, const GURL& url) { } 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 @@ static void NavigateToURLWithDispositionBlockUntilNavigationsComplete( 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 @@ GURL GetFileUrlWithQuery(const FilePath& path, 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 @@ void WaitForHistoryToLoad(Browser* browser) { 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 @@ TestWebSocketServer::~TestWebSocketServer() { } TestNotificationObserver::TestNotificationObserver() - : source_(NotificationService::AllSources()) { + : source_(content::NotificationService::AllSources()) { } TestNotificationObserver::~TestNotificationObserver() {} @@ -795,7 +797,7 @@ WindowedNotificationObserver::WindowedNotificationObserver( 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 @@ void WindowedNotificationObserver::Observe( 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 @@ void TitleWatcher::Observe(int type, DOMMessageQueue::DOMMessageQueue() { registrar_.Add(this, chrome::NOTIFICATION_DOM_OPERATION_RESPONSE, - NotificationService::AllSources()); + content::NotificationService::AllSources()); } DOMMessageQueue::~DOMMessageQueue() {} diff --git a/chrome/test/base/ui_test_utils.h b/chrome/test/base/ui_test_utils.h index 1072383..2f29d6e5 100644 --- a/chrome/test/base/ui_test_utils.h +++ b/chrome/test/base/ui_test_utils.h @@ -20,7 +20,7 @@ #include "chrome/test/automation/dom_element_proxy.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_details.h" #include "content/public/browser/notification_source.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/keycodes/keyboard_codes.h" diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc index 408abaa..0d3bcfe 100644 --- a/chrome/test/reliability/page_load_test.cc +++ b/chrome/test/reliability/page_load_test.cc @@ -64,7 +64,6 @@ #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/automation/window_proxy.h" #include "chrome/test/ui/ui_test.h" -#include "content/common/notification_service.h" #include "net/base/net_util.h" #include "ui/base/keycodes/keyboard_codes.h" #include "v8/include/v8-testing.h" diff --git a/chrome/test/test_navigation_observer.cc b/chrome/test/test_navigation_observer.cc index c817efb..7e0c2f0 100644 --- a/chrome/test/test_navigation_observer.cc +++ b/chrome/test/test_navigation_observer.cc @@ -6,6 +6,7 @@ #include "chrome/test/base/ui_test_utils.h" #include "content/browser/renderer_host/render_view_host_observer.h" +#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_types.h" #include "testing/gtest/include/gtest/gtest.h" @@ -52,7 +53,7 @@ TestNavigationObserver::TestNavigationObserver( // When we need to do javascript injection, register for RVH creation. if (js_injection_ready_observer_) { registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED, - NotificationService::AllSources()); + content::NotificationService::AllSources()); } RegisterAsObserver(source); } @@ -81,7 +82,7 @@ TestNavigationObserver::TestNavigationObserver( // When we need to do javascript injection, register for RVH creation. if (js_injection_ready_observer_) { registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED, - NotificationService::AllSources()); + content::NotificationService::AllSources()); } } |