Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS Backgrounds and Borders 3 parsing tests #10170

Merged

Conversation

Projects
None yet
3 participants
@ewilligers
Copy link
Contributor

ewilligers commented Mar 25, 2018

Test that each property accepts valid values and
rejects invalid values.

Spec: https://drafts.csswg.org/css-backgrounds/

Eric Willigers
CSS Backgrounds and Borders 3 parsing tests
Test that each property accepts valid values and
rejects invalid values.

Spec: https://drafts.csswg.org/css-backgrounds/
@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Mar 25, 2018

Build PASSED

Started: 2018-03-25 12:53:28
Finished: 2018-03-25 13:04:05

View more information about this build on:

Eric Willigers

emilio added a commit to emilio/servo that referenced this pull request Apr 10, 2018

style: Simplify border-image-repeat serialization.
We're the only ones to preserve explicitly the second keyword, as noticed in:

  web-platform-tests/wpt#10170
@emilio

emilio approved these changes Apr 10, 2018

Copy link
Contributor

emilio left a comment

LGTM, but feel free to remove the longer serialization tests that FF serializes correctly, if you want.

test_valid_value("border-image-outset", "1px");
test_valid_value("border-image-outset", "2");
// "1px" in Blink, Edge, WebKit; "1px 1px 1px 1px" in Firefox.
test_valid_value("border-image-outset", "1px", ["1px", "1px 1px 1px 1px"]);

This comment has been minimized.

Copy link
@emilio

emilio Apr 10, 2018

Contributor

FWIW, I don't know with which Firefox version have you tested, but Firefox serializes to 1px for me.

This comment has been minimized.

Copy link
@ewilligers

ewilligers Apr 13, 2018

Author Contributor

I observed "1px 1px 1px 1px" using Firefox ESR 52.6.0

// "1px" in Blink, Edge, WebKit; "1px 1px 1px 1px" in Firefox.
test_valid_value("border-image-outset", "1px", ["1px", "1px 1px 1px 1px"]);
// "2" in Blink, Edge, WebKit; "2 2 2 2" in Firefox.
test_valid_value("border-image-outset", "2", ["2", "2 2 2 2"]);

This comment has been minimized.

Copy link
@emilio

emilio Apr 10, 2018

Contributor

Similarly, this serializes to 2 for me.

test_valid_value("border-image-repeat", "repeat round");
// "stretch" in Blink, Edge, WebKit; "stretch stretch" in Firefox.
test_valid_value("border-image-repeat", "stretch", ["stretch", "stretch stretch"]);

This comment has been minimized.

Copy link
@emilio

emilio Apr 10, 2018

Contributor

This just serializes to stretch on FF Nightly.

// "stretch" in Blink, Edge, WebKit; "stretch stretch" in Firefox.
test_valid_value("border-image-repeat", "stretch", ["stretch", "stretch stretch"]);
// "space" in Blink, Edge, WebKit; "space space" in Firefox.
test_valid_value("border-image-repeat", "space space", ["space", "space space"]);

This comment has been minimized.

Copy link
@emilio

emilio Apr 10, 2018

Contributor

This does serialize as space space, I'll fix, thanks!

This comment has been minimized.

Copy link
@emilio

emilio Apr 10, 2018

Contributor

Opened servo/servo#20610 for this.

test_valid_value("border-image", "1 2% 3 4% fill / 3 / 1px 2 3px 4");
test_valid_value("border-image", "1 / auto / 1px");
test_valid_value("border-image", "1 2% 3 4% / 1px 2% 3 auto / 2");
// "none" in Edge, "none 100% / 1 / 0 stretch" in Firefox.

This comment has been minimized.

Copy link
@emilio

emilio Apr 10, 2018

Contributor

What about WK / Blink? I think Edge would be ideally right here.

This comment has been minimized.

Copy link
@ewilligers

ewilligers Apr 13, 2018

Author Contributor

Blink and WebKit fail all these tests by returning an empty string as the value of border-image.

<body>
<script>
test_invalid_value("background-color", "none");

This comment has been minimized.

Copy link
@emilio

emilio Apr 10, 2018

Contributor

nit: stray newline?

I'd also remove the <html> / <head> / <body> tags, to keep the test smaller, but...

<body>
<script>
// For <final-bg-layer>, implementations serialize <‘background-color’> after <bg-image>, contrary to spec.
// Safari removes quotes.

This comment has been minimized.

Copy link
@emilio

