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 pass = chrome.test.callbackPass; | 5 var pass = chrome.test.callbackPass; |
6 var fail = chrome.test.callbackFail; | 6 var fail = chrome.test.callbackFail; |
7 var assertEq = chrome.test.assertEq; | 7 var assertEq = chrome.test.assertEq; |
8 var assertTrue = chrome.test.assertTrue; | 8 var assertTrue = chrome.test.assertTrue; |
9 var relativePath = | 9 var relativePath = |
10 '/files/extensions/api_test/executescript/in_frame/test_executescript.html'; | 10 '/extensions/api_test/executescript/in_frame/test_executescript.html'; |
11 var testUrl = 'http://a.com:PORT' + relativePath; | 11 var testUrl = 'http://a.com:PORT' + relativePath; |
12 | 12 |
13 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { | 13 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { |
14 if (changeInfo.status != 'complete') | 14 if (changeInfo.status != 'complete') |
15 return; | 15 return; |
16 | 16 |
17 chrome.test.runTests([ | 17 chrome.test.runTests([ |
18 function executeJavaScriptCodeInAllFramesShouldSucceed() { | 18 function executeJavaScriptCodeInAllFramesShouldSucceed() { |
19 var script_file = {}; | 19 var script_file = {}; |
20 script_file.code = "var extensionPort = chrome.runtime.connect();"; | 20 script_file.code = "var extensionPort = chrome.runtime.connect();"; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 })); | 62 })); |
63 }); | 63 }); |
64 } | 64 } |
65 ]); | 65 ]); |
66 }); | 66 }); |
67 | 67 |
68 chrome.test.getConfig(function(config) { | 68 chrome.test.getConfig(function(config) { |
69 testUrl = testUrl.replace(/PORT/, config.testServer.port); | 69 testUrl = testUrl.replace(/PORT/, config.testServer.port); |
70 chrome.tabs.create({ url: testUrl }); | 70 chrome.tabs.create({ url: testUrl }); |
71 }); | 71 }); |
OLD | NEW |