OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/sync_file_system/drive_file_sync_service.h" | 5 #include "chrome/browser/sync_file_system/drive_file_sync_service.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "chrome/browser/sync_file_system/drive/fake_api_util.h" | 8 #include "chrome/browser/sync_file_system/drive/fake_api_util.h" |
9 #include "chrome/browser/sync_file_system/drive_metadata_store.h" | 9 #include "chrome/browser/sync_file_system/drive_metadata_store.h" |
10 #include "chrome/browser/sync_file_system/sync_file_system.pb.h" | 10 #include "chrome/browser/sync_file_system/sync_file_system.pb.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 } | 37 } |
38 | 38 |
39 } // namespace | 39 } // namespace |
40 | 40 |
41 class DriveFileSyncServiceTest : public testing::Test { | 41 class DriveFileSyncServiceTest : public testing::Test { |
42 public: | 42 public: |
43 DriveFileSyncServiceTest() | 43 DriveFileSyncServiceTest() |
44 : ui_thread_(content::BrowserThread::UI, &message_loop_), | 44 : ui_thread_(content::BrowserThread::UI, &message_loop_), |
45 file_thread_(content::BrowserThread::FILE, &message_loop_), | 45 file_thread_(content::BrowserThread::FILE, &message_loop_), |
46 fake_api_util_(NULL), | 46 fake_api_util_(NULL), |
47 metadata_store_(NULL), | 47 metadata_store_(NULL) {} |
48 sync_service_(NULL) {} | |
49 | 48 |
50 virtual void SetUp() OVERRIDE { | 49 virtual void SetUp() OVERRIDE { |
51 RegisterSyncableFileSystem(); | 50 RegisterSyncableFileSystem(); |
52 fake_api_util_ = new drive::FakeAPIUtil; | 51 fake_api_util_ = new drive::FakeAPIUtil; |
53 | 52 |
54 ASSERT_TRUE(scoped_base_dir_.CreateUniqueTempDir()); | 53 ASSERT_TRUE(scoped_base_dir_.CreateUniqueTempDir()); |
55 base_dir_ = scoped_base_dir_.path(); | 54 base_dir_ = scoped_base_dir_.path(); |
56 metadata_store_ = new DriveMetadataStore( | 55 metadata_store_ = new DriveMetadataStore( |
57 base_dir_, base::MessageLoopProxy::current().get()); | 56 base_dir_, base::MessageLoopProxy::current().get()); |
58 bool done = false; | 57 bool done = false; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 ASSERT_EQ(6u, origin_status_map.size()); | 242 ASSERT_EQ(6u, origin_status_map.size()); |
244 EXPECT_EQ("Pending", origin_status_map[GURL("chrome-extension://app_p0")]); | 243 EXPECT_EQ("Pending", origin_status_map[GURL("chrome-extension://app_p0")]); |
245 EXPECT_EQ("Pending", origin_status_map[GURL("chrome-extension://app_p1")]); | 244 EXPECT_EQ("Pending", origin_status_map[GURL("chrome-extension://app_p1")]); |
246 EXPECT_EQ("Pending", origin_status_map[GURL("chrome-extension://app_p2")]); | 245 EXPECT_EQ("Pending", origin_status_map[GURL("chrome-extension://app_p2")]); |
247 EXPECT_EQ("Enabled", origin_status_map[GURL("chrome-extension://app_e0")]); | 246 EXPECT_EQ("Enabled", origin_status_map[GURL("chrome-extension://app_e0")]); |
248 EXPECT_EQ("Enabled", origin_status_map[GURL("chrome-extension://app_e1")]); | 247 EXPECT_EQ("Enabled", origin_status_map[GURL("chrome-extension://app_e1")]); |
249 EXPECT_EQ("Disabled", origin_status_map[GURL("chrome-extension://app_d0")]); | 248 EXPECT_EQ("Disabled", origin_status_map[GURL("chrome-extension://app_d0")]); |
250 } | 249 } |
251 | 250 |
252 } // namespace sync_file_system | 251 } // namespace sync_file_system |
OLD | NEW |