chromium/third_party/blink/web_tests/fast/forms/formmethod-attribute-button-html.html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<form method="get" action="?">
    <input type="hidden" name="hidden" value="I am hidden" />
    <button id="button" formmethod="post" type="submit" name="button" value="value" />
</form>
<script>
description("Test for the formmethod attribute in button tags.");
if (window.testRunner) {
    testRunner.waitUntilDone();
}

var button = document.getElementById('button');

if (document.URL.substring(0, 4) == "file") {
    if (document.URL.indexOf('?') == -1) {
        button.click();
    } else {
        if (document.URL.substring(document.URL.indexOf('?') + 1, document.URL.length) == "")
            testPassed('The formmethod attribute was successfully used');
        else
            testFailed('The formmethod attribute was not used');

        if (window.testRunner)
            testRunner.notifyDone();
    }
}
</script>
</body>
</html>