Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/gfx/layers/apz/test/mochitest/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  helper_bug1806400.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/gfx/layers/apz/test/mochitest/helper_bug1806400.html


<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width; initial-scale=1.0">
<title>Tests that :active state is changed with `touchstart` event listener</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
 <script src="/tests/SimpleTest/paint_listener.js"></script>
<script src="apz_test_utils.js"></script>
<script src="apz_test_native_event_utils.js"></script>
<style>
  #button {
    width: 100px;
    height: 100px;
  }
</style>
<button id="button">Button</button>
<script>
async function test() {
  // Set up an active touchstart event listner.
  let eventPromise =  promiseOneEvent(document.documentElement, "touchstart");
  await promiseApzFlushedRepaints();

  await synthesizeNativeTouch(button, 10, 10, SpecialPowers.DOMWindowUtils.TOUCH_CONTACT);
  await eventPromise;

  // In JS there's no way to ensure `APZStateChange::eStartTouch` notification
  // has been processed. So we wait for `:active` state change here.
  await SimpleTest.promiseWaitForCondition(
    () => button.matches(":active"),
    "Waiting for :active state change");
  ok(button.matches(":active"), "should be active");

  eventPromise =  promiseOneEvent(button"touchend");
  await synthesizeNativeTouch(button, 10, 10, SpecialPowers.DOMWindowUtils.TOUCH_REMOVE);
  await eventPromise;

  // Same as above. We need to wait for not `:active` state here.
  await SimpleTest.promiseWaitForCondition(
    () => !button.matches(":active"),
    "Waiting for :active state change");
  ok(!button.matches(":active"), "should not be active");
}

if (getPlatform() == "windows") {
  // Bug 1875916. On Windows synthesizeNativeTouch(TOUCH_REMOVE) causes
  // `InjectTouchInput failure` with ERROR_TIMEOUT.
  ok(true, "Test doesn't need to run on Windows");
  subtestDone();
} else {
  waitUntilApzStable()
  .then(test)
  .then(subtestDone, subtestFailed);
}
</script>
</html>

Messung V0.5
C=97 H=100 G=98

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.