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

Unified Diff: LayoutTests/webmidi/legacy-ports.html

Issue 518633003: [ABANDONED] [WebMIDI] Support the legacy MIDIAccess port API. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@webmidi-input-map
Patch Set: Created 6 years, 3 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/legacy-ports-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/webmidi/legacy-ports.html
diff --git a/LayoutTests/webmidi/legacy-ports.html b/LayoutTests/webmidi/legacy-ports.html
new file mode 100644
index 0000000000000000000000000000000000000000..ea9ef09084a1ecaee938250ccfe32189d289980c
--- /dev/null
+++ b/LayoutTests/webmidi/legacy-ports.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description("Tests the legacy MIDI port API support.");
+
+window.jsTestIsAsync = true;
+
+navigator.requestMIDIAccess().then(function(access) {
+ window.access = access;
+ shouldBeEqualToString('typeof(access.inputs)', 'function');
+ shouldBeEqualToString('typeof(access.outputs)', 'function');
+
+ window.inputs = access.inputs();
+ shouldBe('inputs.length', '1');
+ shouldBeEqualToString("inputs[0].id", "MockInputID");
+ shouldBeEqualToString("inputs[0].manufacturer", "MockInputManufacturer");
+ shouldBeEqualToString("inputs[0].name", "MockInputName");
+ shouldBeEqualToString("inputs[0].version", "MockInputVersion");
+
+ window.outputs = access.outputs();
+ shouldBeEqualToString("outputs[0].id", "MockOutputID");
+ shouldBeEqualToString("outputs[0].manufacturer", "MockOutputManufacturer");
+ shouldBeEqualToString("outputs[0].name", "MockOutputName");
+ shouldBeEqualToString("outputs[0].version", "MockOutputVersion");
+}).catch(function(e) {
+ testFailed('e: ' + e);
+}).then(finishJSTest, finishJSTest);
+
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/webmidi/legacy-ports-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698