mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 13:18:45 +02:00
Automatic update from web-platform-tests Unclosed URL At EOF Verifies that a url() (specifically, one that parses to a `<url-token>`) that's unclosed at EOF is still valid. Also tests "empty" url(), because that was brought up as another source of divergence in the same issue. There's some disagreement on whether that's valid at all and how to represent it, so rather than take a stand, I just assert that it should parse the same as the closed version, whatever that is. Tests <https://github.com/w3c/csswg-drafts/issues/3598> -- Merge pull request #15369 from web-platform-tests/tabatkins-patch-1 Unclosed URL At EOF -- wpt-commits: b4f35dc6027f5e8776ac9c20f85031e0f1437233, 8dbed22314172d637582b63fc96e946e2e0dfff4 wpt-pr: 15369
29 lines
1.1 KiB
HTML
29 lines
1.1 KiB
HTML
<!doctype html>
|
|
<title>Unclosed URL At EOF</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
|
|
<meta name=author title="Tab Atkins-Bittner">
|
|
<link rel=help href="https://drafts.csswg.org/css-syntax/#consume-url-token">
|
|
|
|
<div id=test1-control style="background-image:url(foo)"></div>
|
|
<div id=test1-experiment style="background-image:url(foo"></div>
|
|
|
|
<div id=test2-control style="background-image:url()"></div>
|
|
<div id=test2-experiment style="background-image:url("></div>
|
|
|
|
<script>
|
|
|
|
test(()=>{
|
|
const control = document.querySelector("#test1-control");
|
|
const experiment = document.querySelector("#test1-experiment");
|
|
assert_equals(control.style.backgroundImage, experiment.style.backgroundImage);
|
|
}, "Unclosed url token at EOF is valid.");
|
|
|
|
test(()=>{
|
|
const control = document.querySelector("#test2-control");
|
|
const experiment = document.querySelector("#test2-experiment");
|
|
assert_equals(control.style.backgroundImage, experiment.style.backgroundImage);
|
|
}, "Unclosed empty url token at EOF is valid.");
|
|
|
|
</script>
|