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

Side by Side Diff: third_party/WebKit/LayoutTests/webmidi/send-system-messages.html

Issue 1963063002: Web MIDI: Tune Request [0xf6] wasn't handled correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 <script src="../http/tests/resources/permissions-helper.js"></script>
6 </head>
7 <body>
8 <script>
9
10 description("Test if various kinds of system messages can be validated.");
11
12 window.jsTestIsAsync = true;
13
14 // See https://www.midi.org/specifications/item/table-1-summary-of-midi-message
15 let systemMessages = (function(messages) {
16 // Prepare various combinations of messages from input message array.
17 let combinations = [];
18 for (let i = 0; i < messages.length; ++i) {
19 combinations.push(messages[i]);
20 for (let j = 0; j < messages.length; ++j) {
21 combinations.push(messages[i].concat(messages[j]));
22 for (let k = 0; k < messages.length; ++k) {
23 combinations.push(messages[i].concat(messages[j], messages[k]));
24 }
25 }
26 }
27 return combinations;
28 })([[0xf1, 0x00],
29 [0xf2, 0x00, 0x00],
30 [0xf3, 0x00],
31 [0xf6]]);
32
33 PermissionsHelper.setPermission('midi', 'granted').then(() => {
34 return navigator.requestMIDIAccess();
35 }).then(a => {
36 output = a.outputs.values().next().value;
37
38 for (message of systemMessages) {
39 shouldNotThrow('output.send(message)');
yhirano 2016/05/10 16:08:24 optional: You don't need shouldNotThrow because if
Takashi Toyoshima 2016/05/11 05:59:16 Done.
40 }
41
42 finishJSTest();
43 }).catch(e => {
44 testFailed("requestMIDIAccess() return an error.");
45 finishJSTest();
46 });
47
48 </script>
49 </body>
50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698