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

Side by Side Diff: chrome/test/data/extensions/api_test/systeminfo/storage/test_storage_api.js

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
« no previous file with comments | « chrome/common/extensions/api/experimental_system_info_storage.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // systemInfo.storage api test 5 // systemInfo.storage api test
6 // browser_tests --gtest_filter=SystemInfoStorageApiTest.Storage 6 // browser_tests --gtest_filter=SystemInfoStorageApiTest.Storage
7 chrome.systemInfo = chrome.experimental.systemInfo; 7 chrome.systemInfo = chrome.experimental.systemInfo;
8 8
9 // Testing data should be the same as that in system_info_storage_apitest.cc 9 // Testing data should be the same as that in system_info_storage_apitest.cc
10 var testData = [ 10 var testData = [
11 { id: "0xbeaf", type: "unknown", capacity: 4098, 11 { id: "0xbeaf", type: "unknown", capacity: 4098,
12 availableCapacity: 1000, step: 0 }, 12 availableCapacity: 1000, step: 0 },
13 { id: "/home", type: "harddisk", capacity: 4098, 13 { id: "/home", type: "fixed", capacity: 4098,
14 availableCapacity: 1000, step: 10 }, 14 availableCapacity: 1000, step: 10 },
15 { id: "/data", type: "harddisk", capacity: 10000, 15 { id: "/data", type: "fixed", capacity: 10000,
16 availableCapacity: 1000, step: 4097 } 16 availableCapacity: 1000, step: 4097 }
17 ]; 17 ];
18 18
19 chrome.test.runTests([ 19 chrome.test.runTests([
20 function testGet() { 20 function testGet() {
21 chrome.systemInfo.storage.get(chrome.test.callbackPass(function(units) { 21 chrome.systemInfo.storage.get(chrome.test.callbackPass(function(units) {
22 chrome.test.assertTrue(units.length == 3); 22 chrome.test.assertTrue(units.length == 3);
23 for (var i = 0; i < units.length; ++i) { 23 for (var i = 0; i < units.length; ++i) {
24 chrome.test.assertEq(testData[i].id, units[i].id); 24 chrome.test.assertEq(testData[i].id, units[i].id);
25 chrome.test.assertEq(testData[i].type, units[i].type); 25 chrome.test.assertEq(testData[i].type, units[i].type);
(...skipping 24 matching lines...) Expand all
50 chrome.test.fail("No matched storage id is found!"); 50 chrome.test.fail("No matched storage id is found!");
51 51
52 if (++numOfChangedEvent > 10) { 52 if (++numOfChangedEvent > 10) {
53 chrome.systemInfo.storage.onAvailableCapacityChanged.removeListener( 53 chrome.systemInfo.storage.onAvailableCapacityChanged.removeListener(
54 listener); 54 listener);
55 setTimeout(callbackCompleted, 0); 55 setTimeout(callbackCompleted, 0);
56 } 56 }
57 }); 57 });
58 } 58 }
59 ]); 59 ]);
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/experimental_system_info_storage.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698