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

Unified Diff: LayoutTests/webmidi/requestmidiaccess.html

Issue 555683003: MIDI{Input, Output}Map[Symbol.iterator]() should return entries. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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/requestmidiaccess-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/webmidi/requestmidiaccess.html
diff --git a/LayoutTests/webmidi/requestmidiaccess.html b/LayoutTests/webmidi/requestmidiaccess.html
index 944377bac9d5412ca6399fc82c83a1ff638fee70..065ec388f8b93919dbb8b68e3f5aafee6df91456 100644
--- a/LayoutTests/webmidi/requestmidiaccess.html
+++ b/LayoutTests/webmidi/requestmidiaccess.html
@@ -13,26 +13,30 @@ var output;
function checkInputMap(inputs) {
window.inputs = inputs;
- shouldBe("access.inputs.size", "1");
- for (var input of inputs) {
+ debug("for (var input of inputs.values())");
Takashi Toyoshima 2014/09/09 05:06:28 Are these debug() lines are intended changes?
yhirano 2014/09/09 05:14:46 I added "for (... of inputs.entries())" to disting
+ for (var input of inputs.values()) {
window.input = input;
shouldBeEqualToString("input.id", "MockInputID");
shouldBeEqualToString("input.manufacturer", "MockInputManufacturer");
shouldBeEqualToString("input.name", "MockInputName");
shouldBeEqualToString("input.version", "MockInputVersion");
}
+ debug("for (var input of inputs.keys())");
for (var key of inputs.keys()) {
window.inputKey = key;
shouldBeEqualToString("inputKey", "MockInputID");
}
+ debug("for (var input of inputs.entries())");
for (var entry of inputs.entries()) {
window.entry = entry;
shouldBe("entry[0]", "inputKey");
shouldBe("entry[1]", "input");
}
- for (var input of inputs.values()) {
- window.inputValue = input;
- shouldBe("inputValue", "input");
+ debug("for (var input of inputs)");
+ for (var entry of inputs) {
+ window.entry = entry;
+ shouldBe("entry[0]", "inputKey");
+ shouldBe("entry[1]", "input");
}
shouldBeTrue("inputs.has('MockInputID')");
shouldBeFalse("inputs.has('MockOutputID')");
@@ -42,6 +46,7 @@ function checkInputMap(inputs) {
function checkOutputMap(outputs) {
window.outputs = outputs;
+ debug("for (var output of outputs.values())");
for (var output of outputs.values()) {
window.output = output;
shouldBeEqualToString("output.id", "MockOutputID");
@@ -49,18 +54,22 @@ function checkOutputMap(outputs) {
shouldBeEqualToString("output.name", "MockOutputName");
shouldBeEqualToString("output.version", "MockOutputVersion");
}
+ debug("for (var output of outputs.keys())");
for (var key of outputs.keys()) {
window.outputKey = key;
shouldBeEqualToString("outputKey", "MockOutputID");
}
+ debug("for (var output of outputs.entries())");
for (var entry of outputs.entries()) {
window.entry = entry;
shouldBe("entry[0]", "outputKey");
shouldBe("entry[1]", "output");
}
- for (var output of outputs.values()) {
- window.outputValue = output;
- shouldBe("outputValue", "output");
+ debug("for (var output of outputs)");
+ for (var entry of outputs) {
+ window.entry = entry;
+ shouldBe("entry[0]", "outputKey");
+ shouldBe("entry[1]", "output");
}
shouldBeTrue("outputs.has('MockOutputID')");
shouldBeFalse("outputs.has('MockInputID')");
@@ -76,11 +85,12 @@ function successCallback1(a) {
// Validate the values of the attributes on the access.
shouldBeDefined("access.sysexEnabled");
shouldBeFalse("access.sysexEnabled");
-
+ shouldBe("access.inputs.size", "1");
+ shouldBe("access.outputs.size", "1");
checkInputMap(access.inputs);
checkOutputMap(access.outputs);
- window.output = access.outputs[Symbol.iterator]().next().value;
+ window.output = access.outputs.values().next().value;
// Test sending of MIDI data with a Uint8Array.
var typedArrayData = new Uint8Array([0x90, 0x45, 0x7f]);
output.send(typedArrayData);
« no previous file with comments | « no previous file | LayoutTests/webmidi/requestmidiaccess-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698