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

Unified Diff: chrome/test/data/extensions/api_test/filebrowser_component/remote.js

Issue 9808023: Grant file access permissions for cached file paths to file browsers/handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another rebase Created 8 years, 9 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/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/filebrowser_component/remote.js
diff --git a/chrome/test/data/extensions/api_test/filebrowser_component/remote.js b/chrome/test/data/extensions/api_test/filebrowser_component/remote.js
index 700000b75eae318ef3188f9e54216e44a017b201..321b9399f69b2445e61f8319d5cd6d5e2fcc1d32 100644
--- a/chrome/test/data/extensions/api_test/filebrowser_component/remote.js
+++ b/chrome/test/data/extensions/api_test/filebrowser_component/remote.js
@@ -74,8 +74,20 @@ TestRunner.prototype.errorCallback_ = function(error) {
chrome.test.fail(msg);
};
+function getDirFromLocationHref() {
+ var loc = window.location.href;
+ console.log("Opening tab " + loc);
+ if (loc.indexOf("#") == -1 ) {
+ console.log("No params in url, faling back to default.");
+ return "tmp";
+ }
+
+ loc = unescape(loc.substr(loc.indexOf("#") + 1));
+ return (loc[0] == '/') ? loc.substring(1) : loc;
+}
+
function TestRunner() {
- this.fileCreator_ = new TestFileCreator('tmp',
+ this.fileCreator_ = new TestFileCreator(getDirFromLocationHref(),
false /* shouldRandomize */);
}
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698