Commit 2a8f2e7a authored by Darren Shen's avatar Darren Shen Committed by Commit Bot

[css-typed-om] Add test for serializing CSSUrlImageValue.

This patch adds a test for serializing CSSUrlImageValue. Note that we
serialize with quotes surrounding the URL, something which is not
explicitly stated in the spec. We've asked clarification about this [1].

Spec: https://drafts.css-houdini.org/css-typed-om-1/#urlimagevalue-serialization

[1] https://github.com/w3c/css-houdini-drafts/issues/519

Bug: 782103
Change-Id: I46b5669eb7cbf030eacc6aaa60be0649c9b11e24
Reviewed-on: https://chromium-review.googlesource.com/770601Reviewed-by: default avatarBugs Nash <bugsnash@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517266}
parent 66286552
<!doctype html>
<meta charset="utf-8">
<title>IDL-constructed CSSURLImageValue serialization tests</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#urlimagevalue-serialization">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../resources/testhelper.js"></script>
<script>
'use strict';
test(() => {
assert_equals(new CSSURLImageValue('http://foo.bar').toString(), 'url("http://foo.bar")');
}, 'CSSUrlImageValue constructed from IDL serializes correctly');
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment