OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <algorithm> | 5 #include <algorithm> |
6 #include <stack> | 6 #include <stack> |
7 | 7 |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
496 drive::FakeDriveService* fake_drive_service() { | 496 drive::FakeDriveService* fake_drive_service() { |
497 return static_cast<drive::FakeDriveService*>( | 497 return static_cast<drive::FakeDriveService*>( |
498 remote_sync_service_->GetDriveService()); | 498 remote_sync_service_->GetDriveService()); |
499 } | 499 } |
500 | 500 |
501 FakeDriveServiceHelper* fake_drive_service_helper() { | 501 FakeDriveServiceHelper* fake_drive_service_helper() { |
502 return fake_drive_service_helper_.get(); | 502 return fake_drive_service_helper_.get(); |
503 } | 503 } |
504 | 504 |
505 MetadataDatabase* metadata_database() { | 505 MetadataDatabase* metadata_database() { |
506 return remote_sync_service_->GetMetadataDatabase(); | 506 return remote_sync_service_->GetMetadataDatabaseForTesting(); |
nhiroki
2014/05/29 04:12:58
As chatted locally, this wrapper function easily h
peria
2014/06/02 04:30:28
Yes, direct calls of MetadataDatabase's methods ar
| |
507 } | 507 } |
508 | 508 |
509 private: | 509 private: |
510 content::TestBrowserThreadBundle thread_bundle_; | 510 content::TestBrowserThreadBundle thread_bundle_; |
511 ScopedEnableSyncFSV2 enable_syncfs_v2_; | 511 ScopedEnableSyncFSV2 enable_syncfs_v2_; |
512 | 512 |
513 base::ScopedTempDir base_dir_; | 513 base::ScopedTempDir base_dir_; |
514 scoped_ptr<leveldb::Env> in_memory_env_; | 514 scoped_ptr<leveldb::Env> in_memory_env_; |
515 TestingProfile profile_; | 515 TestingProfile profile_; |
516 | 516 |
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1610 | 1610 |
1611 EXPECT_EQ(1u, CountApp()); | 1611 EXPECT_EQ(1u, CountApp()); |
1612 EXPECT_EQ(1u, CountLocalFile(app_id)); | 1612 EXPECT_EQ(1u, CountLocalFile(app_id)); |
1613 | 1613 |
1614 EXPECT_EQ(2u, CountMetadata()); | 1614 EXPECT_EQ(2u, CountMetadata()); |
1615 EXPECT_EQ(2u, CountTracker()); | 1615 EXPECT_EQ(2u, CountTracker()); |
1616 } | 1616 } |
1617 | 1617 |
1618 } // namespace drive_backend | 1618 } // namespace drive_backend |
1619 } // namespace sync_file_system | 1619 } // namespace sync_file_system |
OLD | NEW |