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.
5 chrome.test.getConfig(function(config) {
6 var port = config ? config.testServer.port : '0';
8 var link = document.getElementById('link');
10 'http://localhost:' + port +
11 '/extensions/platform_apps/url_handlers/common/target.html';
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);
21 chrome.test.sendMessage("Launcher done");