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

Unified Diff: LayoutTests/webmidi/permission.html

Issue 208243014: Add sysexEnabled readonly attribute to MIDIAccess (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rename everything in blink 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/webmidi/permission-expected.txt » ('j') | LayoutTests/webmidi/send_messages.html » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/webmidi/permission.html
diff --git a/LayoutTests/webmidi/permission.html b/LayoutTests/webmidi/permission.html
index d2b1625e282c64d2600fcde756e6b6b0c3b7b84f..2e404382c5f0b40ca212f15639e5338a3110f815 100644
--- a/LayoutTests/webmidi/permission.html
+++ b/LayoutTests/webmidi/permission.html
@@ -8,7 +8,11 @@
description("Test if sysex permission request is handled.");
-shouldBeDefined("testRunner.setMIDISysExPermission");
+// FIXME: remove following workaround once testRunner in Chromium has a new interface.
+if (!testRunner.setMIDISysexPermission)
+ testRunner.setMIDISysexPermission = testRunner.setMIDISysExPermission;
tkent 2014/03/24 13:57:36 nit: We use four spaces indentation.
Takashi Toyoshima 2014/03/24 14:36:00 Done.
+
+shouldBeDefined("testRunner.setMIDISysexPermission");
shouldBeDefined("navigator.requestMIDIAccess");
window.jsTestIsAsync = true;
@@ -19,7 +23,7 @@ var finishSuccessfully = function () {
}
var rejectSysEx = function (next) {
- testRunner.setMIDISysExPermission(false);
+ testRunner.setMIDISysexPermission(false);
promise = navigator.requestMIDIAccess({sysex: true});
shouldBeDefined("promise");
shouldBeDefined("promise.then");
@@ -36,12 +40,16 @@ var rejectSysEx = function (next) {
}
var acceptSysEx = function (next) {
- testRunner.setMIDISysExPermission(true);
+ testRunner.setMIDISysexPermission(true);
promise = navigator.requestMIDIAccess({sysex: true});
shouldBeDefined("promise");
shouldBeDefined("promise.then");
- promise.then(function(access) {
+ promise.then(function(a) {
testPassed("sysex permission request is successfully accepted.");
+ access = a;
+ shouldBeDefined("access");
+ shouldBeDefined("access.sysexEnabled");
+ shouldBeTrue("access.sysexEnabled");
if (next)
next();
else
« no previous file with comments | « no previous file | LayoutTests/webmidi/permission-expected.txt » ('j') | LayoutTests/webmidi/send_messages.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698