diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-inherited.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-inherited.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-inherited.html b/testing/web-platform/tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-inherited.html new file mode 100644 index 0000000000..0c5331f0ac --- /dev/null +++ b/testing/web-platform/tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-inherited.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>Submitting element directionality: the dirname attribute</title> +<link rel="author" title="Kolupaev Dmitry" href="mailto:dmitry.klpv@gmail.com"> +<link rel=help href="https://html.spec.whatwg.org/multipage/#submitting-element-directionality:-the-dirname-attribute"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/dirname.js"></script> +<div id="log"></div> +<div dir="rtl"> + <form action="resources/dirname-iframe.html" method=get target="iframe"> + <p><label>User: <input type=text name="user" dirname="user.dir" required/></label></p> + <p><label>Comment: <textarea name="comment" dirname="comment.dir" required></textarea></label></p> + <p><button type=submit>Post Comment</button></p> + </form> +</div> +<iframe name="iframe"></iframe> +<script> + document.querySelector("input").value = "foobar"; + document.querySelector("textarea").value = "foobar"; + document.querySelector("button").click(); + + var t_inp = async_test("submit input element directionality"); + onIframeLoadedDone(t_inp, function(params) { + assert_equals(params.get("user.dir"), "rtl"); + }); + + var t_ta = async_test("submit textarea element directionality"); + onIframeLoadedDone(t_ta, function(params) { + assert_equals(params.get("comment.dir"), "rtl"); + }); +</script> |