<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[171183] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/171183">171183</a></dd>
<dt>Author</dt> <dd>rego@igalia.com</dd>
<dt>Date</dt> <dd>2014-07-17 08:58:13 -0700 (Thu, 17 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CSS Grid Layout] Add element.style coverage for grid-auto-flow
https://bugs.webkit.org/show_bug.cgi?id=134966

Reviewed by Sergio Villar Senin.

As follow-up patch after <a href="http://trac.webkit.org/projects/webkit/changeset/170996">r170996</a> we're adding new test cases for
grid-auto-flow to check the correct behavior of element.style.

* fast/css-grid-layout/grid-auto-flow-get-set-expected.txt: Updated
expectations accordingly.
* fast/css-grid-layout/grid-auto-flow-get-set.html: Updated test to add
checks for element.style.
* fast/css-grid-layout/resources/grid-definitions-parsing-utils.js:
(checkGridAutoFlowSetCSSValue): Add new helper method to check
grid-auto-flow property.
(checkGridAutoFlowSetJSValue): Ditto.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridautoflowgetsetexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridautoflowgetsethtml">trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutresourcesgriddefinitionsparsingutilsjs">trunk/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (171182 => 171183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-07-17 10:55:57 UTC (rev 171182)
+++ trunk/LayoutTests/ChangeLog        2014-07-17 15:58:13 UTC (rev 171183)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2014-07-17  Manuel Rego Casasnovas  &lt;rego@igalia.com&gt;
+
+        [CSS Grid Layout] Add element.style coverage for grid-auto-flow
+        https://bugs.webkit.org/show_bug.cgi?id=134966
+
+        Reviewed by Sergio Villar Senin.
+
+        As follow-up patch after r170996 we're adding new test cases for
+        grid-auto-flow to check the correct behavior of element.style.
+
+        * fast/css-grid-layout/grid-auto-flow-get-set-expected.txt: Updated
+        expectations accordingly.
+        * fast/css-grid-layout/grid-auto-flow-get-set.html: Updated test to add
+        checks for element.style.
+        * fast/css-grid-layout/resources/grid-definitions-parsing-utils.js:
+        (checkGridAutoFlowSetCSSValue): Add new helper method to check
+        grid-auto-flow property.
+        (checkGridAutoFlowSetJSValue): Ditto.
+
</ins><span class="cx"> 2014-07-16  Carlos Alberto Lopez Perez  &lt;clopez@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Unreviewed GTK gardening.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridautoflowgetsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt (171182 => 171183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt        2014-07-17 10:55:57 UTC (rev 171182)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt        2014-07-17 15:58:13 UTC (rev 171183)
</span><span class="lines">@@ -15,6 +15,10 @@
</span><span class="cx"> PASS window.getComputedStyle(gridAutoFlowStackRow, '').getPropertyValue('-webkit-grid-auto-flow') is 'row stack'
</span><span class="cx"> PASS window.getComputedStyle(gridAutoFlowColumnStack, '').getPropertyValue('-webkit-grid-auto-flow') is 'column stack'
</span><span class="cx"> PASS window.getComputedStyle(gridAutoFlowRowStack, '').getPropertyValue('-webkit-grid-auto-flow') is 'row stack'
</span><ins>+PASS window.getComputedStyle(gridAutoFlowInherit, '').getPropertyValue('-webkit-grid-auto-flow') is 'column'
+PASS window.getComputedStyle(gridAutoFlowNoInherit, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
+
+Test getting -webkit-grid-auto-flow bad values set through CSS
</ins><span class="cx"> PASS window.getComputedStyle(gridAutoFlowNone, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><span class="cx"> PASS window.getComputedStyle(gridAutoFlowColumns, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><span class="cx"> PASS window.getComputedStyle(gridAutoFlowRows, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><span class="lines">@@ -24,34 +28,51 @@
</span><span class="cx"> PASS window.getComputedStyle(gridAutoFlowDenseColumnStack, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><span class="cx"> PASS window.getComputedStyle(gridAutoFlowDenseRowStack, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><span class="cx"> PASS window.getComputedStyle(gridAutoFlowStackRowRow, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><del>-PASS window.getComputedStyle(gridAutoFlowInherit, '').getPropertyValue('-webkit-grid-auto-flow') is 'column'
-PASS window.getComputedStyle(gridAutoFlowNoInherit, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</del><span class="cx"> 
</span><span class="cx"> Test the initial value
</span><ins>+PASS element.style.webkitGridAutoFlow is ''
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><span class="cx"> 
</span><span class="cx"> Test getting and setting -webkit-grid-auto-flow through JS
</span><ins>+PASS element.style.webkitGridAutoFlow is 'column'
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'column'
</span><ins>+PASS element.style.webkitGridAutoFlow is 'column dense'
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'column dense'
</span><ins>+PASS element.style.webkitGridAutoFlow is 'row dense'
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row dense'
</span><ins>+PASS element.style.webkitGridAutoFlow is 'column dense'
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'column dense'
</span><ins>+PASS element.style.webkitGridAutoFlow is 'row dense'
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row dense'
</span><ins>+PASS element.style.webkitGridAutoFlow is 'row'
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><ins>+PASS element.style.webkitGridAutoFlow is 'row stack'
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row stack'
</span><ins>+PASS element.style.webkitGridAutoFlow is 'column stack'
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'column stack'
</span><ins>+PASS element.style.webkitGridAutoFlow is 'row stack'
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row stack'
</span><ins>+PASS element.style.webkitGridAutoFlow is 'column stack'
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'column stack'
</span><ins>+PASS element.style.webkitGridAutoFlow is 'row stack'
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row stack'
</span><span class="cx"> 
</span><span class="cx"> Test getting and setting bad values for -webkit-grid-auto-flow through JS
</span><ins>+PASS element.style.webkitGridAutoFlow is ''
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><ins>+PASS element.style.webkitGridAutoFlow is ''
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><ins>+PASS element.style.webkitGridAutoFlow is ''
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><ins>+PASS element.style.webkitGridAutoFlow is ''
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><ins>+PASS element.style.webkitGridAutoFlow is ''
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><ins>+PASS element.style.webkitGridAutoFlow is ''
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><span class="cx"> 
</span><span class="cx"> Test setting -webkit-grid-auto-flow to 'initial' through JS
</span><ins>+PASS element.style.webkitGridAutoFlow is 'initial'
</ins><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow') is 'row'
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridautoflowgetsethtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set.html (171182 => 171183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set.html        2014-07-17 10:55:57 UTC (rev 171182)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set.html        2014-07-17 15:58:13 UTC (rev 171183)
</span><span class="lines">@@ -89,129 +89,68 @@
</span><span class="cx"> &lt;div class=&quot;grid gridAutoFlowDenseColumnStack&quot; id=&quot;gridAutoFlowDenseColumnStack&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div class=&quot;grid gridAutoFlowDenseRowStack&quot; id=&quot;gridAutoFlowDenseRowStack&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div class=&quot;grid gridAutoFlowStackRowRow&quot; id=&quot;gridAutoFlowStackRowRow&quot;&gt;&lt;/div&gt;
</span><ins>+&lt;script src=&quot;resources/grid-definitions-parsing-utils.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><span class="cx">     description('Test that setting and getting -webkit-grid-auto-flow works as expected');
</span><span class="cx"> 
</span><span class="cx">     debug(&quot;Test getting -webkit-grid-auto-flow set through CSS&quot;);
</span><del>-    var gridAutoFlowColumn = document.getElementById(&quot;gridAutoFlowColumn&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowColumn, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'column'&quot;);
</del><ins>+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowColumn&quot;, &quot;column&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowRow&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowColumnDense&quot;, &quot;column dense&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowRowDense&quot;, &quot;row dense&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowDenseColumn&quot;, &quot;column dense&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowDenseRow&quot;, &quot;row dense&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowStack&quot;, &quot;row stack&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowStackColumn&quot;, &quot;column stack&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowStackRow&quot;, &quot;row stack&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowColumnStack&quot;, &quot;column stack&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowRowStack&quot;, &quot;row stack&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowInherit&quot;, &quot;column&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowNoInherit&quot;, &quot;row&quot;);
</ins><span class="cx"> 
</span><del>-    var gridAutoFlowRow = document.getElementById(&quot;gridAutoFlowRow&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowRow, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
</del><ins>+    debug(&quot;&quot;);
+    debug(&quot;Test getting -webkit-grid-auto-flow bad values set through CSS&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowNone&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowColumns&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowRows&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowDense&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowColumnFoo&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowColumnColumn&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowDenseColumnStack&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowDenseRowStack&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetCSSValue(&quot;gridAutoFlowStackRowRow&quot;, &quot;row&quot;);
</ins><span class="cx"> 
</span><del>-    var gridAutoFlowColumnDense = document.getElementById(&quot;gridAutoFlowColumnDense&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowColumnDense, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'column dense'&quot;);
-
-    var gridAutoFlowRowDense = document.getElementById(&quot;gridAutoFlowRowDense&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowRowDense, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row dense'&quot;);
-
-    var gridAutoFlowDenseColumn = document.getElementById(&quot;gridAutoFlowDenseColumn&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowDenseColumn, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'column dense'&quot;);
-
-    var gridAutoFlowDenseRow = document.getElementById(&quot;gridAutoFlowDenseRow&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowDenseRow, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row dense'&quot;);
-
-    var gridAutoFlowStack = document.getElementById(&quot;gridAutoFlowStack&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowStack, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row stack'&quot;);
-
-    var gridAutoFlowStackColumn = document.getElementById(&quot;gridAutoFlowStackColumn&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowStackColumn, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'column stack'&quot;);
-
-    var gridAutoFlowStackRow = document.getElementById(&quot;gridAutoFlowStackRow&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowStackRow, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row stack'&quot;);
-
-    var gridAutoFlowColumnStack = document.getElementById(&quot;gridAutoFlowColumnStack&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowColumnStack, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'column stack'&quot;);
-
-    var gridAutoFlowRowStack = document.getElementById(&quot;gridAutoFlowRowStack&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowRowStack, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row stack'&quot;);
-
-    var gridAutoFlowNone= document.getElementById(&quot;gridAutoFlowNone&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowNone, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-
-    var gridAutoFlowColumns = document.getElementById(&quot;gridAutoFlowColumns&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowColumns, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-
-    var gridAutoFlowRows = document.getElementById(&quot;gridAutoFlowRows&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowRows, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-
-    var gridAutoFlowDense = document.getElementById(&quot;gridAutoFlowDense&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowDense, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-
-    var gridAutoFlowColumnFoo = document.getElementById(&quot;gridAutoFlowColumnFoo&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowColumnFoo, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-
-    var gridAutoFlowColumnColumn = document.getElementById(&quot;gridAutoFlowColumnColumn&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowColumnColumn, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-
-    var gridAutoFlowDenseColumnStack = document.getElementById(&quot;gridAutoFlowDenseColumnStack&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowDenseColumnStack, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-
-    var gridAutoFlowDenseRowStack = document.getElementById(&quot;gridAutoFlowDenseRowStack&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowDenseRowStack, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-
-    var gridAutoFlowStackRowRow = document.getElementById(&quot;gridAutoFlowStackRowRow&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowStackRowRow, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-
-    var gridAutoFlowInherit = document.getElementById(&quot;gridAutoFlowInherit&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowInherit, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'column'&quot;);
-
-    var gridAutoFlowNoInherit = document.getElementById(&quot;gridAutoFlowNoInherit&quot;);
-    shouldBe(&quot;window.getComputedStyle(gridAutoFlowNoInherit, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-
</del><span class="cx">     debug(&quot;&quot;);
</span><span class="cx">     debug(&quot;Test the initial value&quot;);
</span><del>-    element = document.createElement(&quot;div&quot;);
-    document.body.appendChild(element);
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
</del><ins>+    checkGridAutoFlowSetJSValue(&quot;&quot;, &quot;&quot;, &quot;row&quot;);
</ins><span class="cx"> 
</span><span class="cx">     debug(&quot;&quot;);
</span><span class="cx">     debug(&quot;Test getting and setting -webkit-grid-auto-flow through JS&quot;);
</span><del>-    element.style.webkitGridAutoFlow = &quot;column&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'column'&quot;);
-    element.style.webkitGridAutoFlow = &quot;column dense&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'column dense'&quot;);
-    element.style.webkitGridAutoFlow = &quot;row dense&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row dense'&quot;);
-    element.style.webkitGridAutoFlow = &quot;dense column&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'column dense'&quot;);
-    element.style.webkitGridAutoFlow = &quot;dense row&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row dense'&quot;);
-    element.style.webkitGridAutoFlow = &quot;row&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-    element.style.webkitGridAutoFlow = &quot;stack&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row stack'&quot;);
-    element.style.webkitGridAutoFlow = &quot;stack column&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'column stack'&quot;);
-    element.style.webkitGridAutoFlow = &quot;stack row&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row stack'&quot;);
-    element.style.webkitGridAutoFlow = &quot;column stack&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'column stack'&quot;);
-    element.style.webkitGridAutoFlow = &quot;row stack&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row stack'&quot;);
</del><ins>+    checkGridAutoFlowSetJSValue(&quot;column&quot;, &quot;column&quot;, &quot;column&quot;);
+    checkGridAutoFlowSetJSValue(&quot;column dense&quot;, &quot;column dense&quot;, &quot;column dense&quot;);
+    checkGridAutoFlowSetJSValue(&quot;row dense&quot;, &quot;row dense&quot;, &quot;row dense&quot;);
+    checkGridAutoFlowSetJSValue(&quot;dense column&quot;, &quot;column dense&quot;, &quot;column dense&quot;);
+    checkGridAutoFlowSetJSValue(&quot;dense row&quot;, &quot;row dense&quot;, &quot;row dense&quot;);
+    checkGridAutoFlowSetJSValue(&quot;row&quot;, &quot;row&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetJSValue(&quot;stack&quot;, &quot;row stack&quot;, &quot;row stack&quot;);
+    checkGridAutoFlowSetJSValue(&quot;stack column&quot;, &quot;column stack&quot;, &quot;column stack&quot;);
+    checkGridAutoFlowSetJSValue(&quot;stack row&quot;, &quot;row stack&quot;, &quot;row stack&quot;);
+    checkGridAutoFlowSetJSValue(&quot;column stack&quot;, &quot;column stack&quot;, &quot;column stack&quot;);
+    checkGridAutoFlowSetJSValue(&quot;row stack&quot;, &quot;row stack&quot;, &quot;row stack&quot;);
</ins><span class="cx"> 
</span><span class="cx">     debug(&quot;&quot;);
</span><span class="cx">     debug(&quot;Test getting and setting bad values for -webkit-grid-auto-flow through JS&quot;);
</span><del>-    element = document.createElement(&quot;div&quot;);
-    document.body.appendChild(element);
-    element.style.webkitGridAutoFlow = &quot;noone&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-    element.style.webkitGridAutoFlow = &quot;dense&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-    element.style.webkitGridAutoFlow = &quot;column column&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-    element.style.webkitGridAutoFlow = &quot;dense column stack&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-    element.style.webkitGridAutoFlow = &quot;dense row stack&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
-    element.style.webkitGridAutoFlow = &quot;stack row row&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
</del><ins>+    checkGridAutoFlowSetJSValue(&quot;noone&quot;, &quot;&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetJSValue(&quot;dense&quot;, &quot;&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetJSValue(&quot;column column&quot;, &quot;&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetJSValue(&quot;dense column stack&quot;, &quot;&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetJSValue(&quot;dense row stack&quot;, &quot;&quot;, &quot;row&quot;);
+    checkGridAutoFlowSetJSValue(&quot;stack row row&quot;, &quot;&quot;, &quot;row&quot;);
</ins><span class="cx"> 
</span><span class="cx">     debug(&quot;&quot;);
</span><span class="cx">     debug(&quot;Test setting -webkit-grid-auto-flow to 'initial' through JS&quot;);
</span><span class="cx">     // Reusing the value so that we can check that it is set back to its initial value.
</span><del>-    element.style.webkitGridAutoFlow = &quot;initial&quot;;
-    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'row'&quot;);
</del><ins>+    checkGridAutoFlowSetJSValue(&quot;initial&quot;, &quot;initial&quot;, &quot;row&quot;);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutresourcesgriddefinitionsparsingutilsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js (171182 => 171183)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js        2014-07-17 10:55:57 UTC (rev 171182)
+++ trunk/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js        2014-07-17 15:58:13 UTC (rev 171183)
</span><span class="lines">@@ -45,3 +45,17 @@
</span><span class="cx">     testGridTemplatesValues(element, &quot;none&quot;, &quot;none&quot;);
</span><span class="cx">     document.body.removeChild(element);
</span><span class="cx"> }
</span><ins>+
+function checkGridAutoFlowSetCSSValue(elementId, expectedValue) {
+    shouldBe(&quot;window.getComputedStyle(&quot; + elementId + &quot;, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'&quot; + expectedValue + &quot;'&quot;);
+}
+
+function checkGridAutoFlowSetJSValue(newValue, expectedStyleValue, expectedComputedStyleValue) {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    if (newValue)
+        element.style.webkitGridAutoFlow = newValue;
+    shouldBe(&quot;element.style.webkitGridAutoFlow&quot;, &quot;'&quot; + expectedStyleValue + &quot;'&quot;);
+    shouldBe(&quot;window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-auto-flow')&quot;, &quot;'&quot; + expectedComputedStyleValue + &quot;'&quot;);
+    document.body.removeChild(element);
+}
</ins></span></pre>
</div>
</div>

</body>
</html>