diff options
Diffstat (limited to 'chrome/browser/automation/automation_tab_helper_browsertest.cc')
-rw-r--r-- | chrome/browser/automation/automation_tab_helper_browsertest.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/automation/automation_tab_helper_browsertest.cc b/chrome/browser/automation/automation_tab_helper_browsertest.cc index 9e87089..8a29aa8 100644 --- a/chrome/browser/automation/automation_tab_helper_browsertest.cc +++ b/chrome/browser/automation/automation_tab_helper_browsertest.cc @@ -12,6 +12,7 @@ #include "chrome/browser/automation/mock_tab_event_observer.h" #include "chrome/browser/ui/browser.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/url_constants.h" #include "chrome/test/in_process_browser_test.h" @@ -23,7 +24,6 @@ #include "content/common/notification_registrar.h" #include "content/common/notification_service.h" #include "content/common/notification_source.h" -#include "content/common/notification_type.h" #include "net/base/net_util.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -35,11 +35,11 @@ class MockNotificationObserver : public NotificationObserver { MockNotificationObserver() { } virtual ~MockNotificationObserver() { } - MOCK_METHOD3(Observe, void(NotificationType type, + MOCK_METHOD3(Observe, void(int type, const NotificationSource& source, const NotificationDetails& details)); - void Register(NotificationType type, const NotificationSource& source) { + void Register(int type, const NotificationSource& source) { registrar_.Add(this, type, source); } @@ -68,13 +68,13 @@ class AutomationTabHelperBrowserTest : public InProcessBrowserTest { MockTabEventObserver* mock_tab_observer, MockNotificationObserver* mock_notification_observer) { mock_notification_observer->Register( - NotificationType::DOM_OPERATION_RESPONSE, + chrome::NOTIFICATION_DOM_OPERATION_RESPONSE, NotificationService::AllSources()); testing::InSequence expect_in_sequence; EXPECT_CALL(*mock_tab_observer, OnFirstPendingLoad(_)); EXPECT_CALL(*mock_notification_observer, Observe( - testing::Eq(NotificationType::DOM_OPERATION_RESPONSE), _, _)); + testing::Eq(chrome::NOTIFICATION_DOM_OPERATION_RESPONSE), _, _)); EXPECT_CALL(*mock_tab_observer, OnNoMorePendingLoads(_)) .WillOnce(testing::InvokeWithoutArgs( MessageLoopForUI::current(), &MessageLoop::Quit)); @@ -181,15 +181,16 @@ IN_PROC_BROWSER_TEST_F(AutomationTabHelperBrowserTest, IN_PROC_BROWSER_TEST_F(AutomationTabHelperBrowserTest, LoadStopComesAfterOnLoad) { MockNotificationObserver mock_notification_observer; - mock_notification_observer.Register(NotificationType::DOM_OPERATION_RESPONSE, - NotificationService::AllSources()); + mock_notification_observer.Register( + chrome::NOTIFICATION_DOM_OPERATION_RESPONSE, + NotificationService::AllSources()); MockTabEventObserver mock_tab_observer(tab_helper()); EXPECT_CALL(mock_tab_observer, OnFirstPendingLoad(_)); { testing::InSequence expect_in_sequence; EXPECT_CALL(mock_notification_observer, Observe( - testing::Eq(NotificationType::DOM_OPERATION_RESPONSE), _, _)); + testing::Eq(chrome::NOTIFICATION_DOM_OPERATION_RESPONSE), _, _)); EXPECT_CALL(mock_tab_observer, OnNoMorePendingLoads(_)); } |