tor-browser

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

api-availability-1.html (1026B)


      1 <!doctype html>
      2 <title>API availability following history traversal - 1</title>
      3 <script>
      4 var controller = opener;
      5 var t = controller.t;
      6 var assert_not_equals = controller.assert_not_equals;
      7 
      8 t.step(function() {
      9  // If this document is discarded as a result of navigation, then this script
     10  // will be executed a second time. The semantics this test intends to verify
     11  // cannot be observed under these conditions, the discarding is not itself a
     12  // violation. Silently pass the test in that case.
     13  if (controller.hasNavigated) {
     14    t.done();
     15    return;
     16  }
     17 
     18  t.step_timeout(function() {
     19    assert_not_equals(window.history, null, 'history');
     20    assert_not_equals(window.localStorage, null, 'localStorage');
     21    assert_not_equals(window.location, null, 'location');
     22    assert_not_equals(window.navigator, null, 'navigator');
     23    assert_not_equals(window.opener, null, 'opener');
     24    assert_not_equals(window.sessionStorage, null, 'sessionStorage');
     25 
     26    t.done();
     27  }, 1000);
     28 
     29  controller.navigate();
     30 });
     31 </script>