Use location.host in test/index.html and test/underscore.html.

Former-commit-id: 34dd4860b7b83ec9b96b3f9062654bdf960ff75f
This commit is contained in:
John-David Dalton
2013-08-28 21:04:10 -07:00
parent dd84bca638
commit 816381a6a8
2 changed files with 8 additions and 6 deletions

View File

@@ -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'
}
}
],

View File

@@ -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'
}
}
]