Chromium Code Reviews| 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..115c5aa577ce64c538f827b278387850609453ef 100644 |
| --- a/LayoutTests/fast/css/variables/cssom-read.html |
| +++ b/LayoutTests/fast/css/variables/cssom-read.html |
| @@ -9,6 +9,18 @@ if (window.testRunner) { |
| var pre = document.querySelector("pre"); |
| +function outputForEach (styleVar) { |
| + var varList = []; |
| + styleVar.forEach(function(value, name) { varList.push([name, value]); }); |
|
arv (Not doing code reviews)
2013/08/07 14:16:23
Why not just print inside the forEach? No need for
alancutter (OOO until 2018)
2013/08/08 01:50:57
Thanks for pointing this out, I didn't refactor af
|
| + for (var i = 0; i < varList.length; i++) { |
| + pre.innerText += varList[i][0] + ": " + varList[i][1] + "\n"; |
| + } |
| +} |
| + |
| +pre.innerText += "Equal variables declaration objects on multiple accesses: "; |
| +pre.innerText += ((pre.style.var === pre.style.var) ? "pass": "fail") + "\n"; |
| +pre.innerText += "\n"; |
| + |
| pre.innerText += "Inline style CSS text: " + pre.style.cssText + "\n"; |
| pre.innerText += "\n"; |
| @@ -20,6 +32,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"; |
| +outputForEach(pre.style.var); |
| +pre.innerText += "\n"; |
| + |
| pre.innerText += "Access non existent var:\n"; |
| pre.innerText += "z: " + pre.style.var.get("z") + "\n"; |
| pre.innerText += "\n"; |
| @@ -37,5 +53,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"; |
| +pre.innerText += "\n"; |
| + |
| +pre.innerText += "Enumerate vars:\n"; |
| +outputForEach(pre.style.var); |
| </script> |