haikuwebkit/LayoutTests/fast/events/webkit-media-key-events-con...

36 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

Update WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent to stop using legacy [ConstructorTemplate=Event] https://bugs.webkit.org/show_bug.cgi?id=163369 Reviewed by Ryosuke Niwa. Source/WebCore: Update WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent to stop using legacy [ConstructorTemplate=Event] and use regular constructors instead. This also adds support for having dictionary members that are typed arrays because this was needed. Test: fast/events/webkit-media-key-events-constructor.html * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp: (WebCore::WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent): * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h: (WebCore::WebKitMediaKeyMessageEvent::create): (WebCore::WebKitMediaKeyMessageEvent::createForBindings): Deleted. * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp: (WebCore::WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent): * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h: (WebCore::WebKitMediaKeyNeededEvent::create): (WebCore::WebKitMediaKeyNeededEvent::createForBindings): Deleted. * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl: * bindings/js/JSDOMConvert.h: (WebCore::Converter<IDLInterface<JSC::GenericTypedArrayView<Adaptor>>>::convert): * bindings/scripts/CodeGeneratorJS.pm: (GenerateDefaultValue): * dom/InputEvent.cpp: (WebCore::InputEvent::InputEvent): * dom/InputEvent.h: * dom/InputEvent.idl: LayoutTests: Add layout test coverage. * fast/events/webkit-media-key-events-constructor-expected.txt: Added. * fast/events/webkit-media-key-events-constructor.html: Added. Canonical link: https://commits.webkit.org/181202@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-13 05:18:59 +00:00
Test the WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent constructors.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
event = new WebKitMediaKeyMessageEvent("foo")
PASS event.type is "foo"
PASS event.bubbles is false
PASS event.cancelable is false
PASS event.message is null
PASS event.destinationURL is ""
event = new WebKitMediaKeyMessageEvent("foo", { bubbles: true, cancelable: true, message: testMessage, destinationURL: "testURL" })
PASS event.type is "foo"
PASS event.bubbles is true
PASS event.cancelable is true
PASS event.message is testMessage
PASS event.destinationURL is "testURL"
event = new WebKitMediaKeyNeededEvent("foo")
PASS event.type is "foo"
PASS event.bubbles is false
PASS event.cancelable is false
PASS event.initData is null
event = new WebKitMediaKeyNeededEvent("foo", { bubbles: true, cancelable: true, initData: testMessage })
PASS event.type is "foo"
PASS event.bubbles is true
PASS event.cancelable is true
PASS event.initData is testMessage
PASS successfullyParsed is true
TEST COMPLETE