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

Side by Side Diff: LayoutTests/webmidi/permission.html

Issue 208243014: Add sysexEnabled readonly attribute to MIDIAccess (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 sysex permission request is handled."); 9 description("Test if sysex permission request is handled.");
10 10
(...skipping 22 matching lines...) Expand all
33 else 33 else
34 finishSuccessfully(); 34 finishSuccessfully();
35 }); 35 });
36 } 36 }
37 37
38 var acceptSysEx = function (next) { 38 var acceptSysEx = function (next) {
39 testRunner.setMIDISysExPermission(true); 39 testRunner.setMIDISysExPermission(true);
40 promise = navigator.requestMIDIAccess({sysex: true}); 40 promise = navigator.requestMIDIAccess({sysex: true});
41 shouldBeDefined("promise"); 41 shouldBeDefined("promise");
42 shouldBeDefined("promise.then"); 42 shouldBeDefined("promise.then");
43 promise.then(function(access) { 43 promise.then(function(a) {
44 testPassed("sysex permission request is successfully accepted."); 44 testPassed("sysex permission request is successfully accepted.");
45 access = a;
Takashi Toyoshima 2014/03/24 11:38:10 Make |access| global to be available from shouldBe
46 shouldBeDefined("access");
47 shouldBeDefined("access.sysexEnabled");
48 shouldBe("access.sysexEnabled", "true");
tkent 2014/03/24 11:52:38 shouldBe -> shouldBeTrue
45 if (next) 49 if (next)
46 next(); 50 next();
47 else 51 else
48 finishSuccessfully(); 52 finishSuccessfully();
49 }, function (error) { 53 }, function (error) {
50 testFailed("sysex permission request should be accepted."); 54 testFailed("sysex permission request should be accepted.");
51 finishJSTest(); 55 finishJSTest();
52 }); 56 });
53 } 57 }
54 58
55 rejectSysEx(acceptSysEx); 59 rejectSysEx(acceptSysEx);
56 60
57 </script> 61 </script>
58 </body> 62 </body>
59 </html> 63 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/webmidi/permission-expected.txt » ('j') | LayoutTests/webmidi/requestmidiaccess.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698