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

Side by Side Diff: components/storage_monitor/storage_monitor_mac_unittest.mm

Issue 826213004: Update {virtual,override,final} for components/ to follow C++11 style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 #include "components/storage_monitor/storage_monitor_mac.h" 5 #include "components/storage_monitor/storage_monitor_mac.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 23 matching lines...) Expand all
34 device_id, mount_point.value(), base::string16(), base::string16(), 34 device_id, mount_point.value(), base::string16(), base::string16(),
35 base::UTF8ToUTF16(model_name), size_bytes); 35 base::UTF8ToUTF16(model_name), size_bytes);
36 } 36 }
37 37
38 } // namespace 38 } // namespace
39 39
40 class StorageMonitorMacTest : public testing::Test { 40 class StorageMonitorMacTest : public testing::Test {
41 public: 41 public:
42 StorageMonitorMacTest() {} 42 StorageMonitorMacTest() {}
43 43
44 virtual void SetUp() override { 44 void SetUp() override {
45 monitor_.reset(new StorageMonitorMac); 45 monitor_.reset(new StorageMonitorMac);
46 46
47 mock_storage_observer_.reset(new MockRemovableStorageObserver); 47 mock_storage_observer_.reset(new MockRemovableStorageObserver);
48 monitor_->AddObserver(mock_storage_observer_.get()); 48 monitor_->AddObserver(mock_storage_observer_.get());
49 49
50 unique_id_ = "test_id"; 50 unique_id_ = "test_id";
51 mount_point_ = base::FilePath("/unused_test_directory"); 51 mount_point_ = base::FilePath("/unused_test_directory");
52 device_id_ = StorageInfo::MakeDeviceId( 52 device_id_ = StorageInfo::MakeDeviceId(
53 StorageInfo::REMOVABLE_MASS_STORAGE_NO_DCIM, unique_id_); 53 StorageInfo::REMOVABLE_MASS_STORAGE_NO_DCIM, unique_id_);
54 disk_info_ = CreateStorageInfo(device_id_, "", 54 disk_info_ = CreateStorageInfo(device_id_, "",
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 // Test that mounting a DMG doesn't send a notification. 162 // Test that mounting a DMG doesn't send a notification.
163 TEST_F(StorageMonitorMacTest, DMG) { 163 TEST_F(StorageMonitorMacTest, DMG) {
164 StorageInfo info = CreateStorageInfo( 164 StorageInfo info = CreateStorageInfo(
165 device_id_, "Disk Image", mount_point_, kTestSize); 165 device_id_, "Disk Image", mount_point_, kTestSize);
166 UpdateDisk(info, StorageMonitorMac::UPDATE_DEVICE_ADDED); 166 UpdateDisk(info, StorageMonitorMac::UPDATE_DEVICE_ADDED);
167 EXPECT_EQ(0, mock_storage_observer_->attach_calls()); 167 EXPECT_EQ(0, mock_storage_observer_->attach_calls());
168 } 168 }
169 169
170 } // namespace storage_monitor 170 } // namespace storage_monitor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698