| 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_LOAD = | 7 var URL_LOAD = |
| 8 "http://127.0.0.1:PORT/files/prerender/prerender_loader.html"; | 8 "http://127.0.0.1:PORT/prerender/prerender_loader.html"; |
| 9 var URL_TARGET = | 9 var URL_TARGET = |
| 10 "http://127.0.0.1:PORT/files/prerender/prerender_page.html"; | 10 "http://127.0.0.1:PORT/prerender/prerender_page.html"; |
| 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_LOAD = fixPort(URL_LOAD); | 17 URL_LOAD = fixPort(URL_LOAD); |
| 18 URL_TARGET = fixPort(URL_TARGET); | 18 URL_TARGET = fixPort(URL_TARGET); |
| 19 | 19 |
| 20 chrome.test.runTests([ | 20 chrome.test.runTests([ |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 navigationOrder("b-"), | 92 navigationOrder("b-"), |
| 93 [ "a-onCompleted", "b-onCompleted", "onTabReplaced" ]]); | 93 [ "a-onCompleted", "b-onCompleted", "onTabReplaced" ]]); |
| 94 | 94 |
| 95 // Notify the api test that we're waiting for the user. | 95 // Notify the api test that we're waiting for the user. |
| 96 chrome.test.notifyPass(); | 96 chrome.test.notifyPass(); |
| 97 }, | 97 }, |
| 98 ]); | 98 ]); |
| 99 }); | 99 }); |
| 100 }); | 100 }); |
| 101 }; | 101 }; |
| OLD | NEW |