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

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

Issue 2489033005: Web MIDI: deprecate MIDIMessageEvent.receivedTime (Closed)
Patch Set: [rebase] Created 4 years, 1 month 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
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 MIDIMessageEvent DOM class."); 9 description("This tests the constructor for the MIDIMessageEvent DOM class.");
10 10
11 // No initializer is passed. 11 // No initializer is passed.
12 shouldBe("new MIDIMessageEvent('eventType').bubbles", "false"); 12 shouldBe("new MIDIMessageEvent('eventType').bubbles", "false");
13 shouldBe("new MIDIMessageEvent('eventType').cancelable", "false"); 13 shouldBe("new MIDIMessageEvent('eventType').cancelable", "false");
14 shouldBe("new MIDIMessageEvent('eventType').receivedTime", "0.0");
15 shouldBe("new MIDIMessageEvent('eventType').data", "null"); 14 shouldBe("new MIDIMessageEvent('eventType').data", "null");
16 15
17 // bubbles is passed. 16 // bubbles is passed.
18 shouldBe("new MIDIMessageEvent('eventType', { bubbles: false }).bubbles", "false "); 17 shouldBe("new MIDIMessageEvent('eventType', { bubbles: false }).bubbles", "false ");
19 shouldBe("new MIDIMessageEvent('eventType', { bubbles: true }).bubbles", "true") ; 18 shouldBe("new MIDIMessageEvent('eventType', { bubbles: true }).bubbles", "true") ;
20 19
21 // cancelable is passed. 20 // cancelable is passed.
22 shouldBe("new MIDIMessageEvent('eventType', { cancelable: false }).cancelable", "false"); 21 shouldBe("new MIDIMessageEvent('eventType', { cancelable: false }).cancelable", "false");
23 shouldBe("new MIDIMessageEvent('eventType', { cancelable: true }).cancelable", " true"); 22 shouldBe("new MIDIMessageEvent('eventType', { cancelable: true }).cancelable", " true");
24 23
25 // receivedTime is passed.
26 shouldBe("new MIDIMessageEvent('eventType', { receivedTime: 3.14 }).receivedTime ", "3.14");
27
28 // data is passed. 24 // data is passed.
29 var data = new Uint8Array(16); 25 var data = new Uint8Array(16);
30 shouldEvaluateTo("new MIDIMessageEvent('eventType', { data: data }).data", data) ; 26 shouldEvaluateTo("new MIDIMessageEvent('eventType', { data: data }).data", data) ;
31 27
32 // All initializers are passed. 28 // All initializers are passed.
33 data = new Uint8Array(3); 29 data = new Uint8Array(3);
34 shouldBe("new MIDIMessageEvent('eventType', { bubbles: true, cancelable: true, r eceivedTime: 1976.0501, data: data }).bubbles", "true"); 30 shouldBe("new MIDIMessageEvent('eventType', { bubbles: true, cancelable: true, d ata: data }).bubbles", "true");
35 shouldBe("new MIDIMessageEvent('eventType', { bubbles: true, cancelable: true, r eceivedTime: 1976.0501, data: data }).cancelable", "true"); 31 shouldBe("new MIDIMessageEvent('eventType', { bubbles: true, cancelable: true, d ata: data }).cancelable", "true");
36 shouldBe("new MIDIMessageEvent('eventType', { bubbles: true, cancelable: true, r eceivedTime: 1976.0501, data: data }).receivedTime", "1976.0501"); 32 shouldEvaluateTo("new MIDIMessageEvent('eventType', { bubbles: true, cancelable: true, data: data }).data", data);
37 shouldEvaluateTo("new MIDIMessageEvent('eventType', { bubbles: true, cancelable: true, receivedTime: 1976.0501, data: data }).data", data);
38 33
39 </script> 34 </script>
40 </body> 35 </body>
41 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698