Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/sync_file_system/file_status_observer.h" 10 #include "chrome/browser/sync_file_system/file_status_observer.h"
(...skipping 22 matching lines...) Expand all
33 33
34 namespace { 34 namespace {
35 35
36 class SyncFileSystemApiTest : public ExtensionApiTest { 36 class SyncFileSystemApiTest : public ExtensionApiTest {
37 public: 37 public:
38 SyncFileSystemApiTest() 38 SyncFileSystemApiTest()
39 : mock_remote_service_(NULL), 39 : mock_remote_service_(NULL),
40 real_minimum_preserved_space_(0), 40 real_minimum_preserved_space_(0),
41 real_default_quota_(0) {} 41 real_default_quota_(0) {}
42 42
43 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 43 virtual void SetUpInProcessBrowserTestFixture() override {
44 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); 44 ExtensionApiTest::SetUpInProcessBrowserTestFixture();
45 45
46 real_minimum_preserved_space_ = 46 real_minimum_preserved_space_ =
47 storage::QuotaManager::kMinimumPreserveForSystem; 47 storage::QuotaManager::kMinimumPreserveForSystem;
48 storage::QuotaManager::kMinimumPreserveForSystem = 0; 48 storage::QuotaManager::kMinimumPreserveForSystem = 0;
49 49
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_ = 52 real_default_quota_ =
53 storage::QuotaManager::kSyncableStorageDefaultHostQuota; 53 storage::QuotaManager::kSyncableStorageDefaultHostQuota;
54 storage::QuotaManager::kSyncableStorageDefaultHostQuota = 123456; 54 storage::QuotaManager::kSyncableStorageDefaultHostQuota = 123456;
55 } 55 }
56 56
57 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { 57 virtual void TearDownInProcessBrowserTestFixture() override {
58 storage::QuotaManager::kMinimumPreserveForSystem = 58 storage::QuotaManager::kMinimumPreserveForSystem =
59 real_minimum_preserved_space_; 59 real_minimum_preserved_space_;
60 storage::QuotaManager::kSyncableStorageDefaultHostQuota = 60 storage::QuotaManager::kSyncableStorageDefaultHostQuota =
61 real_default_quota_; 61 real_default_quota_;
62 ExtensionApiTest::TearDownInProcessBrowserTestFixture(); 62 ExtensionApiTest::TearDownInProcessBrowserTestFixture();
63 } 63 }
64 64
65 virtual void SetUpOnMainThread() OVERRIDE { 65 virtual void SetUpOnMainThread() override {
66 // Must happen after the browser process is created because instantiating 66 // Must happen after the browser process is created because instantiating
67 // the factory will instantiate ExtensionSystemFactory which depends on 67 // the factory will instantiate ExtensionSystemFactory which depends on
68 // ExtensionsBrowserClient setup in BrowserProcessImpl. 68 // ExtensionsBrowserClient setup in BrowserProcessImpl.
69 mock_remote_service_ = new ::testing::NiceMock<MockRemoteFileSyncService>; 69 mock_remote_service_ = new ::testing::NiceMock<MockRemoteFileSyncService>;
70 SyncFileSystemServiceFactory::GetInstance()->set_mock_remote_file_service( 70 SyncFileSystemServiceFactory::GetInstance()->set_mock_remote_file_service(
71 scoped_ptr<RemoteFileSyncService>(mock_remote_service_)); 71 scoped_ptr<RemoteFileSyncService>(mock_remote_service_));
72 ExtensionApiTest::SetUpOnMainThread(); 72 ExtensionApiTest::SetUpOnMainThread();
73 } 73 }
74 74
75 ::testing::NiceMock<MockRemoteFileSyncService>* mock_remote_service() { 75 ::testing::NiceMock<MockRemoteFileSyncService>* mock_remote_service() {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/conflict_resolution_policy")) 193 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/conflict_resolution_policy"))
194 << message_; 194 << message_;
195 } 195 }
196 196
197 IN_PROC_BROWSER_TEST_F(SyncFileSystemApiTest, GetServiceStatus) { 197 IN_PROC_BROWSER_TEST_F(SyncFileSystemApiTest, GetServiceStatus) {
198 mock_remote_service()->SetServiceState( 198 mock_remote_service()->SetServiceState(
199 sync_file_system::REMOTE_SERVICE_AUTHENTICATION_REQUIRED); 199 sync_file_system::REMOTE_SERVICE_AUTHENTICATION_REQUIRED);
200 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/get_service_status")) 200 ASSERT_TRUE(RunPlatformAppTest("sync_file_system/get_service_status"))
201 << message_; 201 << message_;
202 } 202 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698