Automatic update from web-platform-tests css/selectors: Automate a part of legacy selectors tests (180 to 183, d*) reference/br-this-line-green-color.xht is renamed to br4em-this-line-green-color.xht, and br-this-line-green-color.xht is added for 180a. Change-Id: I684ae5d7574cf9b2a8293b1bd467ea77d4882858 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7952980 Commit-Queue: Koji Ishii <kojii@chromium.org> Auto-Submit: Kent Tamura <tkent@chromium.org> SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/main@{#1657151} -- wpt-commits: 0e3ae676de364b42c0e8ed277246bcdf8668c5b1 wpt-pr: 61088
43 lines
1.5 KiB
XML
43 lines
1.5 KiB
XML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Dynamic handling of combinators</title>
|
|
<style type="text/css"><![CDATA[
|
|
#test { background: red; display: block; padding: 1em; }
|
|
#stub ~ div div + div > div { background: lime; }
|
|
]]></style>
|
|
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
|
|
<link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
|
|
<meta name="flags" content=" dom" />
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="common.js"></script>
|
|
</head>
|
|
<body>
|
|
|
|
<div>
|
|
|
|
<p> The following bar should be green. </p>
|
|
|
|
<div id="stub"></div>
|
|
<div></div>
|
|
<div><div><!-- <div/> --><div><div id="test"></div></div></div></div>
|
|
|
|
</div>
|
|
|
|
<script><![CDATA[
|
|
promise_test(async () => {
|
|
if (document.readyState !== 'complete') {
|
|
await new Promise(resolve => window.addEventListener('load', resolve));
|
|
}
|
|
const el = document.getElementById('test');
|
|
assert_background_color(el, RED, "Initial color should be red");
|
|
|
|
el.parentNode.parentNode.insertBefore(document.createElementNS('http://www.w3.org/1999/xhtml', 'div'), el.parentNode);
|
|
|
|
assert_background_color(el, LIME, "Color after DOM manipulation should be green/lime");
|
|
}, 'Dynamic handling of combinators');
|
|
]]></script>
|
|
</body>
|
|
</html>
|