blob: 3696e9997edf7bb265cf88f93dc365879e2d33a8 [file] [log] [blame]
<!doctype html>
<meta charset="utf-8">
<title>CSSVariableReferenceValue Error Handling</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#cssvariablereferencevalue">
<meta name="assert" content="Test CSSVariableReferenceValue constructor and attributes error handling" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<div id="log">
<script>
'use strict';
test(() => {
assert_throws(new TypeError(), () => new CSSVariableReferenceValue(''));
}, 'Constructing a CSSVariableReferenceValue with an empty variable name ' +
'throws a TypeError');
test(() => {
assert_throws(new TypeError(), () => new CSSVariableReferenceValue('bar'));
}, 'Constructing a CSSVariableReferenceValue with an invalid variable name ' +
'throws SyntaxError');
</script>