aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-08-30 13:59:40 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-09-01 14:00:00 +0530
commitbf00733e02320bae6dad400e773df7e5ba007aec (patch)
tree1dda3cd4eea7f2651ec4824f04adb0900a9d9ccb
parent7c9aff33c59e5a8685c96f111dbb177e930004fd (diff)
downloadservo-bf00733e02320bae6dad400e773df7e5ba007aec.tar.gz
servo-bf00733e02320bae6dad400e773df7e5ba007aec.zip
Tests for 3+ value positions in basic shapes
-rw-r--r--tests/unit/style/parsing/basic_shape.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/style/parsing/basic_shape.rs b/tests/unit/style/parsing/basic_shape.rs
index 09caba23942..da829e7c29d 100644
--- a/tests/unit/style/parsing/basic_shape.rs
+++ b/tests/unit/style/parsing/basic_shape.rs
@@ -96,6 +96,19 @@ fn test_circle() {
assert_roundtrip_basicshape!(Circle::parse, "circle(calc(1px + 50%) at center)",
"circle(calc(1px + 50%) at 50% 50%)");
+ assert_roundtrip_basicshape!(Circle::parse, "circle(at right 5px bottom 10px)",
+ "circle(at right 5px bottom 10px)");
+ assert_roundtrip_basicshape!(Circle::parse, "circle(at bottom 5px right 10px)",
+ "circle(at right 10px bottom 5px)");
+ assert_roundtrip_basicshape!(Circle::parse, "circle(at right 5% top 0px)",
+ "circle(at 95% 0%)");
+ assert_roundtrip_basicshape!(Circle::parse, "circle(at right 5% bottom 0px)",
+ "circle(at 95% 100%)");
+ assert_roundtrip_basicshape!(Circle::parse, "circle(at right 5% bottom 1px)",
+ "circle(at right 5% bottom 1px)");
+ assert_roundtrip_basicshape!(Circle::parse, "circle(at 5% bottom 1px)",
+ "circle(at left 5% bottom 1px)");
+
assert!(parse(Circle::parse, "circle(at top 40%)").is_err());
}