| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 real_default_quota_; | 62 real_default_quota_; |
| 63 ExtensionApiTest::TearDownInProcessBrowserTestFixture(); | 63 ExtensionApiTest::TearDownInProcessBrowserTestFixture(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void SetUpOnMainThread() override { | 66 void SetUpOnMainThread() override { |
| 67 // Must happen after the browser process is created because instantiating | 67 // Must happen after the browser process is created because instantiating |
| 68 // the factory will instantiate ExtensionSystemFactory which depends on | 68 // the factory will instantiate ExtensionSystemFactory which depends on |
| 69 // ExtensionsBrowserClient setup in BrowserProcessImpl. | 69 // ExtensionsBrowserClient setup in BrowserProcessImpl. |
| 70 mock_remote_service_ = new ::testing::NiceMock<MockRemoteFileSyncService>; | 70 mock_remote_service_ = new ::testing::NiceMock<MockRemoteFileSyncService>; |
| 71 SyncFileSystemServiceFactory::GetInstance()->set_mock_remote_file_service( | 71 SyncFileSystemServiceFactory::GetInstance()->set_mock_remote_file_service( |
| 72 scoped_ptr<RemoteFileSyncService>(mock_remote_service_)); | 72 std::unique_ptr<RemoteFileSyncService>(mock_remote_service_)); |
| 73 ExtensionApiTest::SetUpOnMainThread(); | 73 ExtensionApiTest::SetUpOnMainThread(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 ::testing::NiceMock<MockRemoteFileSyncService>* mock_remote_service() { | 76 ::testing::NiceMock<MockRemoteFileSyncService>* mock_remote_service() { |
| 77 return mock_remote_service_; | 77 return mock_remote_service_; |
| 78 } | 78 } |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 ::testing::NiceMock<MockRemoteFileSyncService>* mock_remote_service_; | 81 ::testing::NiceMock<MockRemoteFileSyncService>* mock_remote_service_; |
| 82 int64_t real_minimum_preserved_space_; | 82 int64_t real_minimum_preserved_space_; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/conflict_resolution_policy")) | 196 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/conflict_resolution_policy")) |
| 197 << message_; | 197 << message_; |
| 198 } | 198 } |
| 199 | 199 |
| 200 IN_PROC_BROWSER_TEST_F(SyncFileSystemApiTest, GetServiceStatus) { | 200 IN_PROC_BROWSER_TEST_F(SyncFileSystemApiTest, GetServiceStatus) { |
| 201 mock_remote_service()->SetServiceState( | 201 mock_remote_service()->SetServiceState( |
| 202 sync_file_system::REMOTE_SERVICE_AUTHENTICATION_REQUIRED); | 202 sync_file_system::REMOTE_SERVICE_AUTHENTICATION_REQUIRED); |
| 203 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/get_service_status")) | 203 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/get_service_status")) |
| 204 << message_; | 204 << message_; |
| 205 } | 205 } |
| OLD | NEW |