| Index: chrome/test/ui_test_utils.cc
|
| ===================================================================
|
| --- chrome/test/ui_test_utils.cc (revision 91771)
|
| +++ chrome/test/ui_test_utils.cc (working copy)
|
| @@ -29,6 +29,7 @@
|
| #include "chrome/browser/ui/find_bar/find_notification_details.h"
|
| #include "chrome/browser/ui/find_bar/find_tab_helper.h"
|
| #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
|
| +#include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/extensions/extension_action.h"
|
| #include "chrome/test/automation/javascript_execution_controller.h"
|
| @@ -38,7 +39,6 @@
|
| #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/common/notification_type.h"
|
| #include "googleurl/src/gurl.h"
|
| #include "net/base/net_util.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -122,7 +122,7 @@
|
| public:
|
| explicit DOMOperationObserver(RenderViewHost* render_view_host)
|
| : did_respond_(false) {
|
| - registrar_.Add(this, NotificationType::DOM_OPERATION_RESPONSE,
|
| + registrar_.Add(this, chrome::DOM_OPERATION_RESPONSE,
|
| Source<RenderViewHost>(render_view_host));
|
| ui_test_utils::RunMessageLoop();
|
| }
|
| @@ -130,7 +130,7 @@
|
| virtual void Observe(NotificationType type,
|
| const NotificationSource& source,
|
| const NotificationDetails& details) {
|
| - DCHECK(type == NotificationType::DOM_OPERATION_RESPONSE);
|
| + DCHECK(type == chrome::DOM_OPERATION_RESPONSE);
|
| Details<DomOperationNotificationDetails> dom_op_details(details);
|
| response_ = dom_op_details->json();
|
| did_respond_ = true;
|
| @@ -158,7 +158,7 @@
|
| number_of_matches_(0) {
|
| current_find_request_id_ =
|
| parent_tab->find_tab_helper()->current_find_request_id();
|
| - registrar_.Add(this, NotificationType::FIND_RESULT_AVAILABLE,
|
| + registrar_.Add(this, chrome::FIND_RESULT_AVAILABLE,
|
| Source<TabContents>(parent_tab_->tab_contents()));
|
| ui_test_utils::RunMessageLoop();
|
| }
|
| @@ -169,7 +169,7 @@
|
|
|
| virtual void Observe(NotificationType type, const NotificationSource& source,
|
| const NotificationDetails& details) {
|
| - if (type == NotificationType::FIND_RESULT_AVAILABLE) {
|
| + if (type == chrome::FIND_RESULT_AVAILABLE) {
|
| Details<FindNotificationDetails> find_details(details);
|
| if (find_details->request_id() == current_find_request_id_) {
|
| // We get multiple responses and one of those will contain the ordinal.
|
| @@ -348,7 +348,7 @@
|
|
|
| void WaitForBrowserActionUpdated(ExtensionAction* browser_action) {
|
| TestNotificationObserver observer;
|
| - RegisterAndWait(&observer, NotificationType::EXTENSION_BROWSER_ACTION_UPDATED,
|
| + RegisterAndWait(&observer, chrome::EXTENSION_BROWSER_ACTION_UPDATED,
|
| Source<ExtensionAction>(browser_action));
|
| }
|
|
|
| @@ -364,7 +364,7 @@
|
|
|
| Browser* WaitForNewBrowser() {
|
| TestNotificationObserver observer;
|
| - RegisterAndWait(&observer, NotificationType::BROWSER_WINDOW_READY,
|
| + RegisterAndWait(&observer, chrome::BROWSER_WINDOW_READY,
|
| NotificationService::AllSources());
|
| return Source<Browser>(observer.source()).ptr();
|
| }
|
| @@ -550,7 +550,7 @@
|
|
|
| AppModalDialog* WaitForAppModalDialog() {
|
| TestNotificationObserver observer;
|
| - RegisterAndWait(&observer, NotificationType::APP_MODAL_DIALOG_SHOWN,
|
| + RegisterAndWait(&observer, chrome::APP_MODAL_DIALOG_SHOWN,
|
| NotificationService::AllSources());
|
| return Source<AppModalDialog>(observer.source()).ptr();
|
| }
|
| @@ -571,7 +571,7 @@
|
|
|
| void WaitForFocusInBrowser(Browser* browser) {
|
| TestNotificationObserver observer;
|
| - RegisterAndWait(&observer, NotificationType::FOCUS_RETURNED_TO_BROWSER,
|
| + RegisterAndWait(&observer, chrome::FOCUS_RETURNED_TO_BROWSER,
|
| Source<Browser>(browser));
|
| }
|
|
|
| @@ -618,7 +618,7 @@
|
| HistoryService* history_service =
|
| browser->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS);
|
| if (!history_service->BackendLoaded())
|
| - WaitForNotification(NotificationType::HISTORY_LOADED);
|
| + WaitForNotification(chrome::HISTORY_LOADED);
|
| }
|
|
|
| bool GetNativeWindow(const Browser* browser, gfx::NativeWindow* native_window) {
|
| @@ -927,7 +927,7 @@
|
| }
|
|
|
| DOMMessageQueue::DOMMessageQueue() {
|
| - registrar_.Add(this, NotificationType::DOM_OPERATION_RESPONSE,
|
| + registrar_.Add(this, chrome::DOM_OPERATION_RESPONSE,
|
| NotificationService::AllSources());
|
| }
|
|
|
|
|