Bug 1419221 - Create element for the target of getUnanimatedComputedStyle(). r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 21 Nov 2017 13:51:53 +0900
changeset 701050 25d280ca2022fb645f2a6a212cf634741183bcd7
parent 700905 081c06e175b2b4431b7af5ea594ff0373e97b70a
child 701051 1d177f46ed3bab2a6abbeb18c964b2ea1d74e089
push id90050
push userhikezoe@mozilla.com
push dateTue, 21 Nov 2017 06:28:07 +0000
reviewersbirtles
bugs1419221
milestone59.0a1
Bug 1419221 - Create element for the target of getUnanimatedComputedStyle(). r?birtles Before this patch, we had been only testing the null element case. MozReview-Commit-ID: DYB8DtGBIwC
dom/base/test/file_domwindowutils_animation.html
--- a/dom/base/test/file_domwindowutils_animation.html
+++ b/dom/base/test/file_domwindowutils_animation.html
@@ -92,31 +92,36 @@ function test_getUnanimatedComputedStyle
       }
       checkUnanimatedComputedStyle(property, initialStyle, "::before",
                                    expectedInitialStyle, expectedInitialStyle,
                                    pseudoAnimation, "Animation at pseudo");
       deleteStyle();
     });
   });
 
+  const div = document.createElement("div");
+  document.body.appendChild(div);
+
   SimpleTest.doesThrow(
     () => utils.getUnanimatedComputedStyle(div, null, "background"),
     "NS_ERROR_INVALID_ARG",
     "Shorthand property should throw");
 
   SimpleTest.doesThrow(
     () => utils.getUnanimatedComputedStyle(div, null, "invalid"),
     "NS_ERROR_INVALID_ARG",
     "Invalid property should throw");
 
   SimpleTest.doesThrow(
     () => utils.getUnanimatedComputedStyle(null, null, "opacity"),
     "NS_ERROR_INVALID_ARG",
     "Null element should throw");
 
+  div.remove();
+
   next();
   window.close();
 }
 
 function checkUnanimatedComputedStyle(property, initialStyle, pseudoType,
                                       expectedBeforeAnimation,
                                       expectedDuringAnimation,
                                       animate, animationType) {