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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/left-top-right-bottom.html

Issue 2371673002: [CSS Typed OM] Implement support for CSSValue -> CSSCalcLength (Closed)
Patch Set: sync to head Created 4 years, 2 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/inlinestyle/left-top-right-bottom.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/left-top-right-bottom.html b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/left-top-right-bottom.html
index f0e30f98ecd50fda4f308cbf73170ee2c5e0b74f..bbd86b1ed4d839a0076acf4252007faab687ab47 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/left-top-right-bottom.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/inlinestyle/left-top-right-bottom.html
@@ -129,7 +129,7 @@ test(function() {
assert_equals(left.constructor, CSSCalcLength);
assert_equals(left.percent, 60);
assert_equals(left.px, 20);
-}, "Getting left works with a simple percent");
+}, "Getting left works with a calc length");
test(function() {
testElement.style = "top:calc(70% - 50px);";
@@ -138,24 +138,24 @@ test(function() {
assert_equals(top.constructor, CSSCalcLength);
assert_equals(top.percent, 70);
assert_equals(top.px, -50);
-}, "Getting top works with a simple percent");
+}, "Getting top works with a calc length");
test(function() {
testElement.style = "right:calc(80% + 20em);";
var right = styleMap.get('right');
- assert_equals(right.constructor, CSSSimpleLength);
+ assert_equals(right.constructor, CSSCalcLength);
assert_equals(right.percent, 80);
assert_equals(right.em, 20);
-}, "Getting right works with a simple percent");
+}, "Getting right works with a calc length");
test(function() {
testElement.style = "bottom:calc(80% - 30rem);";
var bottom = styleMap.get('bottom');
- assert_equals(bottom.constructor, CSSSimpleLength);
- assert_equals(bottom.value, 80);
+ assert_equals(bottom.constructor, CSSCalcLength);
+ assert_equals(bottom.percent , 80);
assert_equals(bottom.rem, -30);
-}, "Getting bottom works with a simple percent");
+}, "Getting bottom works with a calc length");
</script>

Powered by Google App Engine
This is Rietveld 408576698