Bug 1411806 - Add idlharness test for AnimationPlaybackEvent; r=hiro

MozReview-Commit-ID: BfMeHktpHpZ

--HG--
extra : rebase_source : 5fd819d340f27edd43c2ea9de1c59903f4dc4ad3
This commit is contained in:
Brian Birtles 2017-10-27 13:40:41 +09:00
parent a324ffd50a
commit 0cfaed9e4f
2 changed files with 56 additions and 0 deletions

View File

@ -354440,6 +354440,12 @@
{}
]
],
"web-animations/interfaces/AnimationPlaybackEvent/idlharness.html": [
[
"/web-animations/interfaces/AnimationPlaybackEvent/idlharness.html",
{}
]
],
"web-animations/interfaces/Document/getAnimations.html": [
[
"/web-animations/interfaces/Document/getAnimations.html",
@ -585439,6 +585445,10 @@
"9a6eae75862dec36b7839dc68edc31891a651284",
"testharness"
],
"web-animations/interfaces/AnimationPlaybackEvent/idlharness.html": [
"fbcabef92248296bf436a73616ea5b030d074b3f",
"testharness"
],
"web-animations/interfaces/Document/getAnimations.html": [
"bd39d7f28dd03ba22a32ce09226dc263180254eb",
"testharness"

View File

@ -0,0 +1,46 @@
<!doctype html>
<meta charset=utf-8>
<title>AnimationPlaybackEvent IDL</title>
<link rel="help"
href="https://w3c.github.io/web-animations/#animationplaybackevent">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<div id="log"></div>
<script type="text/plain" id="AnimationPlaybackEvent-IDL">
dictionary EventInit {
boolean bubbles = false;
boolean cancelable = false;
boolean composed = false;
};
dictionary AnimationPlaybackEventInit : EventInit {
double? currentTime = null;
double? timelineTime = null;
};
[Exposed=Window,
Constructor (DOMString type,
optional AnimationPlaybackEventInit eventInitDict
)]
interface AnimationPlaybackEvent : Event {
readonly attribute double? currentTime;
readonly attribute double? timelineTime;
};
</script>
<script>
'use strict';
const idlArray = new IdlArray();
idlArray.add_untested_idls('interface Event {};');
idlArray.add_idls(
document.getElementById('AnimationPlaybackEvent-IDL').textContent
);
idlArray.add_objects({
AnimationPlaybackEvent: [ 'new AnimationPlaybackEvent(\'cancel\')' ],
});
idlArray.test();
</script>