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

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

Issue 10824232: Add systeminfo.storage API implementation skeleton (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/systeminfo/storage/test_storage_api.js
diff --git a/chrome/test/data/extensions/api_test/systeminfo/storage/test_storage_api.js b/chrome/test/data/extensions/api_test/systeminfo/storage/test_storage_api.js
new file mode 100644
index 0000000000000000000000000000000000000000..1595d608a74a16f0c1afa073d3d9dd209b855230
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/systeminfo/storage/test_storage_api.js
@@ -0,0 +1,22 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// systeminfo.storage api test
+// browser_tests.exe --gtest_filter=SysteminfoStorageApiTest.Storage
+
+chrome.systeminfo = chrome.experimental.systeminfo;
+
+chrome.test.runTests([
+ function testGet() {
+ chrome.systeminfo.storage.get(chrome.test.callbackPass(function(info) {
+ // TODO: Need to check the value from Mock implementation
+ chrome.test.assertTrue(info.units.length > 0);
+ var unit = info.units[0];
+ chrome.test.assertTrue(unit.id == "0xbeaf");
+ chrome.test.assertTrue(unit.type == "unknown");
+ chrome.test.assertTrue(unit.capacity == 4098);
+ chrome.test.assertTrue(unit.availableCapacity == 1000);
+ }));
+ }
+]);

Powered by Google App Engine
This is Rietveld 408576698