OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 /** | 5 /** |
6 * Mock out the chrome.fileBrowserPrivate API for use in the harness. | 6 * Mock out the chrome.fileBrowserPrivate API for use in the harness. |
7 */ | 7 */ |
8 chrome.fileBrowserPrivate = { | 8 chrome.fileBrowserPrivate = { |
9 | 9 |
10 /** | 10 /** |
11 * Return a normal HTML5 filesystem api, rather than the real local | 11 * Return a normal HTML5 filesystem api, rather than the real local |
12 * filesystem. | 12 * filesystem. |
13 * | 13 * |
14 * You must start chrome with --allow-file-access-from-files and | 14 * You must start chrome with --allow-file-access-from-files and |
15 * --unlimited-quota-for-files in order for this to work. | 15 * --unlimited-quota-for-files in order for this to work. |
16 */ | 16 */ |
17 requestLocalFileSystem: function(callback) { | 17 requestLocalFileSystem: function(callback) { |
18 window.requestFileSystem(window.PERSISTENT, 16 * 1024 * 1024, | 18 window.webkitRequestFileSystem(window.PERSISTENT, 16 * 1024 * 1024, |
19 callback, | 19 callback, |
20 util.ferr('Error requesting filesystem')); | 20 util.ferr('Error requesting filesystem')); |
21 }, | 21 }, |
22 | 22 |
23 /** | 23 /** |
24 * View multiple files. | 24 * View multiple files. |
25 */ | 25 */ |
26 viewFiles: function(selectedFiles) { | 26 viewFiles: function(selectedFiles) { |
27 console.log('viewFiles called: ' + selectedFiles.length + | 27 console.log('viewFiles called: ' + selectedFiles.length + |
28 ' files selected'); | 28 ' files selected'); |
29 }, | 29 }, |
30 | 30 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 SELECT_OPEN_MULTI_FILE_TITLE: 'Select one or more files', | 142 SELECT_OPEN_MULTI_FILE_TITLE: 'Select one or more files', |
143 SELECT_SAVEAS_FILE_TITLE: 'Select a file to save as', | 143 SELECT_SAVEAS_FILE_TITLE: 'Select a file to save as', |
144 | 144 |
145 COMPUTING_SELECTION: 'Computing selection...', | 145 COMPUTING_SELECTION: 'Computing selection...', |
146 NOTHING_SELECTED: 'No files selected', | 146 NOTHING_SELECTED: 'No files selected', |
147 ONE_FILE_SELECTED: 'One file selected, $1', | 147 ONE_FILE_SELECTED: 'One file selected, $1', |
148 MANY_FILES_SELECTED: '$1 files selected, $2', | 148 MANY_FILES_SELECTED: '$1 files selected, $2', |
149 }); | 149 }); |
150 } | 150 } |
151 }; | 151 }; |
OLD | NEW |