chromium/third_party/blink/web_tests/css3/selectors3/xhtml/css3-modsel-d3.xml

<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>Dynamic handling of attribute selectors</title>
  <style type="text/css"><![CDATA[
   [test] { background: red; display: block; padding: 1em; }
   stub ~ [|attribute^=start]:not([|attribute~=mid])[|attribute*=dle][|attribute$=end] ~ t { background: lime; }
]]></style>
  <link rel="first" href="css3-modsel-1.xml" title="Groups of selectors"/>
  <link rel="prev" href="css3-modsel-d2.xml" title="Dynamic handling of combinators"/>
  <link rel="next" href="css3-modsel-d4.xml" title="Dynamic updating of :first-child and :last-child"/>
  <link rel="last" href="css3-modsel-d4.xml" title="Dynamic updating of :first-child and :last-child"/>
  <link rel="up" href="./index.html"/>
  <link rel="top" href="../../index.html"/>
 </head>
 <body>

 <div>

  <script type="text/javascript">
   <![CDATA[

    function test() {
      document.getElementsByTagNameNS('', 't')[1].setAttributeNS('', 'attribute', 'start middle end');
    }

    window.onload = test;
   ]]>
  </script>

  <p> The following block should be green. </p>

  <!-- root of selector -->
  <stub xmlns=""></stub>

  <!-- middle part of selector does not match this -->
  <t xmlns="" attribute="fake"></t>

  <!-- middle part of selector matches this once attribute is fixed -->
  <t xmlns="" attribute="start mid dle end"></t>

  <!-- subject of selector -->
  <t xmlns="" test="test"></t>

 </div>

</body>
</html>