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

Side by Side Diff: components/search_engines/search_engine_data_type_controller_unittest.cc

Issue 2053913002: Remove MessageLoop::current()->RunUntilIdle() in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 "components/search_engines/search_engine_data_type_controller.h" 5 #include "components/search_engines/search_engine_data_type_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 EXPECT_CALL(model_load_callback_, Run(_, _)); 77 EXPECT_CALL(model_load_callback_, Run(_, _));
78 } 78 }
79 79
80 void Start() { 80 void Start() {
81 search_engine_dtc_->LoadModels( 81 search_engine_dtc_->LoadModels(
82 base::Bind(&sync_driver::ModelLoadCallbackMock::Run, 82 base::Bind(&sync_driver::ModelLoadCallbackMock::Run,
83 base::Unretained(&model_load_callback_))); 83 base::Unretained(&model_load_callback_)));
84 search_engine_dtc_->StartAssociating( 84 search_engine_dtc_->StartAssociating(
85 base::Bind(&sync_driver::StartCallbackMock::Run, 85 base::Bind(&sync_driver::StartCallbackMock::Run,
86 base::Unretained(&start_callback_))); 86 base::Unretained(&start_callback_)));
87 base::MessageLoop::current()->RunUntilIdle(); 87 base::RunLoop().RunUntilIdle();
88 } 88 }
89 89
90 base::MessageLoop message_loop_; 90 base::MessageLoop message_loop_;
91 std::unique_ptr<TemplateURLService> template_url_service_; 91 std::unique_ptr<TemplateURLService> template_url_service_;
92 scoped_refptr<SearchEngineDataTypeController> search_engine_dtc_; 92 scoped_refptr<SearchEngineDataTypeController> search_engine_dtc_;
93 SyncApiComponentFactoryMock profile_sync_factory_; 93 SyncApiComponentFactoryMock profile_sync_factory_;
94 syncer::FakeSyncableService syncable_service_; 94 syncer::FakeSyncableService syncable_service_;
95 sync_driver::StartCallbackMock start_callback_; 95 sync_driver::StartCallbackMock start_callback_;
96 sync_driver::ModelLoadCallbackMock model_load_callback_; 96 sync_driver::ModelLoadCallbackMock model_load_callback_;
97 }; 97 };
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 EXPECT_FALSE(syncable_service_.syncing()); 182 EXPECT_FALSE(syncable_service_.syncing());
183 search_engine_dtc_->Stop(); 183 search_engine_dtc_->Stop();
184 EXPECT_EQ(NULL, search_engine_dtc_->GetSubscriptionForTesting()); 184 EXPECT_EQ(NULL, search_engine_dtc_->GetSubscriptionForTesting());
185 EXPECT_EQ(sync_driver::DataTypeController::NOT_RUNNING, 185 EXPECT_EQ(sync_driver::DataTypeController::NOT_RUNNING,
186 search_engine_dtc_->state()); 186 search_engine_dtc_->state());
187 EXPECT_FALSE(syncable_service_.syncing()); 187 EXPECT_FALSE(syncable_service_.syncing());
188 } 188 }
189 189
190 } // namespace 190 } // namespace
191 } // namespace browser_sync 191 } // namespace browser_sync
OLDNEW
« no previous file with comments | « components/safe_browsing_db/v4_database_unittest.cc ('k') | components/suggestions/suggestions_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698