blob: ccf3f96fcce2441afb5e9d10b05a41e8600ae3dd [file] [log] [blame]
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<script src="../js/resources/js-test-pre.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>
<div dir="auto">
<form action="#action" method="GET" name="f">
<div dir="rtl">
<input type=text name="comment" dirname="rtlAncestor.dir" required>
</div>
<input type=text name="autoAncestor" dirname="autoAncestor.dir" value="שלום">
<p><button name="mode" type=submit value="add">Post Comment</button></p>
</form>
Hello
</div>
<div id="console"></div>
<div id="action">
<script>
if (document.location.href.match('\\?')) {
shouldBeTrue('document.location.search.indexOf("rtlAncestor.dir=rtl") != -1');
shouldBeTrue('document.location.search.indexOf("autoAncestor.dir=ltr") != -1');
finishJSTest();
}
successfullyParsed = true;
</script>
</div>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>