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

Side by Side Diff: chrome/browser/extensions/api/system_info_storage/system_info_storage_apitest.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 #include "base/command_line.h" 4 #include "base/command_line.h"
5 #include "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/timer.h" 6 #include "base/timer.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/api/system_info_storage/storage_info_provide r.h" 8 #include "chrome/browser/extensions/api/system_info_storage/storage_info_provide r.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/extensions/extension_test_message_listener.h" 10 #include "chrome/browser/extensions/extension_test_message_listener.h"
(...skipping 13 matching lines...) Expand all
24 struct TestUnitInfo { 24 struct TestUnitInfo {
25 std::string id; 25 std::string id;
26 std::string type; 26 std::string type;
27 double capacity; 27 double capacity;
28 double available_capacity; 28 double available_capacity;
29 // The change step of free space. 29 // The change step of free space.
30 int change_step; 30 int change_step;
31 }; 31 };
32 32
33 struct TestUnitInfo kTestingData[] = { 33 struct TestUnitInfo kTestingData[] = {
34 {"0xbeaf", "unknown", 4098, 1000, 0}, 34 {"0xbeaf", "unknown", 4098, 1000, 0},
vandebo (ex-Chrome) 2013/05/23 15:49:44 Use constants
Hongbo Min 2013/05/24 01:03:14 Done.
35 {"/home", "harddisk", 4098, 1000, 10}, 35 {"/home", "fixed", 4098, 1000, 10},
36 {"/data", "harddisk", 10000, 1000, 4097} 36 {"/data", "fixed", 10000, 1000, 4097}
37 }; 37 };
38 38
39 struct TestUnitInfo kRemovableStorageData[] = { 39 struct TestUnitInfo kRemovableStorageData[] = {
40 {"/media/usb1", "removable", 4098, 1000, 1} 40 {"/media/usb1", "removable", 4098, 1000, 1}
41 }; 41 };
42 42
43 const char kRemovableStorageDeviceName[] = "deviceName"; 43 const char kRemovableStorageDeviceName[] = "deviceName";
44 const char kRemovableStorageDeviceId[] = "path://0xbeaf1"; 44 const char kRemovableStorageDeviceId[] = "path://0xbeaf1";
45 const base::FilePath::CharType kRemovableStorageLocation[] = 45 const base::FilePath::CharType kRemovableStorageLocation[] =
46 FILE_PATH_LITERAL("/media/usb1"); 46 FILE_PATH_LITERAL("/media/usb1");
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 ASSERT_TRUE(attach_listener.WaitUntilSatisfied()); 145 ASSERT_TRUE(attach_listener.WaitUntilSatisfied());
146 ProcessAttach(kRemovableStorageDeviceId, 146 ProcessAttach(kRemovableStorageDeviceId,
147 ASCIIToUTF16(kRemovableStorageDeviceName), 147 ASCIIToUTF16(kRemovableStorageDeviceName),
148 kRemovableStorageLocation); 148 kRemovableStorageLocation);
149 // Simulate triggering onDetached event. 149 // Simulate triggering onDetached event.
150 ASSERT_TRUE(detach_listener.WaitUntilSatisfied()); 150 ASSERT_TRUE(detach_listener.WaitUntilSatisfied());
151 ProcessDetach(kRemovableStorageDeviceId); 151 ProcessDetach(kRemovableStorageDeviceId);
152 152
153 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 153 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
154 } 154 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698