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

Side by Side Diff: components/storage_monitor/storage_monitor_chromeos_unittest.cc

Issue 2315833003: Remove calls to deprecated MessageLoop methods in components. (Closed)
Patch Set: 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
« no previous file with comments | « components/exo/gamepad_unittest.cc ('k') | no next file » | 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/storage_monitor/storage_monitor_chromeos.h" 5 #include "components/storage_monitor/storage_monitor_chromeos.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // static 250 // static
251 void StorageMonitorCrosTest::PostQuitToUIThread() { 251 void StorageMonitorCrosTest::PostQuitToUIThread() {
252 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 252 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
253 base::MessageLoop::QuitWhenIdleClosure()); 253 base::MessageLoop::QuitWhenIdleClosure());
254 } 254 }
255 255
256 // static 256 // static
257 void StorageMonitorCrosTest::WaitForFileThread() { 257 void StorageMonitorCrosTest::WaitForFileThread() {
258 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 258 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
259 base::Bind(&PostQuitToUIThread)); 259 base::Bind(&PostQuitToUIThread));
260 base::MessageLoop::current()->Run(); 260 base::RunLoop().Run();
261 } 261 }
262 262
263 void StorageMonitorCrosTest::EjectNotify(StorageMonitor::EjectStatus status) { 263 void StorageMonitorCrosTest::EjectNotify(StorageMonitor::EjectStatus status) {
264 status_ = status; 264 status_ = status;
265 } 265 }
266 266
267 // Simple test case where we attach and detach a media device. 267 // Simple test case where we attach and detach a media device.
268 TEST_F(StorageMonitorCrosTest, BasicAttachDetach) { 268 TEST_F(StorageMonitorCrosTest, BasicAttachDetach) {
269 base::FilePath mount_path1 = CreateMountPoint(kMountPointA, true); 269 base::FilePath mount_path1 = CreateMountPoint(kMountPointA, true);
270 ASSERT_FALSE(mount_path1.empty()); 270 ASSERT_FALSE(mount_path1.empty());
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 base::Bind(&StorageMonitorCrosTest::EjectNotify, 550 base::Bind(&StorageMonitorCrosTest::EjectNotify,
551 base::Unretained(this))); 551 base::Unretained(this)));
552 base::RunLoop().RunUntilIdle(); 552 base::RunLoop().RunUntilIdle();
553 553
554 EXPECT_EQ(StorageMonitor::EJECT_OK, status_); 554 EXPECT_EQ(StorageMonitor::EJECT_OK, status_);
555 } 555 }
556 556
557 } // namespace 557 } // namespace
558 558
559 } // namespace storage_monitor 559 } // namespace storage_monitor
OLDNEW
« no previous file with comments | « components/exo/gamepad_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698