tor-browser

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

test_group_keyboard-2.html (2091B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>Various keyboard scrolling tests</title>
      6  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      7  <script type="application/javascript" src="apz_test_utils.js"></script>
      8  <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     10  <script type="application/javascript">
     11 
     12 var bug1756529_prefs= [
     13  // Increase distance of line scroll (units here are "number of lines") so
     14  // that a smooth scroll animation reliably takes multiple frames.
     15  ["toolkit.scrollbox.verticalScrollDistance", 5],
     16  // The test performs a single-tap gesture between test cases to cancel the
     17  // animation from the previous test case. For test cases that run fast (e.g.
     18  // instant scrolling), two single-taps could occur close enough in succession
     19  // that they get interpreted as a double-tap.
     20  ["apz.allow_double_tap_zooming", false]
     21 ];
     22 
     23 var subtests = [
     24  // Run helper_bug1756529.html twice, first exercising the main-thread keyboard
     25  // scrolling codepaths (e.g. PresShell::ScrollPage()), and once exercising the
     26  // APZ keyboard scrolling codepaths.
     27  {"file": "helper_bug1756529.html", prefs: bug1756529_prefs},
     28  {"file": "helper_bug1756529.html", prefs: [...bug1756529_prefs,
     29                                             ["test.events.async.enabled", true]]},
     30  {"file": "helper_tab_scroll_scrollIntoView.html"},
     31  {"file": "helper_focus_state_bug1860414.html", prefs: [["apz.test.logging_enabled", true],
     32                                                         ["test.events.async.enabled", true]]},
     33 ];
     34 
     35 if (isKeyApzEnabled()) {
     36  SimpleTest.waitForExplicitFinish();
     37  window.onload = function() {
     38    runSubtestsSeriallyInFreshWindows(subtests)
     39    .then(SimpleTest.finish, SimpleTest.finishWithFailure);
     40  };
     41 } else {
     42  SimpleTest.ok(true, "Keyboard APZ is disabled");
     43 }
     44  </script>
     45 </head>
     46 <body>
     47  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1383365">Async key scrolling test</a>
     48 </body>
     49 </html>