tor-browser

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

scrolling-no-browsing-context.html (1303B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>cssom-view scrolling-no-browsing-context</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script>
      7 setup({explicit_done:true});
      8 window.onload = function () {
      9    test(function () {
     10        var doc = document.implementation.createDocument("http://example.com/", "html", null);
     11 
     12        var element = doc.createElement("tag")
     13        assert_equals(element.scrollTop, 0, "scrollTop should be always 0");
     14        assert_equals(element.scrollLeft, 0, "scrollLeft should be always 0");
     15 
     16        element.scrollTop = 10;
     17        element.scrollLeft = 10;
     18        assert_equals(element.scrollTop, 0, "scrollTop should be always 0");
     19        assert_equals(element.scrollLeft, 0, "scrollLeft should be always 0");
     20 
     21        element.scroll(10, 10);
     22        assert_equals(element.scrollTop, 0, "scrollTop should be always 0");
     23        assert_equals(element.scrollLeft, 0, "scrollLeft should be always 0");
     24 
     25        element.scrollTo(10, 10);
     26        assert_equals(element.scrollTop, 0, "scrollTop should be always 0");
     27        assert_equals(element.scrollLeft, 0, "scrollLeft should be always 0");
     28 
     29    }, "Element get and set scrollTop, scrollLeft, scroll() and scrollTo() test");
     30 
     31    done();
     32 };
     33 </script>