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

Side by Side Diff: chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux_unittest.cc

Issue 15846002: Rename 'harddisk' to 'fixed' for storage unit type (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 7 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 (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 // StorageInfoProviderLinux unit tests. 5 // StorageInfoProviderLinux unit tests.
6 6
7 #include "chrome/browser/extensions/api/system_info_storage/storage_info_provide r_linux.h" 7 #include "chrome/browser/extensions/api/system_info_storage/storage_info_provide r_linux.h"
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 21 matching lines...) Expand all
32 "/dev/sdb /home ext4 rw 0 0"; 32 "/dev/sdb /home ext4 rw 0 0";
33 33
34 struct TestMountEntry { 34 struct TestMountEntry {
35 std::string mnt_path; 35 std::string mnt_path;
36 std::string type; 36 std::string type;
37 double capacity; 37 double capacity;
38 double available_capacity; 38 double available_capacity;
39 }; 39 };
40 40
41 const TestMountEntry mount_entries[] = { 41 const TestMountEntry mount_entries[] = {
42 { "/boot", "harddisk", 100, 50 }, 42 { "/boot", systeminfo::kStorageTypeFixed, 100, 50 },
43 { "/", "harddisk", 200, 100 }, 43 { "/", systeminfo::kStorageTypeFixed, 200, 100 },
44 { "/home", "removable", 300, 100 } 44 { "/home", systeminfo::kStorageTypeRemovable, 300, 100 }
45 }; 45 };
46 46
47 typedef std::map<std::string, struct TestMountEntry> TestMountEntryMap; 47 typedef std::map<std::string, struct TestMountEntry> TestMountEntryMap;
48 48
49 } // namespace 49 } // namespace
50 50
51 class StorageInfoProviderLinuxWrapper : public StorageInfoProviderLinux { 51 class StorageInfoProviderLinuxWrapper : public StorageInfoProviderLinux {
52 public: 52 public:
53 explicit StorageInfoProviderLinuxWrapper(const base::FilePath& mtab_path) 53 explicit StorageInfoProviderLinuxWrapper(const base::FilePath& mtab_path)
54 : StorageInfoProviderLinux(mtab_path) { 54 : StorageInfoProviderLinux(mtab_path) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 TEST_F(StorageInfoProviderLinuxTest, QueryInfoFailed) { 140 TEST_F(StorageInfoProviderLinuxTest, QueryInfoFailed) {
141 storage_info_provider_ = 141 storage_info_provider_ =
142 new StorageInfoProviderLinuxWrapper(base::FilePath("/invalid/file/path")); 142 new StorageInfoProviderLinuxWrapper(base::FilePath("/invalid/file/path"));
143 StorageInfo info; 143 StorageInfo info;
144 ASSERT_FALSE(QueryInfo(&info)); 144 ASSERT_FALSE(QueryInfo(&info));
145 EXPECT_EQ(0u, info.size()); 145 EXPECT_EQ(0u, info.size());
146 } 146 }
147 147
148 } // namespace extensions 148 } // namespace extensions
149 149
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698