3 <meta http-equiv=
"content-type" content=
"text/html; charset=UTF-8">
5 <script src=
"../../resources/js-test.js"> </script>
7 window
.jsTestIsAsync
= true;
10 document
.forms
.f
.submit();
13 <body onload=
"test()">
14 <p>Test that when dirname attribute is specified then it is added in submission body.
</p>
16 <form action=
"#action" name=
"f">
17 <p><label>Comment:
<input type=text
name=
"comment" dirname=
"comment.dir" required
></label></p>
18 <p><label>WithRTLDir:
<textarea name=
"txtarea" dir=
"rtl" dirname=
"txtareaRTL.dir"></textarea></label></p>
19 <p><label>WithLTRDir:
<textarea name=
"txtarea1" dir=
"ltr" dirname=
"txtareaLTR.dir"></textarea></label></p>
20 <p><label>WithInvalidDir:
<textarea name=
"txtarea2" dir=
"invalid" dirname=
"txtareaInvalid.dir"></textarea></label></p>
21 <p><label>WithRTLValue:
<input name=
"input" dirname=
"inputRTLvalue.dir" value=
"مرحبًا"></label></p>
22 <p><button name=
"mode" type=submit
value=
"add">Post Comment
</button></p>
25 <div id=
"console"></div>
28 if (document
.location
.href
.match('\\?')) {
29 shouldBeTrue('document.location.search.indexOf("comment.dir=ltr") != -1');
30 shouldBeTrue('document.location.search.indexOf("txtareaRTL.dir=rtl") != -1');
31 shouldBeTrue('document.location.search.indexOf("txtareaLTR.dir=ltr") != -1');
32 shouldBeTrue('document.location.search.indexOf("txtareaInvalid.dir=ltr") != -1');
33 shouldBeTrue('document.location.search.indexOf("inputRTLvalue.dir=ltr") != -1');
37 successfullyParsed
= true;