Files
sousa-gecko/testing/web-platform/tests/css/selectors/old-tests/css3-modsel-98.xml
T
Kent Tamura 229da4c9e4 Bug 2050733 [wpt PR 60921] - css/selectors: Automate a part of legacy selectors tests (80 to 98), a=testonly
Automatic update from web-platform-tests
css/selectors: Automate a part of legacy selectors tests (80 to 98)

Change-Id: I05bd12a6f0d26ddad01c56a6720750a90e0bc514
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8002655
Auto-Submit: Kent Tamura <tkent@chromium.org>
Commit-Queue: Koji Ishii <kojii@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@{#1652917}

--

wpt-commits: f629b57316ea082e808c963d230a91b0e423c371
wpt-pr: 60921
2026-07-10 09:19:01 +00:00

36 lines
1.8 KiB
XML

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Attribute value selector with declared namespace</title>
<style type="text/css"><![CDATA[@namespace a url(http://www.example.org/a);
@namespace b url(http://www.example.org/b);
*|p, *|q, *|r, *|s { display : block ; margin-bottom : 1em }
*|q, *|t { background-color : red }
*[a|title="foo"] {background-color : lime }
*[a|title=footwo] {background-color : lime }
]]></style>
<link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
<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=" namespace" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="common.js"></script>
</head>
<body xmlns:a="http://www.example.org/a" xmlns:b="http://www.example.org/b">
<p id="u1" title="foo">This paragraph should be unstyled.</p>
<q id="t1" xmlns="http://www.example.org/a" a:title="foo">This paragraph should have a green background</q>
<s id="u2" xmlns="http://www.example.org/a" a:title="foobar">This paragraph should be unstyled.</s>
<r id="u3" xmlns="http://www.example.org/b" b:title="foo">This paragraph should be unstyled.</r>
<t id="t2" xmlns="http://www.example.org/a" a:title="footwo">This paragraph should have a green background</t>
<script><![CDATA[
test(function() {
assert_background_color('t1', LIME);
assert_background_color('t2', LIME);
assert_not_background_color('u1', LIME);
assert_not_background_color('u2', LIME);
assert_not_background_color('u3', LIME);
}, 'Attribute value selector with declared namespace');
]]></script>
</body>
</html>