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

Unified Diff: LayoutTests/webmidi/requestmidiaccess.html

Issue 807263007: IDL: Add forEach() method to iterable<>/maplike<>/setlike<> interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: adjust test expectations Created 5 years, 11 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
Index: LayoutTests/webmidi/requestmidiaccess.html
diff --git a/LayoutTests/webmidi/requestmidiaccess.html b/LayoutTests/webmidi/requestmidiaccess.html
index 065ec388f8b93919dbb8b68e3f5aafee6df91456..6ec8bd07b6711eb1387fc35dc1b0af5ae6fcf079 100644
--- a/LayoutTests/webmidi/requestmidiaccess.html
+++ b/LayoutTests/webmidi/requestmidiaccess.html
@@ -42,6 +42,15 @@ function checkInputMap(inputs) {
shouldBeFalse("inputs.has('MockOutputID')");
shouldBe("inputs.get('MockInputID')", "input");
shouldBeUndefined("inputs.get('MockOutputID')");
+ debug("inputs.forEach(...)");
+ inputs.forEach(function (input, key, map) {
+ window.forEachInput = input;
+ shouldBe("forEachInput", "input");
+ window.forEachInputKey = key;
+ shouldBe("forEachInputKey", "inputKey");
+ window.forEachMap = map;
+ shouldBe("forEachMap", "inputs");
+ });
}
function checkOutputMap(outputs) {
@@ -75,6 +84,15 @@ function checkOutputMap(outputs) {
shouldBeFalse("outputs.has('MockInputID')");
shouldBe("outputs.get('MockOutputID')", "output");
shouldBeUndefined("outputs.get('MockInputID')");
+ debug("outputs.forEach(...)");
+ outputs.forEach(function (output, key, map) {
+ window.forEachOutput = output;
+ shouldBe("forEachOutput", "output");
+ window.forEachOutputKey = key;
+ shouldBe("forEachOutputKey", "outputKey");
+ window.forEachMap = map;
+ shouldBe("forEachMap", "outputs");
+ });
}
function successCallback1(a) {

Powered by Google App Engine
This is Rietveld 408576698