| OLD | NEW |
| (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 invokes chrome.test.succeed() immediately. |
| 8 */ |
| 9 |
| 10 function launchedListener(args) { |
| 11 if (!(args && args['intent'])) { |
| 12 chrome.test.fail('Expected web intent on args: ' + args); |
| 13 return; |
| 14 } |
| 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); |
| OLD | NEW |