X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=be4b3f0219b656356737aaf6eb6598f03de46864;hb=83a97f5c21a3c8c063e05f0df40efe13069c82f2;hp=135e0541a8ca726039ae3a12ca9e81e1978d5001;hpb=31cfe62ed4884f0f7eff399375bf6e748738ef71;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 135e054..be4b3f0 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -836,7 +836,7 @@ test("jQuery.ajax() - JSONP, Remote", function() { test("jQuery.ajax() - script, Remote", function() { expect(2); - var base = window.location.href.replace(/\?.*$/, ""); + var base = window.location.href.replace(/[^\/]*$/, ""); stop(); @@ -853,7 +853,7 @@ test("jQuery.ajax() - script, Remote", function() { test("jQuery.ajax() - script, Remote with POST", function() { expect(3); - var base = window.location.href.replace(/\?.*$/, ""); + var base = window.location.href.replace(/[^\/]*$/, ""); stop(); @@ -876,7 +876,7 @@ test("jQuery.ajax() - script, Remote with POST", function() { 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(); @@ -991,7 +991,7 @@ test("jQuery.getJSON - Using Native JSON", function() { 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) {