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

Side by Side Diff: LayoutTests/webmidi/implicit-open.html

Issue 1051903002: Web MIDI: implement implicit open() on send() and setOnmidimessage() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: kouhei review 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
« no previous file with comments | « no previous file | LayoutTests/webmidi/implicit-open-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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 <script src="state-check-utils.js"></script>
6 </head>
7 <body>
8 <script>
9 description("Tests MIDIPort implicit open.");
10
11 function successAccessCallback(a) {
12 window.access = a;
13 testPassed("requestMIDIAccess() succeeded with access " + access + ".");
14
15 checkStateTransition.bind(undefined, {
16 port: access.inputs.values().next().value,
17 method: "setonmidimessage",
18 initialconnection: "closed",
19 finalconnection: "open",
20 })().then(checkStateTransition.bind(undefined, {
21 port: access.outputs.values().next().value,
22 method: "send",
23 initialconnection: "closed",
24 finalconnection: "open",
25 })).then(finishJSTest, finishJSTest);
26 }
27
28 function errorAccessCallback(error) {
29 testFailed("requestMIDIAccess() error callback should not be called when req uesting basic access.");
30 finishJSTest();
31 }
32
33 window.jsTestIsAsync = true;
34
35 // Test MIDIPort state transition by send() and onmidimessage handler.
36 navigator.requestMIDIAccess().then(successAccessCallback, errorAccessCallback);
37
38 </script>
39 </body>
40 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/webmidi/implicit-open-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698