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

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

Issue 1402553002: Don't use base::MessageLoop::{Quit,QuitClosure} in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 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 // StorageMonitorLinux unit tests. 5 // StorageMonitorLinux unit tests.
6 6
7 #include "components/storage_monitor/storage_monitor_linux.h" 7 #include "components/storage_monitor/storage_monitor_linux.h"
8 8
9 #include <mntent.h> 9 #include <mntent.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 new TestMediaTransferProtocolManagerLinux()); 127 new TestMediaTransferProtocolManagerLinux());
128 SetGetDeviceInfoCallbackForTest(base::Bind(&GetDeviceInfo)); 128 SetGetDeviceInfoCallbackForTest(base::Bind(&GetDeviceInfo));
129 } 129 }
130 ~TestStorageMonitorLinux() override {} 130 ~TestStorageMonitorLinux() override {}
131 131
132 private: 132 private:
133 void UpdateMtab( 133 void UpdateMtab(
134 const MtabWatcherLinux::MountPointDeviceMap& new_mtab) override { 134 const MtabWatcherLinux::MountPointDeviceMap& new_mtab) override {
135 StorageMonitorLinux::UpdateMtab(new_mtab); 135 StorageMonitorLinux::UpdateMtab(new_mtab);
136 base::ThreadTaskRunnerHandle::Get()->PostTask( 136 base::ThreadTaskRunnerHandle::Get()->PostTask(
137 FROM_HERE, base::MessageLoop::QuitClosure()); 137 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
138 } 138 }
139 139
140 DISALLOW_COPY_AND_ASSIGN(TestStorageMonitorLinux); 140 DISALLOW_COPY_AND_ASSIGN(TestStorageMonitorLinux);
141 }; 141 };
142 142
143 class StorageMonitorLinuxTest : public testing::Test { 143 class StorageMonitorLinuxTest : public testing::Test {
144 public: 144 public:
145 struct MtabTestData { 145 struct MtabTestData {
146 MtabTestData(const std::string& mount_device, 146 MtabTestData(const std::string& mount_device,
147 const std::string& mount_point, 147 const std::string& mount_point,
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 GetStorageSize(test_path_a)); 677 GetStorageSize(test_path_a));
678 EXPECT_EQ(GetDevicePartitionSize(kDeviceNoDCIM), 678 EXPECT_EQ(GetDevicePartitionSize(kDeviceNoDCIM),
679 GetStorageSize(test_path_b)); 679 GetStorageSize(test_path_b));
680 EXPECT_EQ(GetDevicePartitionSize(kInvalidPath), 680 EXPECT_EQ(GetDevicePartitionSize(kInvalidPath),
681 GetStorageSize(base::FilePath(kInvalidPath))); 681 GetStorageSize(base::FilePath(kInvalidPath)));
682 } 682 }
683 683
684 } // namespace 684 } // namespace
685 685
686 } // namespace storage_monitor 686 } // namespace storage_monitor
OLDNEW
« no previous file with comments | « components/storage_monitor/storage_monitor_chromeos_unittest.cc ('k') | components/wallpaper/wallpaper_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698