blob: 96a1fe5d4a6f7e6fd548abf218777dac4fc15bb7 [file] [log] [blame]
var beforehref = location.href;
test(function () {
history.pushState('','','/testing_ignore_me_404');
assert_equals(location.href,beforehref.replace(/^(\w*:\/\/[^\/]*\/)[\w\W]*$/,'$1testing_ignore_me_404'));
}, 'history.pushState URL resolving should be done relative to the document, not the script');
test(function () {
history.replaceState('','','/testing_ignore_me_404_2');
assert_equals(location.href,beforehref.replace(/^(\w*:\/\/[^\/]*\/)[\w\W]*$/,'$1testing_ignore_me_404_2'));
}, 'history.replaceState URL resolving should be done relative to the document, not the script');