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

Unified Diff: LayoutTests/webmidi/send_messages.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, 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 | « LayoutTests/webmidi/send-messages-expected.txt ('k') | LayoutTests/webmidi/send_messages-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/webmidi/send_messages.html
diff --git a/LayoutTests/webmidi/send_messages.html b/LayoutTests/webmidi/send_messages.html
deleted file mode 100644
index 4881b783157333fe24762417d85de74934c408fe..0000000000000000000000000000000000000000
--- a/LayoutTests/webmidi/send_messages.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../resources/js-test.js"></script>
-</head>
-<body>
-<script>
-
-description("Test if various kinds of MIDI messages can be validated.");
-
-shouldBeDefined("testRunner.setMIDISysexPermission");
-shouldBeDefined("navigator.requestMIDIAccess");
-
-window.jsTestIsAsync = true;
-
-testRunner.setMIDISysexPermission(true);
-
-navigator.requestMIDIAccess({sysex: true}).then(function (a) {
- output = a.outputs.values().next().value;
-
- // Note on(off).
- output.send([0xff, 0x90, 0x00, 0x00, 0x90, 0x07, 0x00]);
-
- // Running status is not allowed in Web MIDI API.
- shouldThrow('output.send([0x00, 0x01])');
-
- // Unexpected End of Sysex.
- shouldThrow('output.send([0xf7])');
-
- // Unexpected reserved status bytes.
- shouldThrow('output.send([0xf4])');
- shouldThrow('output.send([0xf5])');
- shouldThrow('output.send([0xf9])');
- shouldThrow('output.send([0xfd])');
-
- // Incomplete channel messages.
- shouldThrow('output.send([0x80])');
- shouldThrow('output.send([0x80, 0x00])');
- shouldThrow('output.send([0x90])');
- shouldThrow('output.send([0x90, 0x00])');
- shouldThrow('output.send([0xa0])');
- shouldThrow('output.send([0xa0, 0x00])');
- shouldThrow('output.send([0xb0])');
- shouldThrow('output.send([0xb0, 0x00])');
- shouldThrow('output.send([0xc0])');
- shouldThrow('output.send([0xd0])');
- shouldThrow('output.send([0xe0])');
- shouldThrow('output.send([0xe0, 0x00])');
-
- // Incomplete system messages.
- shouldThrow('output.send([0xf1])');
- shouldThrow('output.send([0xf2])');
- shouldThrow('output.send([0xf2, 0x00])');
- shouldThrow('output.send([0xf3])');
-
- // Invalid data bytes.
- shouldThrow('output.send([0x80, 0x80, 0x00])');
- shouldThrow('output.send([0x80, 0x00, 0x80])');
-
- // Complete messages.
- output.send([0x80, 0x00, 0x00]);
- output.send([0x90, 0x00, 0x00]);
- output.send([0xa0, 0x00, 0x00]);
- output.send([0xb0, 0x00, 0x00]);
- output.send([0xc0, 0x00]);
- output.send([0xd0, 0x00]);
- output.send([0xe0, 0x00, 0x00]);
-
- // Real-Time messages.
- output.send([0xf8]);
- output.send([0xfa]);
- output.send([0xfb]);
- output.send([0xfc]);
- output.send([0xfe]);
- output.send([0xff]);
-
- // Valid messages with Real-Time messages.
- output.send([0x90, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x80, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff]);
-
- // Sysex messages.
- output.send([0xf0, 0x00, 0x01, 0x02, 0x03, 0xf7]);
- output.send([0xf0, 0xf8, 0xf7, 0xff]);
- shouldThrow('output.send([0xf0, 0x80, 0xf7])');
- shouldThrow('output.send([0xf0, 0xf0, 0xf7])');
- shouldThrow('output.send([0xf0, 0xff, 0xf7, 0xf7])');
-
- // Reserved status bytes.
- shouldThrow('output.send([0xf4, 0x80, 0x00, 0x00])');
- shouldThrow('output.send([0x80, 0xf4, 0x00, 0x00])');
- shouldThrow('output.send([0x80, 0x00, 0xf4, 0x00])');
- shouldThrow('output.send([0x80, 0x00, 0x00, 0xf4])');
- shouldThrow('output.send([0xf0, 0xff, 0xf4, 0xf7])');
-
- // Invalid timestamps.
- shouldThrow('output.send([], NaN)');
- shouldThrow('output.send([], Infinity)');
- shouldThrow('output.send(new Uint8Array(), NaN)');
- shouldThrow('output.send(new Uint8Array(), Infinity)');
-
- finishJSTest();
-}, function () {
- testFailed("requestMIDIAccess() return an error.");
-});
-
-</script>
-</body>
-</html>
« no previous file with comments | « LayoutTests/webmidi/send-messages-expected.txt ('k') | LayoutTests/webmidi/send_messages-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698