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 onload = function() { | 5 onload = function() { |
6 var getURL = chrome.extension.getURL; | 6 var getURL = chrome.extension.getURL; |
7 var URL_REGULAR = | 7 var URL_REGULAR = |
8 "http://127.0.0.1:PORT/files/extensions/api_test/webnavigation/crossProces
s/empty.html"; | 8 "http://127.0.0.1:PORT/extensions/api_test/webnavigation/crossProcess/empt
y.html"; |
9 var URL_REDIRECT = "http://www.a.com:PORT/server-redirect"; | 9 var URL_REDIRECT = "http://www.a.com:PORT/server-redirect"; |
10 var URL_TEST = "http://127.0.0.1:PORT/test"; | 10 var URL_TEST = "http://127.0.0.1:PORT/test"; |
11 chrome.tabs.create({"url": "about:blank"}, function(tab) { | 11 chrome.tabs.create({"url": "about:blank"}, function(tab) { |
12 var tabId = tab.id; | 12 var tabId = tab.id; |
13 chrome.test.getConfig(function(config) { | 13 chrome.test.getConfig(function(config) { |
14 var fixPort = function(url) { | 14 var fixPort = function(url) { |
15 return url.replace(/PORT/g, config.testServer.port); | 15 return url.replace(/PORT/g, config.testServer.port); |
16 }; | 16 }; |
17 URL_REGULAR = fixPort(URL_REGULAR); | 17 URL_REGULAR = fixPort(URL_REGULAR); |
18 URL_REDIRECT = fixPort(URL_REDIRECT); | 18 URL_REDIRECT = fixPort(URL_REDIRECT); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 272 |
273 chrome.tabs.update( | 273 chrome.tabs.update( |
274 tabId, | 274 tabId, |
275 { url: getURL('crossProcess/d.html?' + config.testServer.port) }); | 275 { url: getURL('crossProcess/d.html?' + config.testServer.port) }); |
276 }, | 276 }, |
277 | 277 |
278 ]); | 278 ]); |
279 }); | 279 }); |
280 }); | 280 }); |
281 }; | 281 }; |
OLD | NEW |