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 function runTests() { | 5 onload = function() { |
6 var getURL = chrome.extension.getURL; | |
7 var URL_LOAD = | 6 var URL_LOAD = |
8 "http://127.0.0.1:PORT/files/extensions/api_test/webnavigation/targetBlank
/a.html"; | 7 "http://127.0.0.1:PORT/files/extensions/api_test/webnavigation/targetBlank
/a.html"; |
9 var URL_TARGET = | 8 var URL_TARGET = |
10 "http://127.0.0.1:PORT/files/extensions/api_test/webnavigation/targetBlank
/b.html"; | 9 "http://127.0.0.1:PORT/files/extensions/api_test/webnavigation/targetBlank
/b.html"; |
11 chrome.tabs.create({"url": "about:blank"}, function(tab) { | 10 chrome.tabs.create({"url": "about:blank"}, function(tab) { |
12 var tabId = tab.id; | 11 var tabId = tab.id; |
13 chrome.test.getConfig(function(config) { | 12 chrome.test.getConfig(function(config) { |
14 var fixPort = function(url) { | 13 var fixPort = function(url) { |
15 return url.replace(/PORT/g, config.testServer.port); | 14 return url.replace(/PORT/g, config.testServer.port); |
16 }; | 15 }; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 [ "a-onDOMContentLoaded", | 94 [ "a-onDOMContentLoaded", |
96 "b-onCreatedNavigationTarget", | 95 "b-onCreatedNavigationTarget", |
97 "b-onBeforeNavigate" ]]); | 96 "b-onBeforeNavigate" ]]); |
98 | 97 |
99 // Notify the api test that we're waiting for the user. | 98 // Notify the api test that we're waiting for the user. |
100 chrome.test.notifyPass(); | 99 chrome.test.notifyPass(); |
101 }, | 100 }, |
102 ]); | 101 ]); |
103 }); | 102 }); |
104 }); | 103 }); |
105 } | 104 }; |
OLD | NEW |