WebKit Bugzilla
Attachment 341480 Details for
Bug 186046
: Import WPT tests for CSS animations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186046-20180529094459.patch (text/plain), 33.76 KB, created by
Frédéric Wang (:fredw)
on 2018-05-29 00:45:01 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-05-29 00:45:01 PDT
Size:
33.76 KB
patch
obsolete
>Subversion Revision: 232252 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index a18e553979ef3b07851aa5836a7222b9f4d58297..31b0002518e3c2951690e71a33128890cdcb44f8 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-29 Frederic Wang <fwang@igalia.com> >+ >+ Import WPT tests for CSS animations >+ https://bugs.webkit.org/show_bug.cgi?id=186046 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestExpectations: Mark some tests requiring support for reftest-wait as failing/flacky. >+ * tests-options.json: Mark animationevent-types.html as slow. >+ > 2018-05-28 Claudio Saavedra <csaavedra@igalia.com> > > [GTK][WPE] AppCache test gardening >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 4611d08e4c867af7945c761e8272f6c642745f22..cbf3ff2606d5c34b6868e0926438adfe6d6ae90a 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,34 @@ >+2018-05-29 Frederic Wang <fwang@igalia.com> >+ >+ Import WPT tests for CSS animations >+ https://bugs.webkit.org/show_bug.cgi?id=186046 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * resources/import-expectations.json: >+ * web-platform-tests/css/css-animations/OWNERS: Added. >+ * web-platform-tests/css/css-animations/animation-delay-008-expected.html: Added. >+ * web-platform-tests/css/css-animations/animation-delay-008.html: Added. >+ * web-platform-tests/css/css-animations/animation-delay-009-expected.html: Added. >+ * web-platform-tests/css/css-animations/animation-delay-009.html: Added. >+ * web-platform-tests/css/css-animations/animation-delay-010-expected.html: Added. >+ * web-platform-tests/css/css-animations/animation-delay-010.html: Added. >+ * web-platform-tests/css/css-animations/animation-delay-011-expected.html: Added. >+ * web-platform-tests/css/css-animations/animation-delay-011.html: Added. >+ * web-platform-tests/css/css-animations/animation-iteration-count-calc-expected.txt: Added. >+ * web-platform-tests/css/css-animations/animation-iteration-count-calc.html: Added. >+ * web-platform-tests/css/css-animations/animationevent-interface-expected.txt: Added. >+ * web-platform-tests/css/css-animations/animationevent-interface.html: Added. >+ * web-platform-tests/css/css-animations/animationevent-interface.js: Added. >+ (test): >+ * web-platform-tests/css/css-animations/animationevent-pseudoelement-expected.txt: Added. >+ * web-platform-tests/css/css-animations/animationevent-pseudoelement.html: Added. >+ * web-platform-tests/css/css-animations/animationevent-types-expected.txt: Added. >+ * web-platform-tests/css/css-animations/animationevent-types.html: Added. >+ * web-platform-tests/css/css-animations/pending-style-changes-001-expected.txt: Added. >+ * web-platform-tests/css/css-animations/pending-style-changes-001.html: Added. >+ * web-platform-tests/css/css-animations/w3c-import.log: Added. >+ > 2018-05-24 Frederic Wang <fwang@igalia.com> > > Import Web Platform Tests for WOFF2 >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 3f5827663f4853813c17431dba6ca0d7ba3ba4c1..6adb191184baed5da3751e699d2886986096f418 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -1666,6 +1666,10 @@ webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/word-break/word > webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/word-break/word-break-normal-my-000.html [ ImageOnlyFailure ] > webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/word-break/word-break-normal-tdd-000.html [ ImageOnlyFailure ] > >+webkit.org/b/186045 imported/w3c/web-platform-tests/css/css-animations/animation-delay-008.html [ ImageOnlyFailure Pass ] >+webkit.org/b/186045 imported/w3c/web-platform-tests/css/css-animations/animation-delay-009.html [ ImageOnlyFailure Pass ] >+webkit.org/b/186045 imported/w3c/web-platform-tests/css/css-animations/animation-delay-010.html [ ImageOnlyFailure ] >+ > ######################################## > ### START OF display: contents failures > >diff --git a/LayoutTests/imported/w3c/resources/import-expectations.json b/LayoutTests/imported/w3c/resources/import-expectations.json >index 4538892dcfaf5cb78c687738947ff6fe289daf3a..811b989c48684a4d1ccd0a3f21b5ee10c21f210b 100644 >--- a/LayoutTests/imported/w3c/resources/import-expectations.json >+++ b/LayoutTests/imported/w3c/resources/import-expectations.json >@@ -61,6 +61,7 @@ > "web-platform-tests/css-values": "skip", > "web-platform-tests/css/WOFF2": "import", > "web-platform-tests/css/css-align": "import", >+ "web-platform-tests/css/css-animations/": "import", > "web-platform-tests/css/css-color": "import", > "web-platform-tests/css/css-display": "import", > "web-platform-tests/css/css-grid": "import", >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/OWNERS b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/OWNERS >new file mode 100644 >index 0000000000000000000000000000000000000000..71540f51e4af0cdb1fa8a85cdc0b941a5b2cc93f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/OWNERS >@@ -0,0 +1,7 @@ >+@plinss >+@chunywang >+@yunxiaoxie >+@grorg >+@dbaron >+@tabatkins >+@birtles >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-008-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-008-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..ddc7da67ddf5fed83e653d1130a65f5c1e3a6dec >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-008-expected.html >@@ -0,0 +1,13 @@ >+<!doctype html> >+<html> >+<meta charset="utf-8"> >+<link rel="author" title="Brian Birtles" href="mailto:bbirtles@mozilla.com"> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background-color: green; >+} >+</style> >+<div></div> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-008.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-008.html >new file mode 100644 >index 0000000000000000000000000000000000000000..52883fa72ff5a4a57c6a8c2866805ceb5fa0a507 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-008.html >@@ -0,0 +1,37 @@ >+<!doctype html> >+<html class="reftest-wait"> >+<meta charset="utf-8"> >+<title>CSS Animations Test: animation-delay - liveness</title> >+<link rel="author" title="Brian Birtles" href="mailto:bbirtles@mozilla.com"> >+<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animations"> >+<meta name="assert" content="Check that changes to animation-delay on a running >+animation are reflected in output"> >+<meta name="flags" content="dom"> >+<link rel="match" href="animation-common-ref.html"> >+<style> >+@keyframes two-step { >+ from { background-color: red } >+ 50% { background-color: green } >+ to { background-color: green } >+} >+div { >+ width: 100px; >+ height: 100px; >+ background-color: orange; >+} >+</style> >+<div></div> >+<script> >+// Set up animation with no delay >+var div = document.querySelector('div'); >+div.style.animation = 'two-step 200s steps(1)'; >+window.getComputedStyle(div).animation; >+ >+// Wait until animation has started and change delay >+window.requestAnimationFrame(function() { >+ // Fast-forward to mid-point >+ div.style.animationDelay = '-100s'; >+ document.documentElement.removeAttribute('class'); >+}); >+</script> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-009-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-009-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..ddc7da67ddf5fed83e653d1130a65f5c1e3a6dec >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-009-expected.html >@@ -0,0 +1,13 @@ >+<!doctype html> >+<html> >+<meta charset="utf-8"> >+<link rel="author" title="Brian Birtles" href="mailto:bbirtles@mozilla.com"> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background-color: green; >+} >+</style> >+<div></div> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-009.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-009.html >new file mode 100644 >index 0000000000000000000000000000000000000000..6d25b8b1bc00319a71a5fdc8f3fe8af32f844f52 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-009.html >@@ -0,0 +1,46 @@ >+<!doctype html> >+<html class="reftest-wait"> >+<meta charset="utf-8"> >+<title>CSS Animations Test: animation-delay - liveness with animationend</title> >+<link rel="author" title="Brian Birtles" href="mailto:bbirtles@mozilla.com"> >+<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animations"> >+<meta name="assert" content="Check that shortening the animation-delay triggers >+an animationend event"> >+<meta name="flags" content="dom"> >+<link rel="match" href="animation-common-ref.html"> >+<style> >+@keyframes all-red { >+ from { background-color: red } >+ to { background-color: red } >+} >+div { >+ width: 100px; >+ height: 100px; >+ background-color: orange; >+} >+</style> >+<div></div> >+<script> >+// Set up animation with no delay >+var div = document.querySelector('div'); >+div.style.animation = 'all-red 1000s'; >+window.getComputedStyle(div).animation; >+ >+// Set up an animationend event handler to change the background color >+div.addEventListener('animationend', function() { >+ div.style.animation = 'none'; >+ div.style.backgroundColor = 'green'; >+}); >+ >+// Wait until animation has started and change delay >+window.requestAnimationFrame(function() { >+ // Fast-forward to end >+ div.style.animationDelay = '-1000s'; >+ >+ // Wait a frame to allow the event handler to run >+ window.requestAnimationFrame(function() { >+ document.documentElement.removeAttribute('class'); >+ }); >+}); >+</script> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-010-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-010-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..ddc7da67ddf5fed83e653d1130a65f5c1e3a6dec >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-010-expected.html >@@ -0,0 +1,13 @@ >+<!doctype html> >+<html> >+<meta charset="utf-8"> >+<link rel="author" title="Brian Birtles" href="mailto:bbirtles@mozilla.com"> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background-color: green; >+} >+</style> >+<div></div> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-010.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-010.html >new file mode 100644 >index 0000000000000000000000000000000000000000..d18064dd214940a9ed762889f1df38d7ae050765 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-010.html >@@ -0,0 +1,46 @@ >+<!doctype html> >+<html class="reftest-wait"> >+<meta charset="utf-8"> >+<title>CSS Animations Test: animation-delay - liveness with >+ animationstart</title> >+<link rel="author" title="Brian Birtles" href="mailto:bbirtles@mozilla.com"> >+<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animations"> >+<meta name="assert" content="Check that extending the animation-delay triggers >+an animationstart event"> >+<meta name="flags" content="dom"> >+<link rel="match" href="animation-common-ref.html"> >+<style> >+@keyframes all-orange { >+ from { background-color: orange } >+ to { background-color: orange } >+} >+div { >+ width: 100px; >+ height: 100px; >+ background-color: red; >+} >+</style> >+<div></div> >+<script> >+// Set up animation with a negative delay such that it finishes very soon >+var div = document.querySelector('div'); >+div.style.animation = 'all-orange 1000s -999.99s'; >+ >+// Wait for the animation to finish >+div.addEventListener('animationend', function() { >+ // Set up an animationstart event handler to change the background color >+ div.addEventListener('animationstart', function() { >+ div.style.animation = 'none'; >+ div.style.backgroundColor = 'green'; >+ }); >+ >+ // Then extend the delay so that the animation restarts >+ div.style.animationDelay = '0s'; >+ >+ // Wait a frame to allow the event handler to run >+ window.requestAnimationFrame(function() { >+ document.documentElement.removeAttribute('class'); >+ }); >+}); >+</script> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-011-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-011-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..ddc7da67ddf5fed83e653d1130a65f5c1e3a6dec >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-011-expected.html >@@ -0,0 +1,13 @@ >+<!doctype html> >+<html> >+<meta charset="utf-8"> >+<link rel="author" title="Brian Birtles" href="mailto:bbirtles@mozilla.com"> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background-color: green; >+} >+</style> >+<div></div> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-011.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-011.html >new file mode 100644 >index 0000000000000000000000000000000000000000..415a57475537979e429b0c3c0dd2e0213c17f930 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-011.html >@@ -0,0 +1,24 @@ >+<!doctype html> >+<meta charset="utf-8"> >+<title>CSS Animations Test: inherited animation-delay with mismatched animation-name length</title> >+<link rel="author" title="Emilio Cobos Ãlvarez" href="mailto:emilio@crisal.io"> >+<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animations"> >+<link rel="match" href="animation-common-ref.html"> >+<style> >+div:after { >+ content: ''; >+ display: block; >+ width: 100px; >+ height: 100px; >+ background: red; >+ animation: doesntmatter 50s linear infinite, >+ bg 100s step-end infinite; >+ animation-play-state: paused; >+ animation-delay: inherit; >+} >+ >+@keyframes bg { >+ 50% { background: green; } >+} >+</style> >+<div style="animation-delay: -50s"></div> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-iteration-count-calc-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-iteration-count-calc-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..e767daa68b17fd9536e4efab0b6fd512c43c93bd >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-iteration-count-calc-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS calc() should be accepted in animation-iteration-count. >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-iteration-count-calc.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-iteration-count-calc.html >new file mode 100644 >index 0000000000000000000000000000000000000000..44e1e96a589a4e1c5b98e919e7246d05097b0604 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-iteration-count-calc.html >@@ -0,0 +1,15 @@ >+<!doctype html> >+<meta charset="utf-8"> >+<title>CSS Test: Animation count accepts calc()</title> >+<link rel="author" name="Emilio Cobos Ãlvarez" href="mailto:emilio@crisal.io"> >+<link rel="help" href="https://drafts.csswg.org/css-values-3/#number-value"> >+<link rel="help" href="https://drafts.csswg.org/css-animations/#animation-iteration-count"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="target" style="animation-iteration-count: calc(1 + 3)"> >+<script> >+test(function() { >+ let target = document.getElementById("target"); >+ assert_equals(getComputedStyle(target).animationIterationCount, "4") >+}, "calc() should be accepted in animation-iteration-count."); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-interface-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-interface-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..c4454a88efe8439cf743f5969da235fe88e8b48b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-interface-expected.txt >@@ -0,0 +1,19 @@ >+ >+PASS the event is an instance of AnimationEvent >+PASS the event inherts from Event >+PASS Missing type argument >+PASS type argument is string >+PASS type argument is null >+PASS event type set to undefined >+PASS animationName has default value of empty string >+PASS elapsedTime has default value of 0.0 >+PASS animationName is readonly >+PASS elapsedTime is readonly >+PASS animationEventInit argument is null >+PASS animationEventInit argument is undefined >+PASS animationEventInit argument is empty dictionary >+FAIL AnimationEvent.pseudoElement initialized from the dictionary assert_equals: expected (string) "::testPseudo" but got (undefined) undefined >+PASS animationName set to 'sample' >+PASS elapsedTime set to 0.5 >+PASS AnimationEventInit properties set value >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-interface.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-interface.html >new file mode 100644 >index 0000000000000000000000000000000000000000..5b1bc4265f0f06b9b564d66ecc76fd6a11b6fef2 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-interface.html >@@ -0,0 +1,10 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Animations Test: AnimationEvent interface</title> >+<link rel="author" title="Intel" href="http://www.intel.com"> >+<link rel="help" href="https://drafts.csswg.org/css-animations-1/#interface-dom"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script src="animationevent-interface.js"></script> >+<div id="log"></div> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-interface.js b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-interface.js >new file mode 100644 >index 0000000000000000000000000000000000000000..56d30a4a37770fa2a32698d5401246e882e1f6e0 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-interface.js >@@ -0,0 +1,92 @@ >+(function() { >+ test(function() { >+ var event = new AnimationEvent(""); >+ assert_true(event instanceof window.AnimationEvent); >+ }, "the event is an instance of AnimationEvent"); >+ >+ test(function() { >+ var event = new AnimationEvent(""); >+ assert_true(event instanceof window.Event); >+ }, "the event inherts from Event"); >+ >+ test(function() { >+ assert_throws(new TypeError(), function() { >+ new AnimationEvent(); >+ }, 'First argument is required, so was expecting a TypeError.'); >+ }, 'Missing type argument'); >+ >+ test(function() { >+ var event = new AnimationEvent("test"); >+ assert_equals(event.type, "test"); >+ }, "type argument is string"); >+ >+ test(function() { >+ var event = new AnimationEvent(null); >+ assert_equals(event.type, "null"); >+ }, "type argument is null"); >+ >+ test(function() { >+ var event = new AnimationEvent(undefined); >+ assert_equals(event.type, "undefined"); >+ }, "event type set to undefined"); >+ >+ test(function() { >+ var event = new AnimationEvent("test"); >+ assert_equals(event.animationName, ""); >+ }, "animationName has default value of empty string"); >+ >+ test(function() { >+ var event = new AnimationEvent("test"); >+ assert_equals(event.elapsedTime, 0.0); >+ }, "elapsedTime has default value of 0.0"); >+ >+ test(function() { >+ var event = new AnimationEvent("test"); >+ assert_readonly(event, "animationName", "readonly attribute value"); >+ }, "animationName is readonly"); >+ >+ test(function() { >+ var event = new AnimationEvent("test"); >+ assert_readonly(event, "elapsedTime", "readonly attribute value"); >+ }, "elapsedTime is readonly"); >+ >+ test(function() { >+ var event = new AnimationEvent("test", null); >+ assert_equals(event.animationName, ""); >+ assert_equals(event.elapsedTime, 0.0); >+ }, "animationEventInit argument is null"); >+ >+ test(function() { >+ var event = new AnimationEvent("test", undefined); >+ assert_equals(event.animationName, ""); >+ assert_equals(event.elapsedTime, 0.0); >+ }, "animationEventInit argument is undefined"); >+ >+ test(function() { >+ var event = new AnimationEvent("test", {}); >+ assert_equals(event.animationName, ""); >+ assert_equals(event.elapsedTime, 0.0); >+ }, "animationEventInit argument is empty dictionary"); >+ >+ test(function() { >+ var event = new AnimationEvent("test", {pseudoElement: "::testPseudo"}); >+ assert_equals(event.pseudoElement, "::testPseudo"); >+ }, "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", {elapsedTime: 0.5}); >+ assert_equals(event.elapsedTime, 0.5); >+ }, "elapsedTime set to 0.5"); >+ >+ 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"); >+})(); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-pseudoelement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-pseudoelement-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..36479251198907cd9f162cab025816aea85c1749 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-pseudoelement-expected.txt >@@ -0,0 +1,3 @@ >+ >+FAIL AnimationEvent should have the correct pseudoElement memeber assert_equals: expected (string) "::before" but got (undefined) undefined >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-pseudoelement.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-pseudoelement.html >new file mode 100644 >index 0000000000000000000000000000000000000000..8de41cc613b00728ebc4642ab2fc83c73df82bc0 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-pseudoelement.html >@@ -0,0 +1,29 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Animations Test: AnimationEvent pseudoElement</title> >+<link rel="help" href="https://drafts.csswg.org/css-animations/#interface-animationevent"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<style> >+ #target::before { >+ content: ""; >+ animation: move 1s; >+ } >+ >+ @keyframes move { >+ to { transform: translate(100px); } >+ } >+</style> >+<div id='target'></div> >+<script> >+ async_test(function(t) { >+ var target = document.getElementById('target'); >+ target.addEventListener("animationstart", t.step_func(function(evt) { >+ assert_true(evt instanceof window.AnimationEvent); >+ assert_equals(evt.pseudoElement, "::before"); >+ >+ t.done(); >+ }), true); >+ }, "AnimationEvent should have the correct pseudoElement memeber"); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-types-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-types-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..8ccc394997d9ff42df799b002f3ebe814063fae9 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-types-expected.txt >@@ -0,0 +1,6 @@ >+Filler Text >+ >+FAIL animationstart event is instanceof AnimationEvent assert_idl_attribute: animationstart has pseudoElement property property "pseudoElement" not found in prototype chain >+FAIL animationend event is instanceof AnimationEvent assert_idl_attribute: animationstart has pseudoElement property property "pseudoElement" not found in prototype chain >+FAIL animationiteration event is instanceof AnimationEvent assert_idl_attribute: animationstart has pseudoElement property property "pseudoElement" not found in prototype chain >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-types.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-types.html >new file mode 100644 >index 0000000000000000000000000000000000000000..77f514a297bfd271abb488f086723af7ed0c9ff6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-types.html >@@ -0,0 +1,84 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<meta name="timeout" content="long"> >+<title>CSS Animations Test: AnimationEvnt types - animationstart, animationend,animationiteration</title> >+<link rel="author" title="Intel" href="http://www.intel.com"> >+<link rel="help" href="https://drafts.csswg.org/css-animations-1/#event-animationevent"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<style> >+ #test { >+ animation-name: sample; >+ animation-duration: 2s; >+ animation-delay: -1s; >+ animation-iteration-count: 2; >+ >+ background-color: blue; >+ height: 100px; >+ width: 100px; >+ position: relative; >+ } >+ >+ @keyframes sample { >+ from { >+ left: 150px; >+ } >+ to { >+ left: 0px; >+ } >+ } >+</style> >+<div id="test">Filler Text</div> >+<div id="log"></div> >+<script> >+ var testDiv = document.getElementById("test"); >+ >+ async_test(function(t) { >+ testDiv.addEventListener("animationstart", t.step_func(function(evt) { >+ assert_true(evt instanceof window.AnimationEvent); >+ >+ assert_idl_attribute(evt, "animationName", "animationstart has animationName property"); >+ assert_idl_attribute(evt, "elapsedTime", "animationstart has elapsedTime property"); >+ assert_idl_attribute(evt, "pseudoElement", "animationstart has pseudoElement property"); >+ >+ assert_equals(evt.animationName, "sample", "animationstart has animationName value"); >+ assert_equals(evt.elapsedTime, 1, "animationstart has elapsedTime value"); >+ assert_equals(evt.pseudoElement, "", "animaitonstart has correct pseudoElement value"); >+ >+ t.done(); >+ }), true); >+ }, "animationstart event is instanceof AnimationEvent"); >+ >+ async_test(function(t) { >+ testDiv.addEventListener("animationend", t.step_func(function(evt) { >+ assert_true(evt instanceof window.AnimationEvent); >+ >+ assert_idl_attribute(evt, "animationName", "animationend has animationName property"); >+ assert_idl_attribute(evt, "elapsedTime", "animationend has elapsedTime property"); >+ assert_idl_attribute(evt, "pseudoElement", "animationstart has pseudoElement property"); >+ >+ assert_equals(evt.animationName, "sample", "animationend has animationName value"); >+ assert_equals(evt.elapsedTime, 4, "animationend has elapsedTime value"); >+ assert_equals(evt.pseudoElement, "", "animaitonstart has correct pseudoElement value"); >+ >+ t.done(); >+ }), true); >+ }, "animationend event is instanceof AnimationEvent"); >+ >+ async_test(function(t) { >+ testDiv.addEventListener("animationiteration", t.step_func(function(evt) { >+ assert_true(evt instanceof window.AnimationEvent); >+ >+ assert_idl_attribute(evt, "animationName", "animationiteration has animationName property"); >+ assert_idl_attribute(evt, "elapsedTime", "animationiteration has elapsedTime property"); >+ assert_idl_attribute(evt, "pseudoElement", "animationstart has pseudoElement property"); >+ >+ assert_equals(evt.animationName, "sample", "animationiteration has animationName value"); >+ assert_equals(evt.elapsedTime, 2, "animationiteration has elapsedTime value"); >+ assert_equals(evt.pseudoElement, "", "animaitonstart has correct pseudoElement value"); >+ >+ t.done(); >+ }), true); >+ }, "animationiteration event is instanceof AnimationEvent"); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/pending-style-changes-001-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/pending-style-changes-001-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..6ceafd4b226b6391a000e4ba7e59879e26de067f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/pending-style-changes-001-expected.txt >@@ -0,0 +1,4 @@ >+ >+FAIL Animatable::getAnimations() should be able to see a style-created CSS animation immediately assert_equals: target.getAnimations() should include the CSS animation after animate class added. expected 1 but got 0 >+FAIL Document::getAnimations() should be able to see a style-created CSS animation immediately assert_equals: document.getAnimations() should include the CSS animation after animate class added. expected 1 but got 0 >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/pending-style-changes-001.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/pending-style-changes-001.html >new file mode 100644 >index 0000000000000000000000000000000000000000..fb74d7fa7d062d60153d47913df9eb2b0c7267c8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/pending-style-changes-001.html >@@ -0,0 +1,34 @@ >+<meta charset=utf-8> >+<title>CSS Animations Test: requirement on pending style changes - getAnimations</title> >+<link rel="help" href="https://drafts.csswg.org/css-animations-2/#requirements-on-pending-style-changes"> >+ >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<style> >+@keyframes anim {} >+ >+.animate { >+ animation: anim 10s; >+} >+</style> >+ >+<div id="target"></div> >+ >+<script> >+test (t => { >+ assert_equals(target.getAnimations().length, 0, 'Test precondition.'); >+ target.classList.add('animate'); >+ assert_equals(target.getAnimations().length, 1, >+ 'target.getAnimations() should include the CSS animation after animate class added.'); >+ target.classList.remove('animate'); >+}, 'Animatable::getAnimations() should be able to see a style-created CSS animation immediately'); >+ >+test(t => { >+ assert_equals(document.getAnimations().length, 0, 'Test precondition.'); >+ target.classList.add('animate'); >+ assert_equals(document.getAnimations().length, 1, >+ 'document.getAnimations() should include the CSS animation after animate class added.'); >+ target.classList.remove('animate'); >+}, 'Document::getAnimations() should be able to see a style-created CSS animation immediately'); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/w3c-import.log >new file mode 100644 >index 0000000000000000000000000000000000000000..b07c2e4e2d301ca5a82f99e7021d6dd29c2051f6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/w3c-import.log >@@ -0,0 +1,31 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/w3c/web-platform-tests >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/OWNERS >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-008-expected.html >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-008.html >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-009-expected.html >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-009.html >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-010-expected.html >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-010.html >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-011-expected.html >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-delay-011.html >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animation-iteration-count-calc.html >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-interface.html >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-interface.js >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-pseudoelement.html >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/animationevent-types.html >+/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/pending-style-changes-001.html >diff --git a/LayoutTests/tests-options.json b/LayoutTests/tests-options.json >index 654efdfe7884b27b857a1da69285f4e8998c7892..06066e78adc71d54e04934c44aaec12d801eee03 100644 >--- a/LayoutTests/tests-options.json >+++ b/LayoutTests/tests-options.json >@@ -404,6 +404,9 @@ > "imported/w3c/web-platform-tests/cors/status-async.htm": [ > "slow" > ], >+ "imported/w3c/web-platform-tests/css/css-animations/animationevent-types.html": [ >+ "slow" >+ ], > "imported/w3c/web-platform-tests/dom/nodes/Document-characterSet-normalization.html": [ > "slow" > ],
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
youennf
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186046
: 341480