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

Side by Side Diff: components/gcm_driver/gcm_driver_desktop_unittest.cc

Issue 1231673010: Delete message loops from gcm unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | components/gcm_driver/instance_id/instance_id_driver_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/gcm_driver/gcm_driver_desktop.h" 5 #include "components/gcm_driver/gcm_driver_desktop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return async_operation_completed_callback_; 149 return async_operation_completed_callback_;
150 } 150 }
151 void set_async_operation_completed_callback(const base::Closure& callback) { 151 void set_async_operation_completed_callback(const base::Closure& callback) {
152 async_operation_completed_callback_ = callback; 152 async_operation_completed_callback_ = callback;
153 } 153 }
154 154
155 private: 155 private:
156 base::ScopedTempDir temp_dir_; 156 base::ScopedTempDir temp_dir_;
157 TestingPrefServiceSimple prefs_; 157 TestingPrefServiceSimple prefs_;
158 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; 158 scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
159 base::MessageLoopForUI message_loop_;
160 base::Thread io_thread_; 159 base::Thread io_thread_;
161 base::FieldTrialList field_trial_list_; 160 base::FieldTrialList field_trial_list_;
162 scoped_ptr<GCMDriverDesktop> driver_; 161 scoped_ptr<GCMDriverDesktop> driver_;
163 scoped_ptr<FakeGCMAppHandler> gcm_app_handler_; 162 scoped_ptr<FakeGCMAppHandler> gcm_app_handler_;
164 scoped_ptr<FakeGCMConnectionObserver> gcm_connection_observer_; 163 scoped_ptr<FakeGCMConnectionObserver> gcm_connection_observer_;
165 164
166 base::Closure async_operation_completed_callback_; 165 base::Closure async_operation_completed_callback_;
167 166
168 std::string registration_id_; 167 std::string registration_id_;
169 GCMClient::Result registration_result_; 168 GCMClient::Result registration_result_;
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 PumpUILoop(); 1282 PumpUILoop();
1284 EXPECT_EQ(GCMClient::UNKNOWN_ERROR, unregistration_result()); 1283 EXPECT_EQ(GCMClient::UNKNOWN_ERROR, unregistration_result());
1285 1284
1286 // DeleteToken operation will be invoked after GCMClient becomes ready. 1285 // DeleteToken operation will be invoked after GCMClient becomes ready.
1287 GetGCMClient()->PerformDelayedStart(); 1286 GetGCMClient()->PerformDelayedStart();
1288 WaitForAsyncOperation(); 1287 WaitForAsyncOperation();
1289 EXPECT_EQ(GCMClient::SUCCESS, unregistration_result()); 1288 EXPECT_EQ(GCMClient::SUCCESS, unregistration_result());
1290 } 1289 }
1291 1290
1292 } // namespace gcm 1291 } // namespace gcm
OLDNEW
« no previous file with comments | « no previous file | components/gcm_driver/instance_id/instance_id_driver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698