| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "chrome/browser/extensions/event_names.h" | 9 #include "chrome/browser/extensions/event_names.h" |
| 10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 44 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
| 45 mock_remote_service_ = new ::testing::NiceMock<MockRemoteFileSyncService>; | 45 mock_remote_service_ = new ::testing::NiceMock<MockRemoteFileSyncService>; |
| 46 SyncFileSystemServiceFactory::GetInstance()->set_mock_remote_file_service( | 46 SyncFileSystemServiceFactory::GetInstance()->set_mock_remote_file_service( |
| 47 scoped_ptr<RemoteFileSyncService>(mock_remote_service_)); | 47 scoped_ptr<RemoteFileSyncService>(mock_remote_service_)); |
| 48 | 48 |
| 49 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); | 49 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); |
| 50 // TODO(calvinlo): Update test code after default quota is made const | 50 // TODO(calvinlo): Update test code after default quota is made const |
| 51 // (http://crbug.com/155488). | 51 // (http://crbug.com/155488). |
| 52 real_default_quota_ = quota::QuotaManager::kSyncableStorageDefaultHostQuota; | 52 real_default_quota_ = quota::QuotaManager::kSyncableStorageDefaultHostQuota; |
| 53 quota::QuotaManager::kSyncableStorageDefaultHostQuota = 123456789; | 53 quota::QuotaManager::kSyncableStorageDefaultHostQuota = 123456; |
| 54 } | 54 } |
| 55 | 55 |
| 56 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { | 56 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { |
| 57 quota::QuotaManager::kSyncableStorageDefaultHostQuota = real_default_quota_; | 57 quota::QuotaManager::kSyncableStorageDefaultHostQuota = real_default_quota_; |
| 58 ExtensionApiTest::TearDownInProcessBrowserTestFixture(); | 58 ExtensionApiTest::TearDownInProcessBrowserTestFixture(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 ::testing::NiceMock<MockRemoteFileSyncService>* mock_remote_service() { | 61 ::testing::NiceMock<MockRemoteFileSyncService>* mock_remote_service() { |
| 62 return mock_remote_service_; | 62 return mock_remote_service_; |
| 63 } | 63 } |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 } | 201 } |
| 202 | 202 |
| 203 IN_PROC_BROWSER_TEST_F(SyncFileSystemApiTest, GetServiceStatus) { | 203 IN_PROC_BROWSER_TEST_F(SyncFileSystemApiTest, GetServiceStatus) { |
| 204 mock_remote_service()->SetServiceState( | 204 mock_remote_service()->SetServiceState( |
| 205 sync_file_system::REMOTE_SERVICE_AUTHENTICATION_REQUIRED); | 205 sync_file_system::REMOTE_SERVICE_AUTHENTICATION_REQUIRED); |
| 206 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/get_service_status")) | 206 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/get_service_status")) |
| 207 << message_; | 207 << message_; |
| 208 } | 208 } |
| 209 | 209 |
| 210 } // namespace chrome | 210 } // namespace chrome |
| OLD | NEW |