Bug 1493354 [wpt PR 13149] - Remove WebKitAnimationEvent, a=testonly
authorStephen McGruer <smcgruer@chromium.org>
Wed, 26 Sep 2018 10:47:30 +0000
changeset 438490 8f6a1c926ee842cb8764cbe59cf6a9005a28c50b
parent 438489 035a01951ed71adf70e0b7f8b2bf74c7bcf7d28f
child 438491 19b064eee0dacacd370ecdce2d2557d07136388d
push id108320
push userwptsync@mozilla.com
push dateThu, 27 Sep 2018 09:58:16 +0000
treeherdermozilla-inbound@541b5d1ac630 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1493354, 13149, 695504, 1238497, 593405
milestone64.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 1493354 [wpt PR 13149] - Remove WebKitAnimationEvent, a=testonly Automatic update from web-platform-testsRemove WebKitAnimationEvent This is an obsolete prefixed alias of AnimationEvent. An intent-to-remove has been sent, and has got LGTM*3. Blink intent thread: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/EgMUDqySZwE Bug: 695504 Change-Id: Ia86e830fe3f653aa6a7b2f983afb75fd4d088831 Reviewed-on: https://chromium-review.googlesource.com/1238497 Commit-Queue: Stephen McGruer <smcgruer@chromium.org> Reviewed-by: Dave Tapuska <dtapuska@chromium.org> Reviewed-by: Tim Volodine <timvolodine@chromium.org> Reviewed-by: Rick Byers <rbyers@chromium.org> Cr-Commit-Position: refs/heads/master@{#593405} -- wpt-commits: 1c99c70996f35332b8a65040bf745f19678a6686 wpt-pr: 13149
testing/web-platform/tests/css/css-animations/animationevent-interface.js
testing/web-platform/tests/css/css-animations/historical.html
--- a/testing/web-platform/tests/css/css-animations/animationevent-interface.js
+++ b/testing/web-platform/tests/css/css-animations/animationevent-interface.js
@@ -74,19 +74,147 @@
   }, "AnimationEvent.pseudoElement initialized from the dictionary");
 
   test(function() {
     var event = new AnimationEvent("test", {animationName: "sample"});
     assert_equals(event.animationName, "sample");
   }, "animationName set to 'sample'");
 
   test(function() {
+    var event = new AnimationEvent("test", {animationName: undefined});
+    assert_equals(event.animationName, "");
+  }, "animationName set to undefined");
+
+  test(function() {
+    var event = new AnimationEvent("test", {animationName: null});
+    assert_equals(event.animationName, "null");
+  }, "animationName set to null");
+
+  test(function() {
+    var event = new AnimationEvent("test", {animationName: false});
+    assert_equals(event.animationName, "false");
+  }, "animationName set to false");
+
+  test(function() {
+    var event = new AnimationEvent("test", {animationName: true});
+    assert_equals(event.animationName, "true");
+  }, "animationName set to true");
+
+  test(function() {
+    var event = new AnimationEvent("test", {animationName: 0.5});
+    assert_equals(event.animationName, "0.5");
+  }, "animationName set to a number");
+
+  test(function() {
+    var event = new AnimationEvent("test", {animationName: []});
+    assert_equals(event.animationName, "");
+  }, "animationName set to []");
+
+  test(function() {
+    var event = new AnimationEvent("test", {animationName: [1, 2, 3]});
+    assert_equals(event.animationName, "1,2,3");
+  }, "animationName set to [1, 2, 3]");
+
+  test(function() {
+    var event = new AnimationEvent("test", {animationName: {sample: 0.5}});
+    assert_equals(event.animationName, "[object Object]");
+  }, "animationName set to an object");
+
+  test(function() {
+    var event = new AnimationEvent("test",
+        {animationName: {valueOf: function () { return 'sample'; }}});
+    assert_equals(event.animationName, "[object Object]");
+  }, "animationName set to an object with a valueOf function");
+
+  test(function() {
     var event = new AnimationEvent("test", {elapsedTime: 0.5});
     assert_equals(event.elapsedTime, 0.5);
   }, "elapsedTime set to 0.5");
 
   test(function() {
+    var event = new AnimationEvent("test", {elapsedTime: -0.5});
+    assert_equals(event.elapsedTime, -0.5);
+  }, "elapsedTime set to -0.5");
+
+  test(function() {
+    var event = new AnimationEvent("test", {elapsedTime: undefined});
+    assert_equals(event.elapsedTime, 0);
+  }, "elapsedTime set to undefined");
+
+  test(function() {
+    var event = new AnimationEvent("test", {elapsedTime: null});
+    assert_equals(event.elapsedTime, 0);
+  }, "elapsedTime set to null");
+
+  test(function() {
+    var event = new AnimationEvent("test", {elapsedTime: false});
+    assert_equals(event.elapsedTime, 0);
+  }, "elapsedTime set to false");
+
+  test(function() {
+    var event = new AnimationEvent("test", {elapsedTime: true});
+    assert_equals(event.elapsedTime, 1);
+  }, "elapsedTime set to true");
+
+  test(function() {
+    var event = new AnimationEvent("test", {elapsedTime: ""});
+    assert_equals(event.elapsedTime, 0);
+  }, "elapsedTime set to ''");
+
+  test(function() {
+    var event = new AnimationEvent("test", {elapsedTime: []});
+    assert_equals(event.elapsedTime, 0);
+  }, "elapsedTime set to []");
+
+  test(function() {
+    var event = new AnimationEvent("test", {elapsedTime: [0.5]});
+    assert_equals(event.elapsedTime, 0.5);
+  }, "elapsedTime set to [0.5]");
+
+  test(function() {
+    var event = new AnimationEvent(
+        "test", {elapsedTime: { valueOf: function() { return 0.5; }}});
+    assert_equals(event.elapsedTime, 0.5);
+  }, "elapsedTime set to an object with a valueOf function");
+
+  test(function() {
+    assert_throws(new TypeError(), function() {
+      new AnimationEvent("test", {elapsedTime: NaN});
+    }, 'elapsedTime cannot be NaN so was expecting a TypeError');
+  }, "elapsedTime cannot be set to NaN");
+
+  test(function() {
+    assert_throws(new TypeError(), function() {
+      new AnimationEvent("test", {elapsedTime: Infinity});
+    }, 'elapsedTime cannot be Infinity so was expecting a TypeError');
+  }, "elapsedTime cannot be set to Infinity");
+
+  test(function() {
+    assert_throws(new TypeError(), function() {
+      new AnimationEvent("test", {elapsedTime: -Infinity});
+    }, 'elapsedTime cannot be -Infinity so was expecting a TypeError');
+  }, "elapsedTime cannot be set to -Infinity");
+
+  test(function() {
+    assert_throws(new TypeError(), function() {
+      new AnimationEvent("test", {elapsedTime: "sample"});
+    }, 'elapsedTime cannot be a string so was expecting a TypeError');
+  }, "elapsedTime cannot be set to 'sample'");
+
+  test(function() {
+    assert_throws(new TypeError(), function() {
+      new AnimationEvent("test", {elapsedTime: [0.5, 1.0]});
+    }, 'elapsedTime cannot be a multi-element array so was expecting a TypeError');
+  }, "elapsedTime cannot be set to [0.5, 1.0]");
+
+  test(function() {
+    assert_throws(new TypeError(), function() {
+      new AnimationEvent("test", {elapsedTime: { sample: 0.5}});
+    }, 'elapsedTime cannot be an object so was expecting a TypeError');
+  }, "elapsedTime cannot be set to an object");
+
+  test(function() {
     var eventInit = {animationName: "sample", elapsedTime: 0.5};
     var event = new AnimationEvent("test", eventInit);
     assert_equals(event.animationName, "sample");
     assert_equals(event.elapsedTime, 0.5);
   }, "AnimationEventInit properties set value");
 })();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-animations/historical.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+
+<title>Historical CSS Animation features must be removed</title>
+<link rel="help" href="http://www.w3.org/TR/css3-animations">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+function isInterfaceNuked(name) {
+  test(function() {
+    assert_equals(window[name], undefined)
+  }, "Historical CSS features must be removed: " + name)
+}
+var nukedInterfaces = [
+  "WebKitAnimationEvent", // Replaced by unprefixed AnimationEvent
+];
+nukedInterfaces.forEach(isInterfaceNuked);
+</script>