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..8075cb499f811102891f271ce94694e03e27fec0 100644 |
--- a/LayoutTests/fast/css/variables/cssom-computed-style.html |
+++ b/LayoutTests/fast/css/variables/cssom-computed-style.html |
@@ -37,6 +37,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"; |
arv (Not doing code reviews)
2013/07/31 16:45:24
don't use innerText... I know you are just followi
alancutter (OOO until 2018)
2013/08/05 09:33:49
Thanks for the advice. I'll avoid using it in futu
|
+var varList = []; |
+preStyle.var.forEach(function(value, name) { varList.push([name, value]); }); |
+varList.sort(); |
+for (var i in varList) { |
arv (Not doing code reviews)
2013/07/31 16:45:24
do not use for-in loops to loop over arrays. Use f
alancutter (OOO until 2018)
2013/08/05 09:33:49
Done.
|
+ 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"); |