| 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 var baseUrl = 'http://a.com:PORT/files/extensions/api_test/executescript/' + | 5 var baseUrl = 'http://a.com:PORT/extensions/api_test/executescript/' + |
| 6 'frame_after_load/'; | 6 'frame_after_load/'; |
| 7 | 7 |
| 8 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { | 8 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { |
| 9 if (changeInfo.status != 'complete') | 9 if (changeInfo.status != 'complete') |
| 10 return; | 10 return; |
| 11 | 11 |
| 12 chrome.test.runTests([ | 12 chrome.test.runTests([ |
| 13 function() { | 13 function() { |
| 14 // Tests that we can still execute scripts after a frame has loaded after | 14 // Tests that we can still execute scripts after a frame has loaded after |
| 15 // the main document has completed. | 15 // the main document has completed. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 33 }); | 33 }); |
| 34 chrome.tabs.executeScript(tabId, {code: injectFrameCode}); | 34 chrome.tabs.executeScript(tabId, {code: injectFrameCode}); |
| 35 } | 35 } |
| 36 ]); | 36 ]); |
| 37 }); | 37 }); |
| 38 | 38 |
| 39 chrome.test.getConfig(function(config) { | 39 chrome.test.getConfig(function(config) { |
| 40 baseUrl = baseUrl.replace(/PORT/, config.testServer.port); | 40 baseUrl = baseUrl.replace(/PORT/, config.testServer.port); |
| 41 chrome.tabs.create({ url: baseUrl + 'outer.html' }); | 41 chrome.tabs.create({ url: baseUrl + 'outer.html' }); |
| 42 }); | 42 }); |
| OLD | NEW |