Bug 1161021 patch 3 - Check that we don't get duplicate events for #seven::after. r=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Mon, 04 May 2015 23:39:48 +0200
changeset 242299 662519331aa26c1724d6876c0b2223646ae79446
parent 242298 cf53ca4ae29a58a1f2f3cc8f11c792ae913667cd
child 242300 35b1653bdf2bea9ea6474023493300be27b08cb0
push id59362
push userdbaron@mozilla.com
push dateMon, 04 May 2015 21:40:26 +0000
treeherdermozilla-inbound@662519331aa2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1161021
milestone40.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 1161021 patch 3 - Check that we don't get duplicate events for #seven::after. r=bzbarsky
layout/style/test/test_transitions_events.html
--- a/layout/style/test/test_transitions_events.html
+++ b/layout/style/test/test_transitions_events.html
@@ -78,16 +78,17 @@ var got_two_target = false;
 var got_three_top = false;
 var got_three_right = false;
 var got_three_bottom = false;
 var got_three_left = false;
 var got_four_root = false;
 var got_body = false;
 var did_stops = false;
 var got_before = false;
+var got_after = false;
 
 document.documentElement.addEventListener("transitionend",
   function(event) {
     if (event.target == $("one")) {
       ok(!got_one_root, "transitionend on one on root");
       is(event.propertyName, "border-right-color",
          "propertyName for transitionend on one");
       is(event.elapsedTime, 0.5,
@@ -117,16 +118,18 @@ document.documentElement.addEventListene
          "elapsedTime for transitionend on body");
       got_body = true;
       finished_test();
     } else if (event.target == $("seven")) {
       if (!got_before) {
         got_before = true;
         is(event.pseudoElement, "::before");
       } else {
+        ok(!got_after, "transitionend on #seven::after");
+        got_after = true;
         is(event.pseudoElement, "::after");
       }
       is(event.propertyName, "color");
       is(event.isTrusted, true);
       finished_test();
     } else {
       if (!did_stops &&
           (event.target == $("five") || event.target == $("six"))) {