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

Unified Diff: LayoutTests/fast/css-grid-layout/resources/grid-item-column-row-parsing-utils.js

Issue 22353013: [CSS Grid Layout] Unknown grid area should compute to 'auto' (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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-grid-layout/resources/grid-item-column-row-parsing-utils.js
diff --git a/LayoutTests/fast/css-grid-layout/resources/grid-item-column-row-parsing-utils.js b/LayoutTests/fast/css-grid-layout/resources/grid-item-column-row-parsing-utils.js
index b27a705d24a9f91d336226a8287ce89a250bed94..eaeed9c23e861acdd1f7360bcc073558dc7b9a33 100644
--- a/LayoutTests/fast/css-grid-layout/resources/grid-item-column-row-parsing-utils.js
+++ b/LayoutTests/fast/css-grid-layout/resources/grid-item-column-row-parsing-utils.js
@@ -31,19 +31,21 @@ window.testColumnRowCSSParsing = function(id, columnValue, rowValue)
window.testColumnRowJSParsing = function(columnValue, rowValue, expectedColumnValue, expectedRowValue)
{
var gridItem = document.createElement("div");
- document.body.appendChild(gridItem);
+ var gridElement = document.getElementsByClassName("grid")[0];
+ gridElement.appendChild(gridItem);
gridItem.style.gridColumn = columnValue;
gridItem.style.gridRow = rowValue;
checkColumnRowValues(gridItem, expectedColumnValue ? expectedColumnValue : columnValue, expectedRowValue ? expectedRowValue : rowValue);
- document.body.removeChild(gridItem);
+ gridElement.removeChild(gridItem);
}
window.testColumnStartRowStartJSParsing = function(columnStartValue, rowStartValue, expectedColumnStartValue, expectedRowStartValue)
{
var gridItem = document.createElement("div");
- document.body.appendChild(gridItem);
+ var gridElement = document.getElementsByClassName("grid")[0];
+ gridElement.appendChild(gridItem);
gridItem.style.gridColumnStart = columnStartValue;
gridItem.style.gridRowStart = rowStartValue;
@@ -54,13 +56,14 @@ window.testColumnStartRowStartJSParsing = function(columnStartValue, rowStartVal
checkColumnRowValues(gridItem, expectedColumnStartValue + " / auto", expectedRowStartValue + " / auto");
- document.body.removeChild(gridItem);
+ gridElement.removeChild(gridItem);
}
window.testColumnEndRowEndJSParsing = function(columnEndValue, rowEndValue, expectedColumnEndValue, expectedRowEndValue)
{
var gridItem = document.createElement("div");
- document.body.appendChild(gridItem);
+ var gridElement = document.getElementsByClassName("grid")[0];
+ gridElement.appendChild(gridItem);
gridItem.style.gridColumnEnd = columnEndValue;
gridItem.style.gridRowEnd = rowEndValue;
@@ -71,7 +74,7 @@ window.testColumnEndRowEndJSParsing = function(columnEndValue, rowEndValue, expe
checkColumnRowValues(gridItem, "auto / " + expectedColumnEndValue, "auto / " + expectedRowEndValue);
- document.body.removeChild(gridItem);
+ gridElement.removeChild(gridItem);
}
window.testColumnRowInvalidJSParsing = function(columnValue, rowValue)
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set.html ('k') | Source/core/css/resolver/StyleAdjuster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698