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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/cssTranslation.html

Issue 2943303002: [CSS Typed OM] Refactor is2D handling in CSSTransformComponents to match new spec (Closed)
Patch Set: rebase Created 3 years, 6 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: third_party/WebKit/LayoutTests/typedcssom/cssTranslation.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/cssTranslation.html b/third_party/WebKit/LayoutTests/typedcssom/cssTranslation.html
index d78160590d9866501073778b50bbc2ee3e7ee72d..5d8fe067c998c1a8115e0003f1e9eda0e2d0ab38 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/cssTranslation.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/cssTranslation.html
@@ -10,7 +10,7 @@ var negativeLength = new CSSUnitValue(-2.2, "em");
var tenPercent = new CSSUnitValue(10, "percent");
var testParams = [
- // 2D CSSTranslation Transform Components
+ // 2D translations
{
input: new CSSTranslation(zeroLength, zeroLength),
x: zeroLength, y: zeroLength,
@@ -29,7 +29,7 @@ var testParams = [
is2D: true,
cssText: "translate(10%, 0px)"
},
- // 3D CSSTranslation Transform Components
+ // 3D translations
{
input: new CSSTranslation(zeroLength, zeroLength, zeroLength),
x: zeroLength, y: zeroLength, z: zeroLength,
@@ -55,14 +55,14 @@ for (let params of testParams) {
assert_equals(params.input.x, params.x);
assert_equals(params.input.y, params.y);
if (params.is2D) {
- assert_equals(params.input.z, null);
+ assert_equals(params.input.z.value, 0);
} else {
assert_equals(params.input.z, params.z);
}
}, "x, y, and z values are correct for " + params.cssText);
test(() => {
- assert_equals(params.input.is2D(), params.is2D);
+ assert_equals(params.input.is2D, params.is2D);
}, "is2D value is correct for " + params.cssText);
test(() => {
@@ -78,7 +78,7 @@ test(() => {
assert_equals(translation.x.unit, 'percent');
assert_equals(translation.y.value, 20);
assert_equals(translation.y.unit, 'percent');
- assert_equals(translation.z, null);
+ assert_equals(translation.z.value, 0);
let translation3d = new CSSTranslation(
new CSSUnitValue(30, 'percent'),

Powered by Google App Engine
This is Rietveld 408576698