test("jQuery.ajax() - script, Remote", function() {
expect(2);
- var base = window.location.href.replace(/\?.*$/, "");
+ var base = window.location.href.replace(/[^\/]*$/, "");
stop();
test("jQuery.ajax() - script, Remote with POST", function() {
expect(3);
- var base = window.location.href.replace(/\?.*$/, "");
+ var base = window.location.href.replace(/[^\/]*$/, "");
stop();
test("jQuery.ajax() - script, Remote with scheme-less URL", function() {
expect(2);
- var base = window.location.href.replace(/\?.*$/, "");
+ var base = window.location.href.replace(/[^\/]*$/, "");
base = base.replace(/^.*?\/\//, "//");
stop();
test("jQuery.getJSON(String, Function) - JSON object with absolute url to local content", function() {
expect(2);
- var base = window.location.href.replace(/\?.*$/, "");
+ var base = window.location.href.replace(/[^\/]*$/, "");
stop();
jQuery.getJSON(url(base + "data/json.php"), function(json) {