blob: a167ff2587f516dddf83f80ec8760afcf1b64b6d [file] [log] [blame]
Test to ensure formAction attribute returns the URL of the document when the attribute is not specified or empty.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
element = document.createElement("input");
PASS element.formAction is location.href
PASS element.setAttribute("formaction", "http://webkit.org/foo.html"); element.formAction is "http://webkit.org/foo.html"
PASS element.setAttribute("formaction", ""); element.formAction is location.href
base = document.createElement("base"); document.head.appendChild(base); base.href = "https://bugs.webkit.org/";
PASS element.formAction is location.href
PASS element.setAttribute("formaction", "foo.html"); element.formAction is "https://bugs.webkit.org/foo.html"
PASS element.setAttribute("formaction", ""); element.formAction is location.href
element = document.createElement("button");
PASS element.formAction is location.href
PASS element.setAttribute("formaction", "http://webkit.org/foo.html"); element.formAction is "http://webkit.org/foo.html"
PASS element.setAttribute("formaction", ""); element.formAction is location.href
base = document.createElement("base"); document.head.appendChild(base); base.href = "https://bugs.webkit.org/";
PASS element.formAction is location.href
PASS element.setAttribute("formaction", "foo.html"); element.formAction is "https://bugs.webkit.org/foo.html"
PASS element.setAttribute("formaction", ""); element.formAction is location.href