Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!doctype html>
<meta charset="utf-8">
<title>CSSStyleValue serialization from parsing</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/testhelper.js"></script>
<body>
<div id="log"></div>
<script>
'use strict';
test(() => {
const result = CSSStyleValue.parse('color', 'red');
assert_equals(result.toString(), 'red');
}, 'CSSStyleValue parsed from string serializes to given string');
test(() => {
const result = CSSStyleValue.parse('background', 'blue');
assert_equals(result.toString(), 'blue');
}, 'Shorthand CSSStyleValue parsed from string serializes to given string');
</script>