Chromium Code Reviews| Index: chrome/browser/sync/sync_global_error_unittest.cc |
| diff --git a/chrome/browser/sync/sync_global_error_unittest.cc b/chrome/browser/sync/sync_global_error_unittest.cc |
| index ee798ea6961ad2b030a71000ca08d0fadedef900..da4bb723efa06d2dd66d3304440dffca40c3ef9a 100644 |
| --- a/chrome/browser/sync/sync_global_error_unittest.cc |
| +++ b/chrome/browser/sync/sync_global_error_unittest.cc |
| @@ -28,17 +28,6 @@ using content::BrowserThread; |
| namespace { |
| -#if 0 |
| -// TODO(altimofeev) See below. |
| -class BrowserMock: public Browser { |
| - public: |
| - explicit BrowserMock(Type type, Profile* profile) : Browser(type, profile) {} |
| - |
| - MOCK_METHOD2(ExecuteCommandWithDisposition, |
| - void(int command_id, WindowOpenDisposition)); |
| -}; |
| -#endif |
| - |
| class FakeLoginUIService: public LoginUIService { |
| public: |
| FakeLoginUIService() : LoginUIService(NULL) {} |
| @@ -74,22 +63,6 @@ class SyncGlobalErrorTest : public BrowserWithTestWindowTest { |
| SyncGlobalErrorTest() {} |
| virtual ~SyncGlobalErrorTest() {} |
| -#if 0 |
| - // TODO(altimofeev): see below. |
| - virtual void SetUp() OVERRIDE { |
| - testing::Test::SetUp(); |
| - |
| - set_profile(CreateProfile()); |
| - set_browser(new BrowserMock(Browser::TYPE_TABBED, profile())); |
| - set_window(new TestBrowserWindow(browser())); |
| - browser()->SetWindowForTesting(window()); |
| - } |
| - |
| - virtual void TearDown() OVERRIDE { |
| - testing::Test::TearDown(); |
| - } |
| -#endif |
| - |
| private: |
| DISALLOW_COPY_AND_ASSIGN(SyncGlobalErrorTest); |
| }; |
| @@ -126,20 +99,13 @@ void VerifySyncGlobalErrorResult(NiceMock<ProfileSyncServiceMock>* service, |
| EXPECT_FALSE(error->GetBubbleViewTitle().empty()); |
| #if defined(OS_CHROMEOS) |
| + // Check for is_error and sign-out & sign-in to recover in CrOS |
| // TODO(altimofeev): Implement this in a way that doesn't involve subclassing |
| // Browser or using GMock on browser/ui types which is |
| // banned. Consider observing NOTIFICATION_APP_TERMINATING |
| // instead. |
| // http://crbug.com/134675 |
|
Raghu Simha
2014/01/28 01:40:04
Technically, this is dead code too, and ought to b
|
| #else |
| -#if defined(OS_CHROMEOS) |
| - if (error_state != GoogleServiceAuthError::NONE) { |
| - // In CrOS sign-in/sign-out is made to fix the error. |
| - EXPECT_CALL(*static_cast<BrowserMock*>(browser), |
| - ExecuteCommandWithDisposition(IDC_EXIT, _)); |
| - error->ExecuteMenuItem(browser); |
| - } |
| -#else |
| // Test message handler. |
| if (is_error) { |
| FakeLoginUI* login_ui = static_cast<FakeLoginUI*>( |
| @@ -150,7 +116,6 @@ void VerifySyncGlobalErrorResult(NiceMock<ProfileSyncServiceMock>* service, |
| error->BubbleViewDidClose(browser); |
| } |
| #endif |
| -#endif |
| } |
| } // namespace |