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