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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This test file checks if we can read the expected contents 5 // This test file checks if we can read the expected contents
6 // (kExpectedContents) from the target file (kFileName). What's 6 // (kExpectedContents) from the target file (kFileName). What's
7 // interesting is that we'll read the file via a remote mount point. 7 // interesting is that we'll read the file via a remote mount point.
8 // See extension_local_filesystem_apitest.cc for how this is set up. 8 // See extension_local_filesystem_apitest.cc for how this is set up.
9 9
10 // These should match the counterparts in 10 // These should match the counterparts in
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 msg = 'INVALID_STATE_ERR'; 67 msg = 'INVALID_STATE_ERR';
68 break; 68 break;
69 default: 69 default:
70 msg = 'Unknown Error'; 70 msg = 'Unknown Error';
71 break; 71 break;
72 }; 72 };
73 } 73 }
74 chrome.test.fail(msg); 74 chrome.test.fail(msg);
75 }; 75 };
76 76
77 function getDirFromLocationHref() {
78 var loc = window.location.href;
79 console.log("Opening tab " + loc);
80 if (loc.indexOf("#") == -1 ) {
81 console.log("No params in url, faling back to default.");
82 return "tmp";
83 }
84
85 loc = unescape(loc.substr(loc.indexOf("#") + 1));
86 return (loc[0] == '/') ? loc.substring(1) : loc;
87 }
88
77 function TestRunner() { 89 function TestRunner() {
78 this.fileCreator_ = new TestFileCreator('tmp', 90 this.fileCreator_ = new TestFileCreator(getDirFromLocationHref(),
79 false /* shouldRandomize */); 91 false /* shouldRandomize */);
80 } 92 }
81 93
82 chrome.test.runTests([function tab() { 94 chrome.test.runTests([function tab() {
83 var testRunner = new TestRunner(); 95 var testRunner = new TestRunner();
84 testRunner.runTest(); 96 testRunner.runTest();
85 }]); 97 }]);
OLDNEW
« 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