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

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

Issue 1100843003: WebMidi: use testRunner.setPermission in addition of .setMIDISysexPermission. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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
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("Test if various kinds of MIDI messages can be validated."); 9 description("Test if various kinds of MIDI messages can be validated.");
10 10
11 shouldBeDefined("testRunner.setPermission");
11 shouldBeDefined("testRunner.setMIDISysexPermission"); 12 shouldBeDefined("testRunner.setMIDISysexPermission");
12 shouldBeDefined("navigator.requestMIDIAccess"); 13 shouldBeDefined("navigator.requestMIDIAccess");
13 14
14 window.jsTestIsAsync = true; 15 window.jsTestIsAsync = true;
15 16
17 testRunner.setPermission('midi-sysex', 'granted', location.origin, location.orig in);
16 testRunner.setMIDISysexPermission(true); 18 testRunner.setMIDISysexPermission(true);
17 19
18 navigator.requestMIDIAccess({sysex: true}).then(function (a) { 20 navigator.requestMIDIAccess({sysex: true}).then(function (a) {
19 output = a.outputs.values().next().value; 21 output = a.outputs.values().next().value;
20 22
21 // Note on(off). 23 // Note on(off).
22 output.send([0xff, 0x90, 0x00, 0x00, 0x90, 0x07, 0x00]); 24 output.send([0xff, 0x90, 0x00, 0x00, 0x90, 0x07, 0x00]);
23 25
24 // Running status is not allowed in Web MIDI API. 26 // Running status is not allowed in Web MIDI API.
25 shouldThrow('output.send([0x00, 0x01])'); 27 shouldThrow('output.send([0x00, 0x01])');
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 shouldThrow('output.send(new Uint8Array(), Infinity)'); 100 shouldThrow('output.send(new Uint8Array(), Infinity)');
99 101
100 finishJSTest(); 102 finishJSTest();
101 }, function () { 103 }, function () {
102 testFailed("requestMIDIAccess() return an error."); 104 testFailed("requestMIDIAccess() return an error.");
103 }); 105 });
104 106
105 </script> 107 </script>
106 </body> 108 </body>
107 </html> 109 </html>
OLDNEW
« no previous file with comments | « LayoutTests/webmidi/permission-expected.txt ('k') | LayoutTests/webmidi/send-messages-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698