Bug 1527634 [wpt PR 15369] - Unclosed URL At EOF, a=testonly
authorTab Atkins Jr <jackalmage@gmail.com>
Tue, 05 Mar 2019 11:10:31 +0000
changeset 525124 0883b91b63677b4ba5c44e6ec6dce2212a792f11
parent 525123 98dd738ff94216558b933c59a3db278c5a703289
child 525125 b9735af59094a07e8a6e65c908878ef1173f923e
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1527634, 15369
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1527634 [wpt PR 15369] - Unclosed URL At EOF, a=testonly 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
testing/web-platform/tests/css/css-syntax/unclosed-url-at-eof.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-syntax/unclosed-url-at-eof.html
@@ -0,0 +1,29 @@
+<!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>