mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
28 lines
802 B
HTML
28 lines
802 B
HTML
<!DOCTYPE html>
|
|
<meta charset=utf-8>
|
|
<title>Animation.id</title>
|
|
<link rel="help" href="https://w3c.github.io/web-animations/#dom-animation-id">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="../../testcommon.js"></script>
|
|
<body>
|
|
<div id="log"></div>
|
|
<script>
|
|
"use strict";
|
|
|
|
test(function(t) {
|
|
var div = createDiv(t);
|
|
var animation = div.animate({}, 100 * MS_PER_SEC);
|
|
assert_equals(animation.id, '', 'id for Animation is initially empty');
|
|
}, 'Animation.id initial value');
|
|
|
|
test(function(t) {
|
|
var div = createDiv(t);
|
|
var animation = div.animate({}, 100 * MS_PER_SEC);
|
|
animation.id = 'anim';
|
|
|
|
assert_equals(animation.id, 'anim', 'animation.id reflects the value set');
|
|
}, 'Animation.id setter');
|
|
|
|
</script>
|
|
</body>
|