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

Unified Diff: LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js

Issue 146773002: [CSS Grid Layout] Rename grid-definition-{columns|rows} to match the new syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed renaming issues with some tests. Created 6 years, 11 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-definitions-parsing-utils.js
diff --git a/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js b/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js
index c921cce589fd3926810bbb8f32def33241312398..ca22800a8238f2fd6582717f2418b9deab6c9b06 100644
--- a/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js
+++ b/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js
@@ -2,8 +2,8 @@ function testGridDefinitionsValues(element, columnValue, rowValue, computedColum
{
window.element = element;
var elementID = element.id || "element";
- shouldBeEqualToString("window.getComputedStyle(" + elementID + ", '').getPropertyValue('grid-definition-columns')", computedColumnValue || columnValue);
- shouldBeEqualToString("window.getComputedStyle(" + elementID + ", '').getPropertyValue('grid-definition-rows')", computedRowValue || rowValue);
+ shouldBeEqualToString("window.getComputedStyle(" + elementID + ", '').getPropertyValue('grid-template-columns')", computedColumnValue || columnValue);
+ shouldBeEqualToString("window.getComputedStyle(" + elementID + ", '').getPropertyValue('grid-template-rows')", computedRowValue || rowValue);
}
function testGridDefinitionsSetJSValues(columnValue, rowValue, computedColumnValue, computedRowValue, jsColumnValue, jsRowValue)
@@ -26,12 +26,12 @@ function checkGridDefinitionsSetJSValues(useGrid, columnValue, rowValue, compute
element.style.height = "600px";
}
element.style.font = "10px Ahem"; // Used to resolve em font consistently.
- element.style.gridDefinitionColumns = columnValue;
- element.style.gridDefinitionRows = rowValue;
- shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('grid-definition-columns')", computedColumnValue || columnValue);
- shouldBeEqualToString("element.style.gridDefinitionColumns", jsColumnValue || columnValue);
- shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('grid-definition-rows')", computedRowValue || rowValue);
- shouldBeEqualToString("element.style.gridDefinitionRows", jsRowValue || rowValue);
+ element.style.gridTemplateColumns = columnValue;
+ element.style.gridTemplateRows = rowValue;
+ shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('grid-template-columns')", computedColumnValue || columnValue);
+ shouldBeEqualToString("element.style.gridTemplateColumns", jsColumnValue || columnValue);
+ shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('grid-template-rows')", computedRowValue || rowValue);
+ shouldBeEqualToString("element.style.gridTemplateRows", jsRowValue || rowValue);
document.body.removeChild(element);
}
@@ -39,9 +39,9 @@ function testGridDefinitionsSetBadJSValues(columnValue, rowValue)
{
window.element = document.createElement("div");
document.body.appendChild(element);
- element.style.gridDefinitionColumns = columnValue;
- element.style.gridDefinitionRows = rowValue;
- // We can't use testSetJSValues as element.style.gridDefinitionRows returns "".
+ element.style.gridTemplateColumns = columnValue;
+ element.style.gridTemplateRows = rowValue;
+ // We can't use testSetJSValues as element.style.gridTemplateRows returns "".
testGridDefinitionsValues(element, "none", "none");
document.body.removeChild(element);
}

Powered by Google App Engine
This is Rietveld 408576698