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

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: Copyright fix 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
« no previous file with comments | « chrome/browser/resources/file_manager/README.harness ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..41db7afeb67ca30e053891940ac694d29947f046 100644
--- a/chrome/browser/resources/file_manager/js/harness.js
+++ b/chrome/browser/resources/file_manager/js/harness.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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,
+ 1024*1024*1024, // 1 Gig should be enough for everybody:)
+ 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,7 +144,7 @@ var harness = {
}
currentSrc = files.shift();
- var destPath = harness.fileManager.currentDirEntry_.fullPath + '/' +
+ var destPath = harness.fileManager.getCurrentDirectory() + '/' +
currentSrc.name.replace(/\^\^/g, '/');
util.getOrCreateFile(self.filesystem.root, destPath, onFileFound,
util.flog('Error finding path: ' + destPath));
@@ -144,5 +152,5 @@ var harness = {
console.log('Start import: ' + files.length + ' file(s)');
processNextFile();
- },
+ }
};
« no previous file with comments | « chrome/browser/resources/file_manager/README.harness ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698