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

Unified Diff: LayoutTests/fast/css/variables/cssom-computed-style.html

Issue 21006006: Add forEach() to CSSVariablesMap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Python code generator changes Created 7 years, 4 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/fast/css/variables/cssom-computed-style.html
diff --git a/LayoutTests/fast/css/variables/cssom-computed-style.html b/LayoutTests/fast/css/variables/cssom-computed-style.html
index b293bd0aa433e4fb420bf87e39c839e7bd70b3d3..6889b6fc2b7719bac4dc21ee0a0068aebfaf175f 100644
--- a/LayoutTests/fast/css/variables/cssom-computed-style.html
+++ b/LayoutTests/fast/css/variables/cssom-computed-style.html
@@ -21,6 +21,9 @@ var preStyle = getComputedStyle(pre);
var bodyStyle = getComputedStyle(document.querySelector("body"));
pre.innerText += "Computed variables declaration: " + preStyle.var + "\n";
+pre.innerText += "Equal variables declaration objects on multiple accesses: ";
+pre.innerText += ((preStyle.var === preStyle.var) ? "pass": "fail") + "\n";
+
pre.innerText += "Create variable: ";
try {
preStyle.var.set("create", "test");
@@ -37,6 +40,19 @@ pre.innerText += "Read inherited variable: " + preStyle.var.get("inherited") + "
pre.innerText += "Read inline variable: " + preStyle.var.get("inline") + "\n";
pre.innerText += "Read non-existent variable: " + (bodyStyle.var.get("test") ? "fail" : "pass") + "\n";
+pre.innerText += "Enumerate variables:\n";
+var varList = [];
+preStyle.var.forEach(function(value, name) { varList.push([name, value]); });
+varList.sort();
+for (var i = 0; i < varList.length; i++) {
+ pre.innerText += " " + varList[i][0] + ": " + varList[i][1] + "\n";
+}
+
+pre.innerText += "Enumerate empty variables: ";
+var pass = true;
+bodyStyle.var.forEach(function(value, name) { pass = false; });
+pre.innerText += (pass ? "pass" : "fail") + "\n";
+
pre.innerText += "Update variable: ";
try {
preStyle.var.set("inline", "test");
« no previous file with comments | « no previous file | LayoutTests/fast/css/variables/cssom-computed-style-expected.txt » ('j') | Source/bindings/derived_sources.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698