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

Unified Diff: chrome/test/data/extensions/api_test/file_system/get_volume_list/background.js

Issue 1029803004: Add chrome.fileSystem.GetVolumeList(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed chrome_extensions.js. Created 5 years, 8 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/file_system/get_volume_list/background.js
diff --git a/chrome/test/data/extensions/api_test/file_system/get_volume_list/background.js b/chrome/test/data/extensions/api_test/file_system/get_volume_list/background.js
new file mode 100644
index 0000000000000000000000000000000000000000..44c89ab07891d4ae90df194a0ecbed6adb151cf0
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/file_system/get_volume_list/background.js
@@ -0,0 +1,26 @@
+// Copyright 2015 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.
+
+chrome.test.runTests([
+ function getVolumeList() {
+ chrome.fileSystem.getVolumeList(
+ chrome.test.callbackPass(function(volumeList) {
+ // Drive is not available in a real kiosk session. Hhowever, this test
+ // runs in a normal session (with a user marked as kiosk user) since
+ // executing a real real kiosk session is tests is very complicated.
+ // Whether Drive is available in the real kiosk session is tested
+ // separetely in: chrome/browser/chromeos/login/kiosk_browsertest.cc.
+ chrome.test.assertEq(4, volumeList.length);
+ chrome.test.assertEq('downloads:Downloads', volumeList[0].volumeId);
+ chrome.test.assertTrue(volumeList[0].writable);
+ chrome.test.assertEq('drive:drive-user', volumeList[1].volumeId);
+ chrome.test.assertTrue(volumeList[1].writable);
+
+ chrome.test.assertEq('testing:read-only', volumeList[2].volumeId);
+ chrome.test.assertFalse(volumeList[2].writable);
+ chrome.test.assertEq('testing:writable', volumeList[3].volumeId);
+ chrome.test.assertTrue(volumeList[3].writable);
+ }));
+ }
+]);

Powered by Google App Engine
This is Rietveld 408576698