fune/testing/web-platform/tests/css/css-properties-values-api/at-property-non-matching-media-crash.html
Anders Hartvoll Ruud b936feb64a Bug 1640889 [wpt PR 23767] - [@property] Avoid crash with non-matching 'media' attribute, a=testonly
Automatic update from web-platform-tests
[@property] Avoid crash with non-matching 'media' attribute

The RuleSet of an ActiveStyleSheet can be nullptr for non-matching
media (see StyleEngine::RuleSetForSheet), hence we can't DCHECK that
it exists.

Bug: 1085994
Change-Id: Iac7f746045f46ad7752b30cccce8b6f403cf19b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2214537
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771897}

--

wpt-commits: d004c9c8e0265fc20535110d31be7042b7fbc509
wpt-pr: 23767
2020-06-01 14:03:12 +00:00

19 lines
427 B
HTML

<!DOCTYPE html>
<html class="test-wait">
<link rel="help" href="https://crbug.com/1085994">
<style id="style">
@property --x {
syntax: "<length>";
inherits: false;
initial-value: 0px;
}
</style>
<script>
document.documentElement.offsetTop;
style.setAttribute('media', 'braille');
document.documentElement.className = '';
</script>
<p>
PASS if no crash
</p>
</html>