blob: e663db42fd005b530efe837f5eeb7adadbb971bf [file] [log] [blame]
<!doctype html>
<meta charset="utf-8">
<title>CSSUnparsedValue tests</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#unparsedvalue-objects">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../resources/testhelper.js"></script>
<script>
'use strict';
const gValidTestArgs = [
{ args: [], desc: 'no arguments' },
{ args: [''], desc: 'an empty string' },
{ args: [new CSSVariableReferenceValue('--foo')], desc: 'a CSSVariableReferenceValue' },
{
args: ['foo', 'bar', new CSSVariableReferenceValue('--A'), 'baz', new CSSVariableReferenceValue('--B')],
desc: 'mix of strings and CSSVariableReferenceValues'
},
];
for (const {args, desc} of gValidTestArgs) {
test(() => {
const result = new CSSUnparsedValue(...args);
assert_array_equals(result, args);
}, 'CSSUnparsedValue can be constructed from ' + desc);
}
</script>