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

Side by Side Diff: chrome/browser/resources/file_manager/js/harness.js

Issue 8554003: [filebrowser] Add left panel with roots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
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 var harness = { 5 var harness = {
6 /** 6 /**
7 * Kick off the test harness. 7 * Kick off the test harness.
8 * 8 *
9 * Called by harness.html after the dom has been parsed. 9 * Called by harness.html after the dom has been parsed.
10 */ 10 */
11 init: function() { 11 init: function() {
12 console.log('Initializing harness...'); 12 console.log('Initializing harness...');
13 13
14 util.installFileErrorToString(); 14 util.installFileErrorToString();
15 15
16 var self = this; 16 var self = this;
17 17
18 function onFilesystem(filesystem) { 18 function onFilesystem(filesystem) {
19 console.log('Filesystem found.'); 19 console.log('Filesystem found.');
20 self.filesystem = filesystem; 20 self.filesystem = filesystem;
21 util.getOrCreateDirectory(filesystem.root, '/Downloads', function () {}); 21 util.getOrCreateDirectory(filesystem.root, '/Downloads', function () {});
22 util.getOrCreateDirectory(filesystem.root, '/media', function () {}); 22 util.getOrCreateDirectory(filesystem.root, '/removable', function () {});
23 util.getOrCreateDirectory(filesystem.root, '/removable/disk1', function () {});
Vladislav Kaznacheev 2011/11/22 13:16:35 Long line?
dgozman 2011/11/22 14:15:14 Done.
24 util.getOrCreateDirectory(filesystem.root, '/removable/disk2', function () {});
23 }; 25 };
24 26
25 window.webkitRequestFileSystem(window.PERSISTENT, 16 * 1024 * 1024, 27 window.webkitRequestFileSystem(window.PERSISTENT, 16 * 1024 * 1024,
26 onFilesystem, 28 onFilesystem,
27 util.flog('Error initializing filesystem')); 29 util.flog('Error initializing filesystem'));
28 30
29 var paramstr = decodeURIComponent(document.location.search.substr(1)); 31 var paramstr = decodeURIComponent(document.location.search.substr(1));
30 this.params = paramstr ? JSON.parse(paramstr) : {}; 32 this.params = paramstr ? JSON.parse(paramstr) : {};
31 33
32 var input = document.getElementById('default-path'); 34 var input = document.getElementById('default-path');
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 var destPath = harness.fileManager.currentDirEntry_.fullPath + '/' + 137 var destPath = harness.fileManager.currentDirEntry_.fullPath + '/' +
136 currentSrc.name.replace(/\^\^/g, '/'); 138 currentSrc.name.replace(/\^\^/g, '/');
137 util.getOrCreateFile(self.filesystem.root, destPath, onFileFound, 139 util.getOrCreateFile(self.filesystem.root, destPath, onFileFound,
138 util.flog('Error finding path: ' + destPath)); 140 util.flog('Error finding path: ' + destPath));
139 } 141 }
140 142
141 console.log('Start import: ' + files.length + ' file(s)'); 143 console.log('Start import: ' + files.length + ' file(s)');
142 processNextFile(); 144 processNextFile();
143 }, 145 },
144 }; 146 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698