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

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

Issue 2352853002: Disallow redundant Bind calls. (Closed)
Patch Set: static_assert message tweak Created 4 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
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 "chrome/browser/sync_file_system/sync_file_system_service.h" 5 #include "chrome/browser/sync_file_system/sync_file_system_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 base::ThreadTaskRunnerHandle::Get()->PostTask( 116 base::ThreadTaskRunnerHandle::Get()->PostTask(
117 FROM_HERE, base::Bind(arg4, status)); 117 FROM_HERE, base::Bind(arg4, status));
118 } 118 }
119 119
120 ACTION_P2(MockSyncFileCallback, status, url) { 120 ACTION_P2(MockSyncFileCallback, status, url) {
121 base::ThreadTaskRunnerHandle::Get()->PostTask( 121 base::ThreadTaskRunnerHandle::Get()->PostTask(
122 FROM_HERE, base::Bind(arg0, status, url)); 122 FROM_HERE, base::Bind(arg0, status, url));
123 } 123 }
124 124
125 ACTION(InvokeCompletionClosure) { 125 ACTION(InvokeCompletionClosure) {
126 base::ThreadTaskRunnerHandle::Get()->PostTask( 126 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, arg0);
127 FROM_HERE, base::Bind(arg0));
128 } 127 }
129 128
130 class SyncFileSystemServiceTest : public testing::Test { 129 class SyncFileSystemServiceTest : public testing::Test {
131 protected: 130 protected:
132 SyncFileSystemServiceTest() 131 SyncFileSystemServiceTest()
133 : thread_bundle_(content::TestBrowserThreadBundle::REAL_FILE_THREAD | 132 : thread_bundle_(content::TestBrowserThreadBundle::REAL_FILE_THREAD |
134 content::TestBrowserThreadBundle::REAL_IO_THREAD) {} 133 content::TestBrowserThreadBundle::REAL_IO_THREAD) {}
135 134
136 void SetUp() override { 135 void SetUp() override {
137 in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default())); 136 in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default()));
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 base::Bind(&AssignValueAndQuit<SyncFileStatus>, 481 base::Bind(&AssignValueAndQuit<SyncFileStatus>,
483 &run_loop, &status, &sync_file_status)); 482 &run_loop, &status, &sync_file_status));
484 run_loop.Run(); 483 run_loop.Run();
485 484
486 EXPECT_EQ(SYNC_STATUS_OK, status); 485 EXPECT_EQ(SYNC_STATUS_OK, status);
487 EXPECT_EQ(SYNC_FILE_STATUS_HAS_PENDING_CHANGES, sync_file_status); 486 EXPECT_EQ(SYNC_FILE_STATUS_HAS_PENDING_CHANGES, sync_file_status);
488 } 487 }
489 } 488 }
490 489
491 } // namespace sync_file_system 490 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698