Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/constructors/media-key-message-event-constructor.html

Issue 2354083003: media: Change MediaKeyMessageEventInit to require both attributes (Closed)
Patch Set: update media-key-message-event-constructor test Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/constructors/media-key-message-event-constructor-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <body> 6 <body>
7 <script> 7 <script>
8 8
9 description("This tests the constructor for the MediaKeyMessageEvent DOM class." ); 9 description("This tests the constructor for the MediaKeyMessageEvent DOM class." );
10 10
11 // No initializer is passed. 11 var arrayBuffer = new ArrayBuffer(1);
12 shouldBe("new MediaKeyMessageEvent('eventType').bubbles", "false"); 12
13 shouldBe("new MediaKeyMessageEvent('eventType').cancelable", "false"); 13 // Default values for bubbles and cancelable.
14 shouldBeEqualToString("new MediaKeyMessageEvent('eventType').messageType", "lice nse-request"); 14 shouldBe("new MediaKeyMessageEvent('eventType', { messageType: 'license-request' , message: arrayBuffer }).bubbles", "false");
15 shouldBeNull("new MediaKeyMessageEvent('eventType').message"); 15 shouldBe("new MediaKeyMessageEvent('eventType', { messageType: 'license-request' , message: arrayBuffer }).cancelable", "false");
16 16
17 // bubbles is passed. 17 // bubbles is passed.
18 shouldBe("new MediaKeyMessageEvent('eventType', { bubbles: false }).bubbles", "f alse"); 18 shouldBe("new MediaKeyMessageEvent('eventType', { bubbles: false, messageType: ' license-request', message: arrayBuffer }).bubbles", "false");
19 shouldBe("new MediaKeyMessageEvent('eventType', { bubbles: true }).bubbles", "tr ue"); 19 shouldBe("new MediaKeyMessageEvent('eventType', { bubbles: true, messageType: 'l icense-request', message: arrayBuffer }).bubbles", "true");
20 20
21 // cancelable is passed. 21 // cancelable is passed.
22 shouldBe("new MediaKeyMessageEvent('eventType', { cancelable: false }).cancelabl e", "false"); 22 shouldBe("new MediaKeyMessageEvent('eventType', { cancelable: false, messageType : 'license-request', message: arrayBuffer }).cancelable", "false");
23 shouldBe("new MediaKeyMessageEvent('eventType', { cancelable: true }).cancelable ", "true"); 23 shouldBe("new MediaKeyMessageEvent('eventType', { cancelable: true, messageType: 'license-request', message: arrayBuffer }).cancelable", "true");
24 24
25 // message is passed. 25 // message is passed.
26 var arrayBuffer = new ArrayBuffer(1); 26 shouldBe("new MediaKeyMessageEvent('eventType', { messageType: 'license-request' , message: arrayBuffer }).message", "arrayBuffer");
27 shouldBe("new MediaKeyMessageEvent('eventType', { message: arrayBuffer }).messag e", "arrayBuffer");
28 27
29 // messageType is passed. 28 // messageType is passed.
30 shouldBeEqualToString("new MediaKeyMessageEvent('eventType', { messageType: 'lic ense-request' }).messageType", "license-request"); 29 shouldBeEqualToString("new MediaKeyMessageEvent('eventType', { messageType: 'lic ense-request', message: arrayBuffer }).messageType", "license-request");
31 shouldBeEqualToString("new MediaKeyMessageEvent('eventType', { messageType: 'lic ense-renewal' }).messageType", "license-renewal"); 30 shouldBeEqualToString("new MediaKeyMessageEvent('eventType', { messageType: 'lic ense-renewal', message: arrayBuffer }).messageType", "license-renewal");
32 shouldBeEqualToString("new MediaKeyMessageEvent('eventType', { messageType: 'lic ense-release' }).messageType", "license-release"); 31 shouldBeEqualToString("new MediaKeyMessageEvent('eventType', { messageType: 'lic ense-release', message: arrayBuffer }).messageType", "license-release");
33 32
34 </script> 33 </script>
35 </body> 34 </body>
36 </html> 35 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/constructors/media-key-message-event-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698