chromium/third_party/blink/web_tests/external/wpt/css/selectors/selector-placeholder-shown-type-change-001.html

<!DOCTYPE html>
<html class="reftest-wait">
  <head>
    <title>Check for correctly updating :placeholder-shown matching on type change</title>
    <link rel="match" href="selector-placeholder-shown-type-change-001-ref.html">
    <link rel="help" href="https://drafts.csswg.org/selectors-4/#placeholder">
    <style>
      span { color: red; }
      :placeholder-shown + span { color: green }
    </style>
    <script>
      onload = function() {
        // setTimeout because in some browsers apparently a toplevel restyle
        // happens right after the load event fires?
        setTimeout(function() {
          document.querySelector("input").type = "";
          document.documentElement.className = "";
        }, 10);
      }
    </script>
  </head>
  <body>
    <input type="hidden" placeholder="text"><span>This should be green</span>
  </body>
</html>