chromium/third_party/blink/web_tests/fast/css/pseudo-invalid-novalidate-001.html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
<style>
 :invalid { background: lime; }
 :valid { background: red; }
 input { background: blue; }
</style>
</head>
<body>
<p id="description"></p>
<form method="get">
<input type="text" required disabled/>
<input name="victim" type="text" value="Loremipsum" pattern="Lorem ipsum"/>
</form>
<div id="console"></div>
<script>
description("This test checks that an input element that doesn't validate and an invalid input don't share style.");

v = document.getElementsByTagName("input");

shouldBe("document.defaultView.getComputedStyle(v[0], null).getPropertyValue('background-color')", "'rgb(0, 0, 255)'");
shouldBe("document.defaultView.getComputedStyle(v[1], null).getPropertyValue('background-color')", "'rgb(0, 255, 0)'");
</script>
</body>
</html>