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

Side by Side Diff: chrome/browser/storage_monitor/storage_monitor_mac_unittest.mm

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 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 | Annotate | Revision Log
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/storage_monitor/storage_monitor_mac.h" 5 #include "chrome/browser/storage_monitor/storage_monitor_mac.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void UpdateDisk(StorageInfo info, StorageMonitorMac::UpdateType update_type) { 60 void UpdateDisk(StorageInfo info, StorageMonitorMac::UpdateType update_type) {
61 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 61 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
62 base::Bind(&StorageMonitorMac::UpdateDisk, 62 base::Bind(&StorageMonitorMac::UpdateDisk,
63 base::Unretained(monitor_.get()), 63 base::Unretained(monitor_.get()),
64 "dummy_bsd_name", info, update_type)); 64 "dummy_bsd_name", info, update_type));
65 base::RunLoop().RunUntilIdle(); 65 base::RunLoop().RunUntilIdle();
66 } 66 }
67 67
68 protected: 68 protected:
69 // The message loop and file thread to run tests on. 69 // The message loop and file thread to run tests on.
70 MessageLoopForUI message_loop_; 70 base::MessageLoopForUI message_loop_;
71 content::TestBrowserThread ui_thread_; 71 content::TestBrowserThread ui_thread_;
72 content::TestBrowserThread file_thread_; 72 content::TestBrowserThread file_thread_;
73 73
74 scoped_ptr<MockRemovableStorageObserver> mock_storage_observer_; 74 scoped_ptr<MockRemovableStorageObserver> mock_storage_observer_;
75 75
76 // Information about the disk. 76 // Information about the disk.
77 std::string unique_id_; 77 std::string unique_id_;
78 base::FilePath mount_point_; 78 base::FilePath mount_point_;
79 std::string device_id_; 79 std::string device_id_;
80 StorageInfo disk_info_; 80 StorageInfo disk_info_;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 // Test that mounting a DMG doesn't send a notification. 173 // Test that mounting a DMG doesn't send a notification.
174 TEST_F(StorageMonitorMacTest, DMG) { 174 TEST_F(StorageMonitorMacTest, DMG) {
175 StorageInfo info = CreateStorageInfo( 175 StorageInfo info = CreateStorageInfo(
176 device_id_, "Disk Image", mount_point_, kTestSize); 176 device_id_, "Disk Image", mount_point_, kTestSize);
177 UpdateDisk(info, StorageMonitorMac::UPDATE_DEVICE_ADDED); 177 UpdateDisk(info, StorageMonitorMac::UPDATE_DEVICE_ADDED);
178 EXPECT_EQ(0, mock_storage_observer_->attach_calls()); 178 EXPECT_EQ(0, mock_storage_observer_->attach_calls());
179 } 179 }
180 180
181 } // namespace chrome 181 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698