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

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

Issue 120303003: [StorageMonitor] Move gallery name generation to StorageInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address vandebo's comments Created 6 years, 9 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/file_util.h" 8 #include "base/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 13 matching lines...) Expand all
24 namespace storage_monitor { 24 namespace storage_monitor {
25 25
26 namespace { 26 namespace {
27 27
28 StorageInfo CreateStorageInfo( 28 StorageInfo CreateStorageInfo(
29 const std::string& device_id, 29 const std::string& device_id,
30 const std::string& model_name, 30 const std::string& model_name,
31 const base::FilePath& mount_point, 31 const base::FilePath& mount_point,
32 uint64 size_bytes) { 32 uint64 size_bytes) {
33 return StorageInfo( 33 return StorageInfo(
34 device_id, base::string16(), mount_point.value(), 34 device_id, mount_point.value(), base::string16(), base::string16(),
35 base::string16(), base::string16(), base::UTF8ToUTF16(model_name), 35 base::UTF8ToUTF16(model_name), size_bytes);
36 size_bytes);
37 } 36 }
38 37
39 } // namespace 38 } // namespace
40 39
41 class StorageMonitorMacTest : public testing::Test { 40 class StorageMonitorMacTest : public testing::Test {
42 public: 41 public:
43 StorageMonitorMacTest() {} 42 StorageMonitorMacTest() {}
44 43
45 virtual void SetUp() OVERRIDE { 44 virtual void SetUp() OVERRIDE {
46 monitor_.reset(new StorageMonitorMac); 45 monitor_.reset(new StorageMonitorMac);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 167
169 // Test that mounting a DMG doesn't send a notification. 168 // Test that mounting a DMG doesn't send a notification.
170 TEST_F(StorageMonitorMacTest, DMG) { 169 TEST_F(StorageMonitorMacTest, DMG) {
171 StorageInfo info = CreateStorageInfo( 170 StorageInfo info = CreateStorageInfo(
172 device_id_, "Disk Image", mount_point_, kTestSize); 171 device_id_, "Disk Image", mount_point_, kTestSize);
173 UpdateDisk(info, StorageMonitorMac::UPDATE_DEVICE_ADDED); 172 UpdateDisk(info, StorageMonitorMac::UPDATE_DEVICE_ADDED);
174 EXPECT_EQ(0, mock_storage_observer_->attach_calls()); 173 EXPECT_EQ(0, mock_storage_observer_->attach_calls());
175 } 174 }
176 175
177 } // namespace storage_monitor 176 } // namespace storage_monitor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698