OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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 chrome.test.getConfig(function(config) { |
| 6 var port = config ? config.testServer.port : '0'; |
| 7 |
| 8 var link = document.getElementById('link'); |
| 9 link.href = |
| 10 'http://localhost:' + port + |
| 11 '/extensions/platform_apps/url_handlers/common/target.html'; |
| 12 |
| 13 // This click should be intercepted and redirected to the handler app |
| 14 // (pre-installed by the CPP side of the test before launching this). |
| 15 var clickEvent = document.createEvent('MouseEvents'); |
| 16 clickEvent.initMouseEvent('click', true, true, window, |
| 17 0, 0, 0, 0, 0, false, false, |
| 18 false, false, 0, null); |
| 19 link.dispatchEvent(clickEvent); |
| 20 |
| 21 chrome.test.sendMessage("Launcher launched"); |
| 22 }); |
OLD | NEW |