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

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

Issue 21006006: Add forEach() to CSSVariablesMap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased onto callback change Created 7 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
Index: LayoutTests/fast/css/variables/cssom-read.html
diff --git a/LayoutTests/fast/css/variables/cssom-read.html b/LayoutTests/fast/css/variables/cssom-read.html
index b56cc96229d337e9293a856aa471888596bef49a..13adbef34aae85baaf314341726e833fbc1ae0e1 100644
--- a/LayoutTests/fast/css/variables/cssom-read.html
+++ b/LayoutTests/fast/css/variables/cssom-read.html
@@ -9,6 +9,14 @@ if (window.testRunner) {
var pre = document.querySelector("pre");
+function outputItem (value, name) {
+ pre.innerText += name + ": " + value + "\n";
+}
+
+pre.innerText += "Equal variables declaration objects on multiple accesses: ";
+pre.innerText += ((pre.style.var === pre.style.var) ? "pass": "fail") + "\n";
esprehn 2013/09/12 01:13:42 Same deal here.
+pre.innerText += "\n";
+
pre.innerText += "Inline style CSS text: " + pre.style.cssText + "\n";
pre.innerText += "\n";
@@ -20,6 +28,10 @@ pre.innerText += "a: " + pre.style.var.get("a") + "\n";
pre.innerText += "b: " + pre.style.var.get("b") + "\n";
pre.innerText += "\n";
+pre.innerText += "Enumerate vars:\n";
+pre.style.var.forEach(outputItem);
+pre.innerText += "\n";
+
pre.innerText += "Access non existent var:\n";
pre.innerText += "z: " + pre.style.var.get("z") + "\n";
pre.innerText += "\n";
@@ -37,5 +49,9 @@ pre.innerText += "a: " + pre.style.var.get("a") + "\n";
pre.innerText += "b: " + pre.style.var.get("b") + "\n";
pre.innerText += "c: " + pre.style.var.get("c") + "\n";
pre.innerText += "d: " + pre.style.var.get("d") + "\n";
esprehn 2013/09/12 01:13:42 innerText += like this is really expensive, this t
alancutter (OOO until 2018) 2013/09/13 03:06:14 Done.
+pre.innerText += "\n";
+
+pre.innerText += "Enumerate vars:\n";
+pre.style.var.forEach(outputItem);
</script>

Powered by Google App Engine
This is Rietveld 408576698