4 <script src=
"../../../resources/js-test.js"></script>
9 description("This tests the constructor for the MediaKeyMessageEvent DOM class.");
11 // No initializer is passed.
12 shouldBe("new MediaKeyMessageEvent('eventType').bubbles", "false");
13 shouldBe("new MediaKeyMessageEvent('eventType').cancelable", "false");
14 shouldBeEqualToString("new MediaKeyMessageEvent('eventType').messageType", "license-request");
15 shouldBeNull("new MediaKeyMessageEvent('eventType').message");
18 shouldBe("new MediaKeyMessageEvent('eventType', { bubbles: false }).bubbles", "false");
19 shouldBe("new MediaKeyMessageEvent('eventType', { bubbles: true }).bubbles", "true");
21 // cancelable is passed.
22 shouldBe("new MediaKeyMessageEvent('eventType', { cancelable: false }).cancelable", "false");
23 shouldBe("new MediaKeyMessageEvent('eventType', { cancelable: true }).cancelable", "true");
26 var arrayBuffer
= new ArrayBuffer(1);
27 shouldBe("new MediaKeyMessageEvent('eventType', { message: arrayBuffer }).message", "arrayBuffer");
29 // messageType is passed.
30 shouldBeEqualToString("new MediaKeyMessageEvent('eventType', { messageType: 'license-request' }).messageType", "license-request");
31 shouldBeEqualToString("new MediaKeyMessageEvent('eventType', { messageType: 'license-renewal' }).messageType", "license-renewal");
32 shouldBeEqualToString("new MediaKeyMessageEvent('eventType', { messageType: 'license-release' }).messageType", "license-release");