tor-browser

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

003.html (780B)


      1 <!doctype html>
      2 <!-- this tests the spec as it hopefully will be once bug https://www.w3.org/Bugs/Public/show_bug.cgi?id=17155 is fixed -->
      3 <title>Fragment Navigation: Updating scroll position</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <body>
      7 <div id="log"></div>
      8 <div id="test">scroll 1</div>
      9 <div style="height:10000px">Filler</div>
     10 <div id="test1">scroll 2</div>
     11 <script>
     12 test(function() {
     13  assert_equals(document.scrollingElement.scrollTop, 0);
     14  location.hash = "test";
     15 
     16  var scroll1 = document.scrollingElement.scrollTop;
     17  assert_true(scroll1 > 0);
     18 
     19  location.hash = "test1";
     20  var scroll2 = document.scrollingElement.scrollTop;
     21  assert_true(scroll2 > scroll1);
     22 
     23  location.hash = ""
     24 });
     25 </script>