summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/activation/click.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/editing/activation/click.html')
-rw-r--r--testing/web-platform/tests/html/editing/activation/click.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/activation/click.html b/testing/web-platform/tests/html/editing/activation/click.html
new file mode 100644
index 0000000000..edbc477db6
--- /dev/null
+++ b/testing/web-platform/tests/html/editing/activation/click.html
@@ -0,0 +1,18 @@
+<!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>