fune/testing/web-platform/tests/css/css-anchor-position/anchor-query-custom-property-registration.html
Koji Ishii ae9540f2c7 Bug 1797256 [wpt PR 36645] - [anchor-position] Change the spec links, a=testonly
Automatic update from web-platform-tests
[anchor-position] Change the spec links

As the ED[1] is available, this patch:
1. Changes the spec link from the unofficial draft[2].
2. Removes the `.tentative` suffix, except `anchor-scroll`
   which is not in the ED yet.

This patch has no behavior changes.

[1] https://drafts.csswg.org/css-anchor-1/
[2] https://tabatkins.github.io/specs/css-anchor-position/

Bug: 1309178
Change-Id: I16e100c0bbc771285656fcf2130146ad99a4ab98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3976011
Auto-Submit: Koji Ishii <kojii@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1063207}

--

wpt-commits: 1afe96797a55b9198e5de1e01193ac0ba2220202
wpt-pr: 36645
2022-11-11 12:31:45 +00:00

50 lines
1.6 KiB
HTML

<!DOCTYPE html>
<title>Tests using anchor queries in custom property initial value</title>
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/">
<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#register-a-custom-property">
<link rel="author" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
setup(() => assert_own_property(CSS, 'registerProperty'));
// Anchor queries are not computationally independent, so they cannot be used
// in the initial value of any typed custom property.
test(() => assert_throws_dom(
'SyntaxError',
() => CSS.registerProperty({
name: '--x',
syntax: '<length>',
inherits: false,
initialValue: 'anchor(--foo top)',
})), 'anchor() cannot be used as <length> initial value');
test(() => assert_throws_dom(
'SyntaxError',
() => CSS.registerProperty({
name: '--x',
syntax: '<length>',
inherits: false,
initialValue: 'anchor-size(--foo width)',
})), 'anchor-size() cannot be used as <length> initial value');
test(() => assert_throws_dom(
'SyntaxError',
() => CSS.registerProperty({
name: '--x',
syntax: '<length-percentage>',
inherits: false,
initialValue: 'anchor(--foo top)',
})), 'anchor() cannot be used as <length-percentage> initial value');
test(() => assert_throws_dom(
'SyntaxError',
() => CSS.registerProperty({
name: '--x',
syntax: '<length-percentage>',
inherits: false,
initialValue: 'anchor-size(--foo width)',
})), 'anchor-size() cannot be used as <length-percentage> initial value');
</script>