OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 | 6 |
7 <body> | 7 <body> |
8 <script> | 8 <script> |
9 | 9 |
10 window.jsTestIsAsync = true; | 10 window.jsTestIsAsync = true; |
(...skipping 18 matching lines...) Expand all Loading... |
29 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true }).cancelable", "true"); | 29 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true }).cancelable", "true"); |
30 shouldBeEmptyString("new MediaKeyEvent('MediaKeyEvent', { bubbles: t
rue, cancelable: true }).keySystem"); | 30 shouldBeEmptyString("new MediaKeyEvent('MediaKeyEvent', { bubbles: t
rue, cancelable: true }).keySystem"); |
31 shouldBeEmptyString("new MediaKeyEvent('MediaKeyEvent', { bubbles: t
rue, cancelable: true }).sessionId"); | 31 shouldBeEmptyString("new MediaKeyEvent('MediaKeyEvent', { bubbles: t
rue, cancelable: true }).sessionId"); |
32 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, ca
ncelable: true }).initData"); | 32 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, ca
ncelable: true }).initData"); |
33 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, ca
ncelable: true }).message"); | 33 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, ca
ncelable: true }).message"); |
34 shouldBeEmptyString("new MediaKeyEvent('MediaKeyEvent', { bubbles: t
rue, cancelable: true }).defaultURL"); | 34 shouldBeEmptyString("new MediaKeyEvent('MediaKeyEvent', { bubbles: t
rue, cancelable: true }).defaultURL"); |
35 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, ca
ncelable: true }).errorCode"); | 35 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, ca
ncelable: true }).errorCode"); |
36 shouldBeZero("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, ca
ncelable: true }).systemCode"); | 36 shouldBeZero("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, ca
ncelable: true }).systemCode"); |
37 | 37 |
38 debug("<br>*** Bubbles and cancelable true, invalid other members **
*"); | 38 debug("<br>*** Bubbles and cancelable true, invalid other members **
*"); |
39 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array, me
ssage: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCode:
undefined }).bubbles", "true"); | 39 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, can
celable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array,
message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCod
e: undefined }).bubbles"); |
40 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array, me
ssage: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCode:
undefined }).cancelable", "true"); | 40 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, can
celable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array,
message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCod
e: undefined }).cancelable"); |
41 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { bubbles:
true, cancelable: true, keySystem: undefined, sessionId: undefined, initData: U
int8Array, message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError,
systemCode: undefined }).keySystem", "undefined"); | 41 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, can
celable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array,
message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCod
e: undefined }).keySystem"); |
42 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { bubbles:
true, cancelable: true, keySystem: undefined, sessionId: undefined, initData: U
int8Array, message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError,
systemCode: undefined }).sessionId", "undefined"); | 42 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, can
celable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array,
message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCod
e: undefined }).sessionId"); |
43 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, ca
ncelable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array
, message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCo
de: undefined }).initData"); | 43 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, can
celable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array,
message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCod
e: undefined }).initData"); |
44 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, ca
ncelable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array
, message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCo
de: undefined }).message"); | 44 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, can
celable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array,
message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCod
e: undefined }).message"); |
45 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { bubbles:
true, cancelable: true, keySystem: undefined, sessionId: undefined, initData: U
int8Array, message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError,
systemCode: undefined }).defaultURL", "undefined"); | 45 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, can
celable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array,
message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCod
e: undefined }).defaultURL"); |
46 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, ca
ncelable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array
, message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCo
de: undefined }).errorCode"); | 46 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, can
celable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array,
message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCod
e: undefined }).errorCode"); |
47 shouldBeZero("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, ca
ncelable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array
, message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCo
de: undefined }).systemCode"); | 47 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, can
celable: true, keySystem: undefined, sessionId: undefined, initData: Uint8Array,
message: Uint8Array, defaultURL: undefined, errorCode: MediaKeyError, systemCod
e: undefined }).systemCode"); |
48 | 48 |
49 debug("<br>*** Initialize 'keySystem' with a invalid values ***"); | 49 debug("<br>*** Initialize 'keySystem' with a invalid values ***"); |
50 emptyObject = { }; | 50 emptyObject = { }; |
51 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { keySyste
m: emptyObject }).keySystem", "[object Object]"); | 51 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { keySyste
m: emptyObject }).keySystem", "[object Object]"); |
52 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { keySyste
m: document }).keySystem", "[object HTMLDocument]"); | 52 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { keySyste
m: document }).keySystem", "[object HTMLDocument]"); |
53 | 53 |
54 debug("<br>*** Initialize 'sessionId' with a invalid values ***"); | 54 debug("<br>*** Initialize 'sessionId' with a invalid values ***"); |
55 emptyObject = { }; | 55 emptyObject = { }; |
56 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { sessionI
d: emptyObject }).sessionId", "[object Object]"); | 56 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { sessionI
d: emptyObject }).sessionId", "[object Object]"); |
57 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { sessionI
d: document }).sessionId", "[object HTMLDocument]"); | 57 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { sessionI
d: document }).sessionId", "[object HTMLDocument]"); |
58 | 58 |
59 debug("<br>*** Initialize 'initData' with a invalid values ***"); | 59 debug("<br>*** Initialize 'initData' with a invalid values ***"); |
60 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { initData: 10 }).i
nitData"); | 60 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { initData: 10 }).in
itData"); |
61 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { initData: \'strin
g\' }).initData"); | 61 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { initData: \'string
\' }).initData"); |
62 emptyObject = { }; | 62 emptyObject = { }; |
63 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { initData: emptyOb
ject }).initData"); | 63 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { initData: emptyObj
ect }).initData"); |
64 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { initData: documen
t }).initData"); | 64 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { initData: document
}).initData"); |
65 | 65 |
66 debug("<br>*** Initialize 'message' with a invalid values ***"); | 66 debug("<br>*** Initialize 'message' with a invalid values ***"); |
67 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { message: 10 }).me
ssage"); | 67 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { message: 10 }).mes
sage"); |
68 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { message: \'string
\' }).message"); | 68 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { message: \'string\
' }).message"); |
69 emptyObject = { }; | 69 emptyObject = { }; |
70 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { message: emptyObj
ect }).message"); | 70 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { message: emptyObje
ct }).message"); |
71 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { message: document
}).message"); | 71 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { message: document
}).message"); |
72 | 72 |
73 debug("<br>*** Initialize 'defaultURL' with a invalid values ***"); | 73 debug("<br>*** Initialize 'defaultURL' with a invalid values ***"); |
74 emptyObject = { }; | 74 emptyObject = { }; |
75 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { defaultU
RL: emptyObject }).defaultURL", "[object Object]"); | 75 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { defaultU
RL: emptyObject }).defaultURL", "[object Object]"); |
76 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { defaultU
RL: document }).defaultURL", "[object HTMLDocument]"); | 76 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { defaultU
RL: document }).defaultURL", "[object HTMLDocument]"); |
77 | 77 |
78 debug("<br>*** Initialize 'errorCode' with a invalid values ***"); | 78 debug("<br>*** Initialize 'errorCode' with a invalid values ***"); |
79 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { errorCode: 10 }).
errorCode"); | 79 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { errorCode: 10 }).e
rrorCode"); |
80 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { errorCode: \'stri
ng\' }).errorCode"); | 80 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { errorCode: \'strin
g\' }).errorCode"); |
81 emptyObject = { }; | 81 emptyObject = { }; |
82 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { errorCode: emptyO
bject }).errorCode"); | 82 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { errorCode: emptyOb
ject }).errorCode"); |
83 shouldBeNull("new MediaKeyEvent('MediaKeyEvent', { errorCode: docume
nt }).errorCode"); | 83 shouldThrow("new MediaKeyEvent('MediaKeyEvent', { errorCode: documen
t }).errorCode"); |
84 | 84 |
85 debug("<br>*** Initialize 'systemCode' with a invalid values ***"); | 85 debug("<br>*** Initialize 'systemCode' with a invalid values ***"); |
86 shouldBeZero("new MediaKeyEvent('MediaKeyEvent', { systemCode: \'str
ing\' }).systemCode"); | 86 shouldBeZero("new MediaKeyEvent('MediaKeyEvent', { systemCode: \'str
ing\' }).systemCode"); |
87 emptyObject = { }; | 87 emptyObject = { }; |
88 shouldBeZero("new MediaKeyEvent('MediaKeyEvent', { systemCode: empty
Object }).systemCode"); | 88 shouldBeZero("new MediaKeyEvent('MediaKeyEvent', { systemCode: empty
Object }).systemCode"); |
89 shouldBeZero("new MediaKeyEvent('MediaKeyEvent', { systemCode: docum
ent }).systemCode"); | 89 shouldBeZero("new MediaKeyEvent('MediaKeyEvent', { systemCode: docum
ent }).systemCode"); |
90 | 90 |
91 debug("<br>*** Bubbles and cancelable true, valid other members ***"
); | 91 debug("<br>*** Bubbles and cancelable true, valid other members ***"
); |
92 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).bubbles", "true"); | 92 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).bubbles", "true"); |
93 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).cancelable", "true"); | 93 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).cancelable", "true"); |
94 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { bubbles:
true, cancelable: true, keySystem: 'keySystem', sessionId: 'sessionId', initDat
a: initDataArray, message: messageArray, defaultURL: 'defaultURL', errorCode: er
rorObject, systemCode: 123 }).keySystem", "keySystem"); | 94 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { bubbles:
true, cancelable: true, keySystem: 'keySystem', sessionId: 'sessionId', initDat
a: initDataArray, message: messageArray, defaultURL: 'defaultURL', errorCode: er
rorObject, systemCode: 123 }).keySystem", "keySystem"); |
95 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { bubbles:
true, cancelable: true, keySystem: 'keySystem', sessionId: 'sessionId', initDat
a: initDataArray, message: messageArray, defaultURL: 'defaultURL', errorCode: er
rorObject, systemCode: 123 }).sessionId", "sessionId"); | 95 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { bubbles:
true, cancelable: true, keySystem: 'keySystem', sessionId: 'sessionId', initDat
a: initDataArray, message: messageArray, defaultURL: 'defaultURL', errorCode: er
rorObject, systemCode: 123 }).sessionId", "sessionId"); |
96 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).initData", "initDataArray"); | 96 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).initData", "initDataArray"); |
97 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).message", "messageArray"); | 97 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).message", "messageArray"); |
98 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { bubbles:
true, cancelable: true, keySystem: 'keySystem', sessionId: 'sessionId', initDat
a: initDataArray, message: messageArray, defaultURL: 'defaultURL', errorCode: er
rorObject, systemCode: 123 }).defaultURL", "defaultURL"); | 98 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { bubbles:
true, cancelable: true, keySystem: 'keySystem', sessionId: 'sessionId', initDat
a: initDataArray, message: messageArray, defaultURL: 'defaultURL', errorCode: er
rorObject, systemCode: 123 }).defaultURL", "defaultURL"); |
99 // FIXME(82988): These two fail. | 99 // FIXME(82988): These two fail. |
100 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).errorCode", "errorObject"); | 100 shouldBeNonNull("new MediaKeyEvent('MediaKeyEvent', { bubbles: true,
cancelable: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: ini
tDataArray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObj
ect, systemCode: 123 }).errorCode"); |
101 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).errorCode.code", "MediaKeyError.MEDIA_KEYERR_UNKNOWN"); | 101 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).errorCode.code", "MediaKeyError.MEDIA_KEYERR_UNKNOWN"); |
102 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).systemCode", "123"); | 102 shouldBe("new MediaKeyEvent('MediaKeyEvent', { bubbles: true, cancel
able: true, keySystem: 'keySystem', sessionId: 'sessionId', initData: initDataAr
ray, message: messageArray, defaultURL: 'defaultURL', errorCode: errorObject, sy
stemCode: 123 }).systemCode", "123"); |
103 | 103 |
104 debug("<br>*** Initialize with valid members ***"); | 104 debug("<br>*** Initialize with valid members ***"); |
105 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).bubbles", "true"
); | 105 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).bubbles", "true"
); |
106 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).cancelable", "tr
ue"); | 106 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).cancelable", "tr
ue"); |
107 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { keySyste
m: 'keySystem', sessionId: 'sessionId', initData: initDataArray, message: messag
eArray, defaultURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).key
System", "keySystem"); | 107 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { keySyste
m: 'keySystem', sessionId: 'sessionId', initData: initDataArray, message: messag
eArray, defaultURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).key
System", "keySystem"); |
108 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { keySyste
m: 'keySystem', sessionId: 'sessionId', initData: initDataArray, message: messag
eArray, defaultURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).ses
sionId", "sessionId"); | 108 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { keySyste
m: 'keySystem', sessionId: 'sessionId', initData: initDataArray, message: messag
eArray, defaultURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).ses
sionId", "sessionId"); |
109 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).initData", "init
DataArray"); | 109 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).initData", "init
DataArray"); |
110 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).message", "messa
geArray"); | 110 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).message", "messa
geArray"); |
111 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { keySyste
m: 'keySystem', sessionId: 'sessionId', initData: initDataArray, message: messag
eArray, defaultURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).def
aultURL", "defaultURL"); | 111 shouldBeEqualToString("new MediaKeyEvent('MediaKeyEvent', { keySyste
m: 'keySystem', sessionId: 'sessionId', initData: initDataArray, message: messag
eArray, defaultURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).def
aultURL", "defaultURL"); |
112 // FIXME(82988): These two fail. | 112 // FIXME(82988): These two fail. |
113 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).errorCode", "err
orObject"); | 113 shouldBeNonNull("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'ke
ySystem', sessionId: 'sessionId', initData: initDataArray, message: messageArray
, defaultURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).errorCode
"); |
114 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).errorCode.code",
"MediaKeyError.MEDIA_KEYERR_UNKNOWN"); | 114 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).errorCode.code",
"MediaKeyError.MEDIA_KEYERR_UNKNOWN"); |
115 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).systemCode", "12
3"); | 115 shouldBe("new MediaKeyEvent('MediaKeyEvent', { keySystem: 'keySystem
', sessionId: 'sessionId', initData: initDataArray, message: messageArray, defau
ltURL: 'defaultURL', errorCode: errorObject, systemCode: 123 }).systemCode", "12
3"); |
116 | 116 |
117 debug(""); | 117 debug(""); |
118 finishJSTest(); | 118 finishJSTest(); |
119 } | 119 } |
120 | 120 |
121 var initDataArray = new Uint8Array([0x41, 0x42, 0x43]); | 121 var initDataArray = new Uint8Array([0x41, 0x42, 0x43]); |
122 var messageArray = new Uint8Array([0x51, 0x52, 0x53]); | 122 var messageArray = new Uint8Array([0x51, 0x52, 0x53]); |
123 // FIXME(82988): This does not create an error like we want. | 123 // FIXME(82988): This does not create an error like we want. |
124 var errorObject = window.MediaKeyError; | 124 //var errorObject = window.MediaKeyError; |
| 125 var errorObject = null; |
125 // shouldBe("typeof errorObject", TBD); | 126 // shouldBe("typeof errorObject", TBD); |
126 | 127 |
127 video = document.createElement('video'); | 128 video = document.createElement('video'); |
128 document.body.appendChild(video); | 129 document.body.appendChild(video); |
129 | 130 |
130 test() | 131 test() |
131 </script> | 132 </script> |
132 | 133 |
133 </body> | 134 </body> |
134 </html> | 135 </html> |
OLD | NEW |