Skip to content

Commit

Permalink
Change WPT test for offset-path parsing
Browse files Browse the repository at this point in the history
1) As per https://drafts.csswg.org/css-box-4/#typedef-coord-box
<coord-box> can't be defined with margin-box.

2) "at <position" changes come from
w3c/csswg-drafts#8695 (comment)

Resolved here: web-platform-tests/interop#340

Change-Id: I6fe865d5248c7004257cd17669353d810f6e3d09
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4551246
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1150434}
  • Loading branch information
danielsakhapov authored and Chromium LUCI CQ committed May 30, 2023
1 parent 0e3fee7 commit 21e9182
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ PASS e.style['offset-path'] = "path(\"m 10 20 l 20 30 Z l 50 60 Z m 70
PASS e.style['offset-path'] = "path(\"m 10.0 170.0 h 90.00 v 30.00 m 0 0 s 1 2 3 4 z c 9 8 7 6 5 4\")" should set the property value
PASS e.style['offset-path'] = " path( \"m 10 20 a 10 20 30 1 0 40 50 a 110 120 30 1 1 140 50\" ) " should set the property value
PASS e.style['offset-path'] = "url(\"http://www.example.com/index.html#polyline1\")" should set the property value
PASS e.style['offset-path'] = "circle(100px)" should set the property value
FAIL e.style['offset-path'] = "margin-box" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['offset-path'] = "circle(100px)" should set the property value assert_equals: serialization should be canonical expected "circle(100px)" but got "circle(100px at 50% 50%)"
PASS e.style['offset-path'] = "circle(100px at 50% 50%)" should set the property value
PASS e.style['offset-path'] = "border-box" should set the property value
PASS e.style['offset-path'] = "inset(10% 20% 30% 40%) border-box" should set the property value
FAIL e.style['offset-path'] = "fill-box ellipse(50% 60%)" should set the property value assert_equals: serialization should be canonical expected "ellipse(50% 60%) fill-box" but got "ellipse(50% 60% at 50% 50%) fill-box"
PASS e.style['offset-path'] = "content-box ellipse(50% 60% at 50% 50%)" should set the property value
Harness: the test ran to completion.

Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@

test_valid_value("offset-path", 'url("http://www.example.com/index.html#polyline1")');

test_valid_value("offset-path", "circle(100px)", "circle(100px at 50% 50%)");
test_valid_value("offset-path", "margin-box");
test_valid_value("offset-path", "circle(100px)");
test_valid_value("offset-path", "circle(100px at 50% 50%)");
test_valid_value("offset-path", "border-box");
test_valid_value("offset-path", "inset(10% 20% 30% 40%) border-box");
test_valid_value("offset-path", "fill-box ellipse(50% 60%)", "ellipse(50% 60%) fill-box");
test_valid_value("offset-path", "content-box ellipse(50% 60% at 50% 50%)", "ellipse(50% 60% at 50% 50%) content-box");
</script>
</body>
</html>

0 comments on commit 21e9182

Please sign in to comment.