| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 chrome.test.getConfig(function(config) { | 5 chrome.test.getConfig(function(config) { |
| 6 var linkNode = document.getElementById('test-link'); | 6 var linkNode = document.getElementById('test-link'); |
| 7 linkNode.href = 'http://localhost:' + config.testServer.port + | 7 linkNode.href = 'http://localhost:' + config.testServer.port + |
| 8 '/files/extensions/platform_apps/open_link/link.html'; | 8 '/files/extensions/platform_apps/open_link/link.html'; |
| 9 | 9 |
| 10 var clickEvent = document.createEvent('MouseEvents'); | 10 var clickEvent = document.createEvent('MouseEvents'); |
| 11 clickEvent.initMouseEvent('click', true, true, window, | 11 clickEvent.initMouseEvent('click', true, true, window, |
| 12 0, 0, 0, 0, 0, false, false, | 12 0, 0, 0, 0, 0, false, false, |
| 13 false, false, 0, null); | 13 false, false, 0, null); |
| 14 linkNode.dispatchEvent(clickEvent); | 14 linkNode.dispatchEvent(clickEvent); |
| 15 }); | 15 }); |
| 16 | 16 |
| 17 onmessage = function() { | 17 onmessage = function() { |
| 18 chrome.test.sendMessage('Link opened'); | 18 chrome.test.sendMessage('Link opened'); |
| 19 }; | 19 }; |
| 20 |
| 21 chrome.test.sendMessage('Launched'); |
| OLD | NEW |