chromium/third_party/blink/web_tests/fast/forms/pattern-attribute-001.html

<html>
<head>
<title>pattern attribute presence test</title>
<script language="JavaScript" type="text/javascript">
    function log(message) {
        document.getElementById("console").innerHTML += "<li>"+message+"</li>";
    }

    function test() {
        if (window.testRunner)
            testRunner.dumpAsText();

        v = document.getElementsByName("victim");

        log(v[0].pattern ? "SUCCESS" : "FAILURE");
    }
</script>
</head>
<body onload="test()">
<p>There an input element with the pattern attribute set.</p>
<input name="victim" pattern="something" />
<hr>
<ol id="console"></ol>
</body>
</html>