tor-browser

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

test_group_touchevents-5.html (2859B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>Various touch tests that spawn in new windows (5)</title>
      6  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      7  <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
      8  <script type="application/javascript" src="apz_test_utils.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     10  <script type="application/javascript">
     11 
     12 // Increase the tap timeouts so the double-tap is still detected in case of
     13 // random delays during testing.
     14 var doubletap_prefs = [
     15  ["ui.click_hold_context_menus.delay", 10000],
     16  ["apz.max_tap_time", 10000],
     17 ];
     18 
     19 var subtests = [
     20  // tests that scrolling doesn't cause extra SchedulePaint calls
     21  {"file": "helper_bug1669625.html", "dp_suppression": false},
     22  {"file": "helper_overscroll_in_apz_test_data.html", "prefs": [
     23    ["apz.overscroll.enabled", true],
     24    ["apz.overscroll.test_async_scroll_offset.enabled", true],
     25    ["apz.test.logging_enabled", true],
     26  ]},
     27  {"file": "helper_bug1719855.html?prevent=contextmenu"},
     28  {"file": "helper_bug1719855.html"},
     29  {"file": "helper_bug1724759.html"},
     30  {"file": "helper_bug1806400.html", "prefs": [
     31    // This test uses `SimpleTest.promiseWaitForCondition` which waits for the
     32    // given condition up to 3s, to avoid opening context menu during the time
     33    // span use a longer `ui.click_hold_context_menus.delay` here.
     34    ["ui.click_hold_context_menus.delay", 10000],
     35    ["ui.touch_activation.duration_ms", 1000]
     36  ]},
     37  {"file": "helper_bug1806400-2.html", "prefs": doubletap_prefs},
     38  {"file": "helper_bug1806400-3.html", "prefs": [
     39    ["ui.touch_activation.duration_ms", 90000]
     40  ]},
     41  {"file": "helper_bug1806400-4.html", "prefs": doubletap_prefs},
     42 
     43  // Add new subtests to test_group_touch_events-N.html (for largest N),
     44  // not this file.
     45 ];
     46 
     47 // The following tests intermittently fail on Linux.
     48 // See bug 1909710 for re-enabling these subtests.
     49 if (getPlatform() != "linux") {
     50  subtests.push(
     51    {"file": "helper_touch_drag_root_scrollbar.html", "prefs": [["apz.allow_zooming", true]]});
     52 
     53  // apz.allow_zooming=false is quite broken on Android
     54  if (getPlatform() != "android") {
     55    subtests.push(
     56      {"file": "helper_touch_drag_root_scrollbar.html", "prefs": [["apz.allow_zooming", false]]});
     57  }
     58 }
     59 
     60 if (isApzEnabled()) {
     61  ok(window.TouchEvent, "Check if TouchEvent is supported (it should be, the test harness forces it on everywhere)");
     62  if (getPlatform() == "android") {
     63    // This has a lot of subtests, and Android emulators are slow.
     64    SimpleTest.requestLongerTimeout(2);
     65  }
     66 
     67  SimpleTest.waitForExplicitFinish();
     68  window.onload = function() {
     69    runSubtestsSeriallyInFreshWindows(subtests)
     70    .then(SimpleTest.finish, SimpleTest.finishWithFailure);
     71  };
     72 }
     73 
     74  </script>
     75 </head>
     76 <body>
     77 </body>
     78 </html>