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 464508 73b5f322916e1c32d6e953912a615dabb6b6b32a
parent 464507 ce3bb2a86937e1229494b5207b008f079c931b41
child 464509 d90cae55c3ce93d690cd02b6aa901e2ce4744739
push id35717
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:45:26 +0000
treeherdermozilla-central@e0861be8d6c0 [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>