Chromium Code Reviews| Index: LayoutTests/fast/css/getComputedStyle/computed-style-grid-layout.html |
| diff --git a/LayoutTests/fast/css/getComputedStyle/computed-style-grid-layout.html b/LayoutTests/fast/css/getComputedStyle/computed-style-grid-layout.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..03fecc8d7a3f41e961719b13175b82b4234e2774 |
| --- /dev/null |
| +++ b/LayoutTests/fast/css/getComputedStyle/computed-style-grid-layout.html |
| @@ -0,0 +1,36 @@ |
| +<script> |
|
apavlov
2014/03/26 14:40:59
I've seen a few cases where reviewers insisted on
jfernandez
2014/03/28 00:28:38
Done.
|
| +var propertiesToTest = { |
| + "grid-auto-columns": true, |
| + "grid-auto-flow": true, |
| + "grid-auto-rows": true, |
| + "grid-area": true, |
| + "grid-column": true, |
| + "grid-column-end": true, |
| + "grid-column-start": true, |
| + "grid-template-columns": true, |
| + "grid-template-rows": true, |
| + "grid-row": true, |
| + "grid-row-end": true, |
| + "grid-row-start": true, |
| + "grid-template-areas": true, |
| +}; |
| + |
| +function test() |
| +{ |
| + if (window.testRunner) |
| + testRunner.dumpAsText(); |
| + var style = document.defaultView.getComputedStyle(document.body, ""); |
| + var text = ""; |
| + for (var i = 0; i != style.length; ++i) { |
|
apavlov
2014/03/26 14:40:59
You could make propertiesToTest an array and itera
jfernandez
2014/03/28 00:28:38
This could be an option, but one of the purposes o
|
| + var name = style.item(i); |
| + if (!propertiesToTest[name]) |
| + continue; |
| + text += name + ": " + style.getPropertyValue(name) + ";\n"; |
| + } |
| + document.getElementById("exposed").textContent = text; |
| +} |
| +</script> |
| +<body onload="test()"> |
| +<p>CSS Grid Layout Attributes that are exposed in the CSS computed style object:</p> |
| +<p id="exposed" style="white-space: pre"></p> |
| +</body> |