emilio Apr 10, 2018

Contributor

Hmm, does safari remove quotes unconditionally? How does it handle escaping? That's maybe worth a bug.

This comment has been minimized.

@@ -12,7 +12,8 @@
</head>
<body>
<script>
test_valid_value("border-image-slice", "1");
// "1" in Blink, Edge, WebKit; "1 1 1 1" in Firefox.
test_valid_value("border-image-slice", "1", ["1", "1 1 1 1"]);

This comment has been minimized.

Copy link
@emilio

emilio Apr 10, 2018

Contributor

FF nightly serializes 1 for me.

bors-servo added a commit to servo/servo that referenced this pull request Apr 10, 2018

Auto merge of #20610 - emilio:border-image-repeat, r=nox
style: Simplify border-image-repeat serialization.

We're the only ones to preserve explicitly the second keyword, as noticed in:

  web-platform-tests/wpt#10170

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20610)
<!-- Reviewable:end -->

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 10, 2018

servo: Merge #20610 - style: Simplify border-image-repeat serializati…
…on (from emilio:border-image-repeat); r=nox

We're the only ones to preserve explicitly the second keyword, as noticed in:

  web-platform-tests/wpt#10170

Source-Repo: https://github.com/servo/servo
Source-Revision: 07dd37a0cf2eb19a294b27404f1deee1ee6e8fd7

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 63bfe2e3f540cc2108155ae683adb13b7f0ecd45

emilio added a commit to emilio/servo that referenced this pull request Apr 10, 2018

style: Simplify border-image-repeat serialization.
We're the only ones to preserve explicitly the second keyword, as noticed in:

  web-platform-tests/wpt#10170

bors-servo added a commit to servo/servo that referenced this pull request Apr 10, 2018

Auto merge of #20616 - emilio:border-image-repeat, r=nox
style: Simplify border-image-repeat serialization.

We're the only ones to preserve explicitly the second keyword, as noticed in:

  web-platform-tests/wpt#10170

Reland of #20610 because it got backed out because I wasn't paying attention to IRC.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 11, 2018

servo: Merge #20616 - style: Simplify border-image-repeat serializati…
…on (from emilio:border-image-repeat); r=nox

We're the only ones to preserve explicitly the second keyword, as noticed in:

  web-platform-tests/wpt#10170

Reland of #20610 because it got backed out because I wasn't paying attention to IRC.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0f85c645197608a32f453f7f7f1f9d5709456c2a

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 78c24f1f347f08ba000dead9abd2a366a96c500e

mykmelez pushed a commit to mozilla/gecko that referenced this pull request Apr 11, 2018

servo: Merge #20616 - style: Simplify border-image-repeat serializati…
…on (from emilio:border-image-repeat); r=nox

We're the only ones to preserve explicitly the second keyword, as noticed in:

  web-platform-tests/wpt#10170

Reland of #20610 because it got backed out because I wasn't paying attention to IRC.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0f85c645197608a32f453f7f7f1f9d5709456c2a

mykmelez pushed a commit to mozilla/gecko that referenced this pull request Apr 11, 2018

servo: Merge #20610 - style: Simplify border-image-repeat serializati…
…on (from emilio:border-image-repeat); r=nox

We're the only ones to preserve explicitly the second keyword, as noticed in:

  web-platform-tests/wpt#10170

Source-Repo: https://github.com/servo/servo
Source-Revision: 07dd37a0cf2eb19a294b27404f1deee1ee6e8fd7
@ewilligers

This comment has been minimized.

Copy link
Contributor Author

ewilligers commented Apr 12, 2018

I was testing Firefox using Firefox ESR 52.6.0 and Firefox 59. Now using Nightly only.

Additional serialization issues raised:
w3c/csswg-drafts#2547
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/16905526/

@ewilligers ewilligers merged commit 56a257e into web-platform-tests:master Apr 12, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ewilligers ewilligers deleted the ewilligers:backgrounds-borders-parsing branch Apr 12, 2018

Moggers added a commit to Moggers/servo that referenced this pull request Jun 13, 2018

style: Simplify border-image-repeat serialization.
We're the only ones to preserve explicitly the second keyword, as noticed in:

  web-platform-tests/wpt#10170

Moggers added a commit to Moggers/servo that referenced this pull request Jun 13, 2018

style: Simplify border-image-repeat serialization.
We're the only ones to preserve explicitly the second keyword, as noticed in:

  web-platform-tests/wpt#10170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.