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

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

Issue 23708027: A quick fix attempt for SyncFileSystemApiTest.GetUsageAndQuota (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/sync_file_system/get_usage_and_quota/test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/sync_file_system/get_usage_and_quota/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698