From 816381a6a83e23401c86bcfa0d29f4e6e260aee8 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 28 Aug 2013 21:04:10 -0700 Subject: [PATCH] Use `location.host` in test/index.html and test/underscore.html. Former-commit-id: 34dd4860b7b83ec9b96b3f9062654bdf960ff75f --- test/index.html | 7 ++++--- test/underscore.html | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/test/index.html b/test/index.html index f01372538..5cf4040ab 100644 --- a/test/index.html +++ b/test/index.html @@ -54,7 +54,7 @@ return; } var reBasename = /[\w.-]+$/, - basePath = ('//' + location.hostname + ':' + location.port + location.pathname).replace(/\btest\/$/, ''), + basePath = ('//' + location.host + location.pathname).replace(/\btest\/$/, ''), isModularize = /modularize/.test(ui.urlParams.build), modulePath = ui.buildPath.replace(/\.js$/, ''), moduleMain = modulePath.match(reBasename)[0]; @@ -88,8 +88,9 @@ 'location': basePath + '/test', 'main': 'test', 'config': { - 'loader': 'curl/loader/legacy', - 'exports': 'QUnit' // cheat to work around no global being exported, won't be able to detect 404s in IE + // work around no global being exported + 'exports': 'QUnit', + 'loader': 'curl/loader/legacy' } } ], diff --git a/test/underscore.html b/test/underscore.html index b9f8d9b4a..1a41d3463 100644 --- a/test/underscore.html +++ b/test/underscore.html @@ -89,7 +89,7 @@ return; } var reBasename = /[\w.-]+$/, - basePath = ('//' + location.hostname + ':' + location.port + location.pathname).replace(/\btest\/$/, ''), + basePath = ('//' + location.host + location.pathname).replace(/\btest\/$/, ''), modulePath = ui.buildPath.replace(/\.js$/, ''), moduleMain = modulePath.match(reBasename)[0]; @@ -113,8 +113,9 @@ 'name': 'test', 'location': '../vendor/underscore/test', 'config': { - 'loader': 'curl/loader/legacy', - 'exports': 'QUnit' // cheat to work around no global being exported, won't be able to detect 404s in IE + // work around no global being exported + 'exports': 'QUnit', + 'loader': 'curl/loader/legacy' } } ]