| 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 IN_APP_URL = 'nav-target.html'; | 6 var IN_APP_URL = 'nav-target.html'; |
| 7 var REMOTE_URL = 'http://localhost:' + config.testServer.port | 7 var REMOTE_URL = 'http://localhost:' + config.testServer.port |
| 8 '/files/extensions/platform_apps/navigation/nav-target.html'; | 8 '/extensions/platform_apps/navigation/nav-target.html'; |
| 9 | 9 |
| 10 var testForm = document.getElementById('test-form'); | 10 var testForm = document.getElementById('test-form'); |
| 11 var testLink = document.getElementById('test-link'); | 11 var testLink = document.getElementById('test-link'); |
| 12 | 12 |
| 13 function clickTestLink() { | 13 function clickTestLink() { |
| 14 var clickEvent = document.createEvent('MouseEvents'); | 14 var clickEvent = document.createEvent('MouseEvents'); |
| 15 clickEvent.initMouseEvent('click', true, true, window, | 15 clickEvent.initMouseEvent('click', true, true, window, |
| 16 0, 0, 0, 0, 0, false, false, | 16 0, 0, 0, 0, 0, false, false, |
| 17 false, false, 0, null); | 17 false, false, 0, null); |
| 18 | 18 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 if (testIndex < tests.length) { | 80 if (testIndex < tests.length) { |
| 81 // Don't run the next test immediately, since navigation happens | 81 // Don't run the next test immediately, since navigation happens |
| 82 // asynchronously, and if we do end up navigating, we don't want to still | 82 // asynchronously, and if we do end up navigating, we don't want to still |
| 83 // execute the final test case (which signals success). | 83 // execute the final test case (which signals success). |
| 84 window.setTimeout(runTest, 100); | 84 window.setTimeout(runTest, 100); |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 runTest(); | 88 runTest(); |
| 89 }); | 89 }); |
| OLD | NEW |