Skip to content

Commit

Permalink
Bug 1866856 [wpt PR 43375] - [inset-area] Test for computed inset val…
Browse files Browse the repository at this point in the history
…ues, a=testonly

Automatic update from web-platform-tests
[inset-area] Test for computed inset values

As part of the proposal in [1], inset-area affects inset properties at
used value time. Testing with typed-om since inset properties use
resolved values for getComputedStyle.

[1] w3c/csswg-drafts#9598 (comment)

Bug: 1477314
Change-Id: I2db25b3546c6553b36f8b9cfd88aa4d906e7ea28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5063151
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1230573}

--

wpt-commits: 8fe24833480b88775d0f9b4f908c63c185162fb2
wpt-pr: 43375
  • Loading branch information
Rune Lillesveen authored and moz-wptsync-bot committed Dec 1, 2023
1 parent 921a23f commit 13152bc
Showing 1 changed file with 24 additions and 0 deletions.
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<title>CSS Anchor Positioning: inset-area should not affect computed inset values</title>
<link rel="help" href="https://drafts.csswg.org/css-anchor-position/#inset-area">
<lnik rel="help" href="https://github.com/w3c/csswg-drafts/issues/9598">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/css-typed-om/resources/testhelper.js"></script>
<style>
#abs {
position: absolute;
inset-area: all;
}
</style>
<div id="abs"></div>
<script>
test(() => {
let style = abs.computedStyleMap();
assert_equals(style.get("inset-area").toString(), "all", "inset-area is supported");
assert_style_value_equals(style.get("left"), new CSSKeywordValue("auto"));
assert_style_value_equals(style.get("right"), new CSSKeywordValue("auto"));
assert_style_value_equals(style.get("top"), new CSSKeywordValue("auto"));
assert_style_value_equals(style.get("bottom"), new CSSKeywordValue("auto"));
}, "inset-area does not affect insets at computed value time");
</script>

0 comments on commit 13152bc

Please sign in to comment.