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

Side by Side Diff: chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 message_loop_.RunUntilIdle(); 73 message_loop_.RunUntilIdle();
74 74
75 base_dir_ = base::FilePath(); 75 base_dir_ = base::FilePath();
76 ASSERT_TRUE(RevokeSyncableFileSystem(kServiceName)); 76 ASSERT_TRUE(RevokeSyncableFileSystem(kServiceName));
77 } 77 }
78 78
79 virtual ~DriveFileSyncServiceTest() { 79 virtual ~DriveFileSyncServiceTest() {
80 } 80 }
81 81
82 protected: 82 protected:
83 MessageLoop* message_loop() { return &message_loop_; } 83 base::MessageLoop* message_loop() { return &message_loop_; }
84 drive::FakeAPIUtil* fake_api_util() { return fake_api_util_; } 84 drive::FakeAPIUtil* fake_api_util() { return fake_api_util_; }
85 DriveMetadataStore* metadata_store() { return metadata_store_; } 85 DriveMetadataStore* metadata_store() { return metadata_store_; }
86 DriveFileSyncService* sync_service() { return sync_service_.get(); } 86 DriveFileSyncService* sync_service() { return sync_service_.get(); }
87 87
88 private: 88 private:
89 base::ScopedTempDir scoped_base_dir_; 89 base::ScopedTempDir scoped_base_dir_;
90 MessageLoop message_loop_; 90 base::MessageLoop message_loop_;
91 content::TestBrowserThread ui_thread_; 91 content::TestBrowserThread ui_thread_;
92 content::TestBrowserThread file_thread_; 92 content::TestBrowserThread file_thread_;
93 93
94 TestingProfile profile_; 94 TestingProfile profile_;
95 base::FilePath base_dir_; 95 base::FilePath base_dir_;
96 96
97 drive::FakeAPIUtil* fake_api_util_; // Owned by |sync_service_|. 97 drive::FakeAPIUtil* fake_api_util_; // Owned by |sync_service_|.
98 DriveMetadataStore* metadata_store_; // Owned by |sync_service_|. 98 DriveMetadataStore* metadata_store_; // Owned by |sync_service_|.
99 99
100 scoped_ptr<DriveFileSyncService> sync_service_; 100 scoped_ptr<DriveFileSyncService> sync_service_;
(...skipping 24 matching lines...) Expand all
125 base::Bind(&ExpectEqStatus, &done, SYNC_STATUS_OK)); 125 base::Bind(&ExpectEqStatus, &done, SYNC_STATUS_OK));
126 message_loop()->RunUntilIdle(); 126 message_loop()->RunUntilIdle();
127 EXPECT_TRUE(done); 127 EXPECT_TRUE(done);
128 128
129 // Assert the App's origin folder was marked as deleted. 129 // Assert the App's origin folder was marked as deleted.
130 EXPECT_TRUE(fake_api_util()->remote_resources().find(origin_dir_resource_id) 130 EXPECT_TRUE(fake_api_util()->remote_resources().find(origin_dir_resource_id)
131 ->second.deleted); 131 ->second.deleted);
132 } 132 }
133 133
134 } // namespace sync_file_system 134 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698