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

Side by Side Diff: chrome/browser/system_monitor/removable_storage_notifications_unittest.cc

Issue 11573048: [Media Galleries] Move RemovableStorageInfo notifications to chrome namespace (part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 7 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 | 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/system_monitor/removable_storage_notifications.h" 7 #include "chrome/browser/system_monitor/removable_storage_notifications.h"
8 #include "chrome/browser/system_monitor/removable_storage_notifications_test_uti l.h" 8 #include "chrome/browser/system_monitor/removable_storage_notifications_test_uti l.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace chrome { 11 namespace chrome {
12 12
13 class TestStorageNotifications : public RemovableStorageNotifications { 13 class TestStorageNotifications : public RemovableStorageNotifications {
14 public: 14 public:
15 TestStorageNotifications() : RemovableStorageNotifications() {} 15 TestStorageNotifications() : RemovableStorageNotifications() {}
16 ~TestStorageNotifications() {} 16 ~TestStorageNotifications() {}
17 17
18 virtual bool GetDeviceInfoForPath( 18 virtual bool GetDeviceInfoForPath(
19 const FilePath& path, 19 const FilePath& path,
20 base::SystemMonitor::RemovableStorageInfo* device_info) const OVERRIDE { 20 StorageInfo* device_info) const OVERRIDE {
21 return false; 21 return false;
22 } 22 }
23 virtual uint64 GetStorageSize(const std::string& location) const OVERRIDE { 23 virtual uint64 GetStorageSize(const std::string& location) const OVERRIDE {
24 return 0; 24 return 0;
25 } 25 }
26 26
27 void ProcessAttach(const std::string& id, 27 void ProcessAttach(const std::string& id,
28 const string16& name, 28 const string16& name,
29 const FilePath::StringType& location) { 29 const FilePath::StringType& location) {
30 RemovableStorageNotifications::ProcessAttach(id, name, location); 30 RemovableStorageNotifications::ProcessAttach(id, name, location);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 EXPECT_EQ(kDeviceName2, devices[0].name); 125 EXPECT_EQ(kDeviceName2, devices[0].name);
126 EXPECT_EQ(kDevicePath2.value(), devices[0].location); 126 EXPECT_EQ(kDevicePath2.value(), devices[0].location);
127 127
128 notifications.ProcessDetach(kDeviceId2); 128 notifications.ProcessDetach(kDeviceId2);
129 message_loop.RunUntilIdle(); 129 message_loop.RunUntilIdle();
130 devices = notifications.GetAttachedStorage(); 130 devices = notifications.GetAttachedStorage();
131 EXPECT_EQ(0U, devices.size()); 131 EXPECT_EQ(0U, devices.size());
132 } 132 }
133 133
134 } // namespace chrome 134 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698