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

Unified Diff: chrome/browser/resources/file_manager/js/harness.js

Issue 9232008: Fixing ChromeOS File Browser test harness. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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/browser/resources/file_manager/js/harness.js
diff --git a/chrome/browser/resources/file_manager/js/harness.js b/chrome/browser/resources/file_manager/js/harness.js
index 1022852c1c969eec1dc3ca49f1e108d61a5d136f..cc07d544200ad3f96e97c70b5948e3e8ae3d1133 100644
--- a/chrome/browser/resources/file_manager/js/harness.js
+++ b/chrome/browser/resources/file_manager/js/harness.js
@@ -24,11 +24,19 @@ var harness = {
function () {});
util.getOrCreateDirectory(filesystem.root, '/removable/disk2',
function () {});
- };
+ }
- window.webkitRequestFileSystem(window.PERSISTENT, 16 * 1024 * 1024,
- onFilesystem,
- util.flog('Error initializing filesystem'));
+ window.webkitStorageInfo.requestQuota(
+ window.PERSISTENT,
+ 256 * 1024*1024,
+ function(grantedBytes) {
+ window.webkitRequestFileSystem(
+ window.PERSISTENT,
+ grantedBytes,
+ onFilesystem,
+ util.flog('Error initializing filesystem'));
+ },
+ util.flog('Error requesting filesystem quota'));
var paramstr = decodeURIComponent(document.location.search.substr(1));
this.params = paramstr ? JSON.parse(paramstr) : {};
@@ -136,13 +144,13 @@ var harness = {
}
currentSrc = files.shift();
- var destPath = harness.fileManager.currentDirEntry_.fullPath + '/' +
- currentSrc.name.replace(/\^\^/g, '/');
+ var destPath = harness.fileManager.directoryModel_.currentEntry.fullPath +
dgozman 2012/01/17 12:10:10 There is fileManager.getCurredntDirectory() method
Vladislav Kaznacheev 2012/01/17 12:44:29 Thanks! Replaced. On 2012/01/17 12:10:10, dgozman
+ '/' + currentSrc.name.replace(/\^\^/g, '/');
util.getOrCreateFile(self.filesystem.root, destPath, onFileFound,
util.flog('Error finding path: ' + destPath));
}
console.log('Start import: ' + files.length + ' file(s)');
processNextFile();
- },
+ }
};

Powered by Google App Engine
This is Rietveld 408576698