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

Side by Side Diff: chrome/test/data/extensions/platform_apps/get_display_path/test.js

Issue 2297043002: Web expose FileSystemFileEntry, FileSystemDirectoryEntry and friends (Closed)
Patch Set: Rebased Created 4 years, 1 month 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 chrome.app.runtime.onLaunched.addListener(function (launchData) { 5 chrome.app.runtime.onLaunched.addListener(function (launchData) {
6 // Test that the isKioskSession field is |false| and the items field is 6 // Test that the isKioskSession field is |false| and the items field is
7 // populated correctly in the launch data and that the FileEntry in 7 // populated correctly in the launch data and that the FileSystemFileEntry in
8 // launchData.items[0].entry can have its display path gotten. 8 // launchData.items[0].entry can have its display path gotten.
9 chrome.test.runTests([ 9 chrome.test.runTests([
10 function testGetDisplayPath() { 10 function testGetDisplayPath() {
11 chrome.test.assertFalse(!launchData, "No launchData"); 11 chrome.test.assertFalse(!launchData, "No launchData");
12 chrome.test.assertFalse(launchData.isKioskSession, 12 chrome.test.assertFalse(launchData.isKioskSession,
13 "launchData.isKioskSession incorrect"); 13 "launchData.isKioskSession incorrect");
14 chrome.test.assertFalse(!launchData.items[0], "No launchData.items[0]"); 14 chrome.test.assertFalse(!launchData.items[0], "No launchData.items[0]");
15 chrome.test.assertFalse(!launchData.items[0].entry, 15 chrome.test.assertFalse(!launchData.items[0].entry,
16 "No launchData.items[0].entry"); 16 "No launchData.items[0].entry");
17 var entry = launchData.items[0].entry; 17 var entry = launchData.items[0].entry;
18 chrome.fileSystem.getDisplayPath(entry, 18 chrome.fileSystem.getDisplayPath(entry,
19 chrome.test.callbackPass(function(path) { 19 chrome.test.callbackPass(function(path) {
20 chrome.test.assertFalse(path.indexOf('test.txt') == -1); 20 chrome.test.assertFalse(path.indexOf('test.txt') == -1);
21 })); 21 }));
22 } 22 }
23 ]); 23 ]);
24 }); 24 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698