tor-browser

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

scrollend-event-for-user-scroll.html (1870B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script src="/resources/testdriver.js"></script>
      8 <script src="/resources/testdriver-actions.js"></script>
      9 <script src="/resources/testdriver-vendor.js"></script>
     10 <script src="scroll_support.js"></script>
     11 <script src="scrollend-user-scroll-common.js"></script>
     12 <style>
     13    #targetDiv {
     14        width: 200px;
     15        height: 200px;
     16        overflow: scroll;
     17    }
     18 
     19    #innerDiv {
     20        width: 400px;
     21        height: 400px;
     22    }
     23 </style>
     24 </head>
     25 <body style="margin:0" onload=runTest()>
     26    <div id="targetDiv">
     27        <div id="innerDiv">
     28        </div>
     29    </div>
     30 </body>
     31 
     32 <script>
     33 var target_div = document.getElementById('targetDiv');
     34 
     35 function runTest() {
     36  promise_test(async (t) => {
     37    await test_scrollend_on_touch_drag(t, target_div);
     38  }, 'Tests that the target_div gets scrollend event when touch dragging.');
     39 
     40  promise_test(async (t) => {
     41    await test_scrollend_on_scrollbar_gutter_click(t, target_div);
     42  }, 'Tests that the target_div gets scrollend event when clicking ' +
     43     'scrollbar.');
     44 
     45  // Same issue as previous test.
     46  promise_test(async (t) => {
     47    await test_scrollend_on_scrollbar_thumb_drag(t, target_div);
     48  }, 'Tests that the target_div gets scrollend event when dragging the ' +
     49      'scrollbar thumb.');
     50 
     51  promise_test(async (t) => {
     52    await test_scrollend_on_mousewheel_scroll(t, target_div);
     53  }, 'Tests that the target_div gets scrollend event when mouse wheel ' +
     54     'scrolling.');
     55 
     56  promise_test(async (t) => {
     57    await test_scrollend_on_keyboard_scroll(t, target_div);
     58  }, 'Tests that the target_div gets scrollend event when sending DOWN key ' +
     59     'to the target.');
     60 }
     61 
     62 
     63 </script>
     64 </html>