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

Side by Side Diff: chrome/test/data/extensions/api_test/filebrowser_component/intent.js

Issue 10834383: Chrome OS "open with" picker allowing Web Intents (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: tbarzic comments Created 8 years, 3 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 function testForUrl(fileUrl) {
6 chrome.fileBrowserPrivate.getFileTasks([fileUrl], [], function(tasks) {
7 if (!tasks || !tasks.length) {
8 chrome.test.fail('No tasks registered');
9 return;
10 }
11 console.log('Tasks: ' + tasks.length);
12 chrome.fileBrowserPrivate.executeTask(tasks[0].taskId, [fileUrl]);
13 });
14 };
15
16 chrome.test.runTests([function() {
17 var hash = window.location.hash.toString();
18
19 if (!hash.length) {
20 chrome.test.fail('No fileUrl given to test');
21 return;
22 }
23 var fileUrl = hash.substring(1);
24
25 // The local filesystem is not explicitly used, but this test still needs to
26 // request it; it configures local access permissions.
27 chrome.fileBrowserPrivate.requestLocalFileSystem(chrome.test.callbackPass(
28 function(fs) {
29 testForUrl(fileUrl);
30 }));
31 }]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698