fune/testing/web-platform/tests/css/css-animations/animationevent-pseudoelement.html
Xida Chen fd9a5813bf Bug 1455303 [wpt PR 10532] - Implement AnimationEvent.pseudoElement, a=testonly
Automatic update from web-platform-testsImplement AnimationEvent.pseudoElement

The spec is here:
https://drafts.csswg.org/css-animations/#interface-animationevent

A layout test is changed to test this API.

Bug: 437132
Change-Id: Ic463b19488271e1caeb78afa6120bb53f7d5e94d
Reviewed-on: https://chromium-review.googlesource.com/1019383
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555898}

--

wpt-commits: 1550fc2313eca53eec8ea88a2b024446665ea4bf
wpt-pr: 10532
2018-05-14 09:54:55 +00:00

29 lines
856 B
HTML

<!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>