summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/extensions/api_test/webrequest/framework.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/data/extensions/api_test/webrequest/framework.js')
-rw-r--r--chrome/test/data/extensions/api_test/webrequest/framework.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/test/data/extensions/api_test/webrequest/framework.js b/chrome/test/data/extensions/api_test/webrequest/framework.js
index 939e63e..57c34f8 100644
--- a/chrome/test/data/extensions/api_test/webrequest/framework.js
+++ b/chrome/test/data/extensions/api_test/webrequest/framework.js
@@ -24,10 +24,11 @@ function runTests(tests) {
// Returns an URL from the test server, fixing up the port. Must be called
// from within a test case passed to runTests.
-function getServerURL(path) {
+function getServerURL(path, opt_host) {
if (!testServerPort)
throw new Error("Called getServerURL outside of runTests.");
- return "http://" + testServer + ":" + testServerPort + "/" + path;
+ var host = opt_host || testServer;
+ return "http://" + host + ":" + testServerPort + "/" + path;
}
// Helper to advance to the next test only when the tab has finished loading.