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

Side by Side Diff: chrome/test/data/extensions/api_test/file_system_provider/get_metadata/test.js

Issue 246913003: [fsp] Add support for reading directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 'use strict'; 5 'use strict';
6 6
7 var fileSystemId; 7 var fileSystemId;
8 var fileSystem; 8 var fileSystem;
9 9
10 /** 10 /**
(...skipping 18 matching lines...) Expand all
29 modificationTime: new Date(2014, 4, 28, 10, 39, 15) 29 modificationTime: new Date(2014, 4, 28, 10, 39, 15)
30 }); 30 });
31 31
32 /** 32 /**
33 * Returns metadata for a requested entry. 33 * Returns metadata for a requested entry.
34 * 34 *
35 * @param {number} inFileSystemId ID of the file system. 35 * @param {number} inFileSystemId ID of the file system.
36 * @param {string} entryPath Path of the requested entry. 36 * @param {string} entryPath Path of the requested entry.
37 * @param {function(Object)} onSuccess Success callback with metadata passed 37 * @param {function(Object)} onSuccess Success callback with metadata passed
38 * an argument. 38 * an argument.
39 * @param {function(string}} onError Error callback with an error code. 39 * @param {function(string)} onError Error callback with an error code.
40 */ 40 */
41 function onGetMetadataRequested( 41 function onGetMetadataRequested(
42 inFileSystemId, entryPath, onSuccess, onError) { 42 inFileSystemId, entryPath, onSuccess, onError) {
43 if (inFileSystemId != fileSystemId) { 43 if (inFileSystemId != fileSystemId) {
44 onError('SECURITY_ERROR'); // enum ProviderError. 44 onError('SECURITY_ERROR'); // enum ProviderError.
45 return; 45 return;
46 } 46 }
47 47
48 if (entryPath == '/') { 48 if (entryPath == '/') {
49 onSuccess(TESTING_ROOT); 49 onSuccess(TESTING_ROOT);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 function(error) { 157 function(error) {
158 chrome.test.assertEq('TypeMismatchError', error.name); 158 chrome.test.assertEq('TypeMismatchError', error.name);
159 onSuccess(); 159 onSuccess();
160 }); 160 });
161 } 161 }
162 ]); 162 ]);
163 } 163 }
164 164
165 // Setup and run all of the test cases. 165 // Setup and run all of the test cases.
166 setUp(runTests); 166 setUp(runTests);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698