Update web-platform-tests to revision d04a8fc02b85bd32799691759c8c05ead07cd939

This commit is contained in:
WPT Sync Bot 2018-03-23 21:12:55 -04:00
parent e8fdc677f4
commit 2b35c55ac7
63 changed files with 2068 additions and 340 deletions

View file

@ -7,43 +7,22 @@
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<div id="log"></div>
<script type="text/plain" id="Animation-IDL">
enum AnimationPlayState { "idle", "pending", "running", "paused", "finished" };
[Constructor (optional AnimationEffect? effect = null,
optional AnimationTimeline? timeline)]
interface Animation : EventTarget {
attribute DOMString id;
attribute AnimationEffect? effect;
attribute AnimationTimeline? timeline;
attribute double? startTime;
attribute double? currentTime;
attribute double playbackRate;
readonly attribute AnimationPlayState playState;
readonly attribute boolean pending;
readonly attribute Promise<Animation> ready;
readonly attribute Promise<Animation> finished;
attribute EventHandler onfinish;
attribute EventHandler oncancel;
void cancel ();
void finish ();
void play ();
void pause ();
void updatePlaybackRate (double playbackRate);
void reverse ();
};
</script>
<script>
'use strict';
const idlArray = new IdlArray();
promise_test(async () => {
const text = await fetch('/interfaces/web-animations.idl').then(response =>
response.text(),
);
const idlArray = new IdlArray();
idlArray.add_idls(text, { only: ['Animation', 'AnimationPlayState'] });
idlArray.add_untested_idls('interface AnimationTimeline {};');
idlArray.add_untested_idls('interface EventHandler {};');
idlArray.add_untested_idls('interface EventTarget {};');
idlArray.add_idls(document.getElementById('Animation-IDL').textContent);
idlArray.add_objects( { Animation: ['new Animation()'] } );
idlArray.test();
idlArray.add_untested_idls('interface AnimationTimeline {};');
idlArray.add_untested_idls('interface EventHandler {};');
idlArray.add_untested_idls('interface EventTarget {};');
idlArray.add_objects( { Animation: ['new Animation()'] } );
idlArray.test();
done();
}, 'Animation interface.');
</script>

View file

@ -8,39 +8,32 @@
<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();
promise_test(async () => {
const text = await fetch('/interfaces/web-animations.idl').then(response =>
response.text(),
);
const idlArray = new IdlArray();
idlArray.add_untested_idls(`dictionary EventInit {
boolean bubbles = false;
boolean cancelable = false;
boolean composed = false;
};`);
idlArray.add_idls(text, {
only: [
'AnimationPlaybackEventInit',
'AnimationPlaybackEvent',
]
});
idlArray.add_untested_idls('interface Event {};');
idlArray.add_idls(
document.getElementById('AnimationPlaybackEvent-IDL').textContent
);
idlArray.add_objects({
AnimationPlaybackEvent: [ 'new AnimationPlaybackEvent(\'cancel\')' ],
});
idlArray.test();
idlArray.add_untested_idls('interface Event {};');
idlArray.add_objects({
AnimationPlaybackEvent: ['new AnimationPlaybackEvent(\'cancel\')'],
});
idlArray.test();
done();
}, 'AnimationPlaybackEvent interface.');
</script>

View file

@ -7,30 +7,24 @@
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<div id="log"></div>
<script type="text/plain" id="AnimationTimeline-IDL">
interface AnimationTimeline {
readonly attribute double? currentTime;
};
</script>
<script type="text/plain" id="DocumentTimeline-IDL">
dictionary DocumentTimelineOptions {
DOMHighResTimeStamp originTime = 0;
};
[Constructor (optional DocumentTimelineOptions options)]
interface DocumentTimeline : AnimationTimeline {
};
</script>
<script>
'use strict';
const idlArray = new IdlArray();
idlArray.add_idls(
document.getElementById('AnimationTimeline-IDL').textContent);
idlArray.add_idls(
document.getElementById('DocumentTimeline-IDL').textContent);
idlArray.add_objects( { DocumentTimeline: ['document.timeline'] } );
idlArray.test();
promise_test(async () => {
const text = await fetch('/interfaces/web-animations.idl').then(response =>
response.text(),
);
const idlArray = new IdlArray();
idlArray.add_idls(text, {
only: [
'AnimationTimeline',
'DocumentTimelineOptions',
'DocumentTimeline',
]
});
idlArray.add_objects({ DocumentTimeline: ['document.timeline'] });
idlArray.test();
done();
}, 'DocumentTimeline interface.');
</script>

View file

@ -10,14 +10,6 @@
<script src="/resources/idlharness.js"></script>
<div id="log"></div>
<script type="text/plain" id="AnimationEffect-IDL">
enum FillMode { "none", "forwards", "backwards", "both", "auto" };
enum PlaybackDirection {
"normal",
"reverse",
"alternate",
"alternate-reverse"
};
dictionary EffectTiming {
double delay = 0.0;
double endDelay = 0.0;
@ -55,46 +47,33 @@ interface AnimationEffect {
void updateTiming(optional OptionalEffectTiming timing);
};
</script>
<script type="text/plain" id="KeyframeEffect-IDL">
enum IterationCompositeOperation { "replace", "accumulate" };
enum CompositeOperation { "replace", "add", "accumulate" };
dictionary KeyframeEffectOptions : EffectTiming {
IterationCompositeOperation iterationComposite = "replace";
CompositeOperation composite = "replace";
};
[Exposed=Window,
Constructor ((Element or CSSPseudoElement)? target,
object? keyframes,
optional (unrestricted double or KeyframeEffectOptions) options),
Constructor (KeyframeEffect source)]
interface KeyframeEffect : AnimationEffect {
attribute (Element or CSSPseudoElement)? target;
attribute IterationCompositeOperation iterationComposite;
attribute CompositeOperation composite;
sequence<object> getKeyframes ();
void setKeyframes (object? keyframes);
};
</script>
<script>
'use strict';
const idlArray = new IdlArray();
promise_test(async () => {
const idlArray = new IdlArray();
idlArray.add_untested_idls(
document.getElementById('AnimationEffect-IDL').textContent
);
const text = await fetch('/interfaces/web-animations.idl').then(response =>
response.text(),
);
idlArray.add_idls(text, {
only: [
'IterationCompositeOperation',
'CompositeOperation',
'KeyframeEffectOptions',
'KeyframeEffect',
]
});
idlArray.add_untested_idls('interface CSSPseudoElement {};');
idlArray.add_untested_idls('interface Element {};');
idlArray.add_untested_idls(
document.getElementById('AnimationEffect-IDL').textContent
);
idlArray.add_idls(
document.getElementById('KeyframeEffect-IDL').textContent
);
idlArray.add_objects({
KeyframeEffect: ['new KeyframeEffect(null, null)'],
});
idlArray.test();
idlArray.add_untested_idls('interface CSSPseudoElement {};');
idlArray.add_untested_idls('interface Element {};');
idlArray.add_objects({
KeyframeEffect: ['new KeyframeEffect(null, null)'],
});
idlArray.test();
done();
}, 'KeyframeEffect interface.');
</script>