Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-pseudo/chrome-486467574.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="help" href="https://crbug.com/486467574">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<video>
<a>
<div id="container"></div>
</a>
</video>
<script>
test(() => {
const container = document.getElementById('container');
const obj = document.createElement('div');
container.appendChild(obj);
const computedStyle = getComputedStyle(obj, '::selection');
const computedColor = computedStyle.getPropertyValue('color');
// If `<video>` uses a shadow tree, it shouldn't return a value as per
// However I guess https://html.spec.whatwg.org/#video doesn't
// technically require `<video>` to use a shadow tree...
assert_in_array(computedColor, ['', 'rgb(0, 0, 0)']);
}, 'computed ::selection color should follow the configured rule');
</script>
</body>