testing/web-platform/tests/html/editing/activation/click.html
author Morgan Reschenberg <mreschenberg@mozilla.com>
Tue, 18 Jan 2022 23:31:21 +0000
changeset 605085 4c684d5d16fe3a85614e7cb56be8c0029dc98b12
parent 259567 f7eda0fafdb4e98538a798ade5bbb53c5fa88f19
permissions -rw-r--r--
Bug 1748878: Use LayoutDeviceInt types for points, rects, sizes in dev pixels r=Jamie,emilio a=graft Differential Revision: https://phabricator.services.mozilla.com/D135272

<!doctype html>
<meta charset=utf-8>
<title>HTMLElement#click</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
test(function() {
  var element = document.createElement("div");
  var received = false;
  element.addEventListener("click", this.step_func(function(e) {
    received = true;
    assert_false(e.isTrusted, "Event should not be trusted")
  }));
  element.click();
  assert_true(received, "click event should have been dispatched synchronously");
})
</script>