tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

008.js (594B)


      1 var beforehref = location.href;
      2 
      3 test(function () {
      4  history.pushState('','','/testing_ignore_me_404');
      5  assert_equals(location.href,beforehref.replace(/^(\w*:\/\/[^\/]*\/)[\w\W]*$/,'$1testing_ignore_me_404'));
      6 }, 'history.pushState URL resolving should be done relative to the document, not the script');
      7 
      8 test(function () {
      9  history.replaceState('','','/testing_ignore_me_404_2');
     10  assert_equals(location.href,beforehref.replace(/^(\w*:\/\/[^\/]*\/)[\w\W]*$/,'$1testing_ignore_me_404_2'));
     11 }, 'history.replaceState URL resolving should be done relative to the document, not the script');