tor-browser

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

iframe-chains.html (1107B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta name="viewport" content="width=device-width,initial-scale=1.0">
      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 <style>
     11 
     12 body { margin: 0; padding: 10px; }
     13 .space { height: 2000px; }
     14 
     15 #scroller {
     16  border: 3px solid green;
     17  position: absolute;
     18  z-index: 0;
     19  overflow: auto;
     20  padding: 10px;
     21  width: 250px;
     22  height: 150px;
     23 }
     24 
     25 .ifr {
     26  border: 3px solid blue;
     27  width: 200px;
     28  height: 100px;
     29 }
     30 
     31 </style>
     32 </head>
     33 <body>
     34 <div id=scroller>
     35  <iframe srcdoc="SCROLL ME" class=ifr></iframe>
     36  <div class=space></div>
     37 </div>
     38 <div class=space></div>
     39 <script>
     40 
     41 promise_test(async t => {
     42  await new test_driver.Actions().scroll(50, 50, 0, 50).send();
     43  // Allow the possibility the scroll is not fully synchronous
     44  await t.step_wait(() => scroller.scrollTop === 50);
     45 }, "Wheel scroll in iframe chains to containing element.");
     46 
     47 </script>
     48 </body>
     49 </html>