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

Side by Side Diff: chrome/test/data/extensions/api_test/webintent_handler/background.js

Issue 10834383: Chrome OS "open with" picker allowing Web Intents (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: tiny 80 chars fix 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 /*
6 This extension is a platform app that provides a Web Intent handler; it accepts
7 incoming requests and replies immediately with a success message.
8 */
9
10 function launchedListener(args) {
11 if (!(args && args['intent'])) {
12 chrome.test.fail('Expected web intent on args: ' + args);
13 return;
14 }
tbarzic 2012/09/11 02:01:40 can you test that the extension can read the file
15 var intent = args['intent'];
16 chrome.test.assertEq('http://webintents.org/view', intent['action']);
17 chrome.test.succeed();
18
19 // Note that we're not using chrome.extension.sendRequest here to call back
20 // to the source app - the call is not available in v2 packaged apps. The
21 // most we can do for now is succeed or fail the test (to be caught by a
22 // ResultCatcher in external_filesystem_apitest.cc).
23 }
24
25 chrome.app.runtime.onLaunched.addListener(launchedListener);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698