Skip to content

Commit

Permalink
Merge pull request #2100 from Ms2ger/click
Browse files Browse the repository at this point in the history
Add a test that the click event dispatched from the click() method is not trusted; r=annevk
  • Loading branch information
Ms2ger committed Aug 20, 2015
2 parents 90fbc1d + 1e6ecdd commit 74df642
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions 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>

0 comments on commit 74df642

Please sign in to comment.