Bug 1517914 [wpt PR 14726] - dom/events/Event-dispatch-click.html shouldn't depend on javascript: urls running synchronously, a=testonly
authorNate Chapin <japhet@chromium.org>
Thu, 31 Jan 2019 18:30:27 +0000
changeset 457945 bd3148b502e8845502120ab208ffca4cb54d95d6
parent 457944 3dc302d011458c5810feb286fa33a6887f4e4d18
child 457946 c3a0ccfb08893cfac6aeea71f2f6f6b6a831eed9
push id35518
push useropoprus@mozilla.com
push dateFri, 08 Feb 2019 09:55:14 +0000
treeherdermozilla-central@3a3e393396f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1517914, 14726, 638435, 1389503, 621648
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1517914 [wpt PR 14726] - dom/events/Event-dispatch-click.html shouldn't depend on javascript: urls running synchronously, a=testonly Automatic update from web-platform-tests dom/events/Event-dispatch-click.html shouldn't depend on javascript: urls running synchronously Bug: 638435 Change-Id: I25e5f54b90651309ced2c5e305c3725a31f8fd07 Reviewed-on: https://chromium-review.googlesource.com/c/1389503 Reviewed-by: Mike West <mkwst@chromium.org> Commit-Queue: Nate Chapin <japhet@chromium.org> Cr-Commit-Position: refs/heads/master@{#621648} -- wpt-commits: cffa949fc9e0fcda9039f3275470ef7a663a7d6c wpt-pr: 14726
testing/web-platform/tests/dom/events/Event-dispatch-click.html
--- a/testing/web-platform/tests/dom/events/Event-dispatch-click.html
+++ b/testing/web-platform/tests/dom/events/Event-dispatch-click.html
@@ -69,27 +69,27 @@ async_test(function(t) {
   child.type = "checkbox"
   child.onclick = t.step_func(function() {
     assert_true(child.checked, "child pre-click must be triggered")
   })
   child.dispatchEvent(new MouseEvent("click", {bubbles:true}))
   t.done()
 }, "pick the first with activation behavior <input type=checkbox>")
 
-var globalCounter = 0 // sorry
 async_test(function(t) { // as above with <a>
-  var i = 0
+  window.hrefComplete = t.step_func(function(a) {
+    assert_equals(a, 'child');
+    t.done();
+  });
   var link = document.createElement("a")
-  link.href = "javascript:(function(){globalCounter--})()" // must not be triggered
+  link.href = "javascript:hrefComplete('link')" // must not be triggered
   dump.appendChild(link)
   var child = link.appendChild(document.createElement("a"))
-  child.href = "javascript:(function(){globalCounter++})()"
+  child.href = "javascript:hrefComplete('child')"
   child.dispatchEvent(new MouseEvent("click", {bubbles:true}))
-  assert_equals(globalCounter, 1)
-  t.done()
 }, "pick the first with activation behavior <a href>")
 
 async_test(function(t) {
   var input = document.createElement("input")
   input.type = "checkbox"
   dump.appendChild(input)
   var clickEvent = new MouseEvent("click")
   input.onchange = t.step_func_done(function() {