Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / forms / submit-form-with-dirname-attribute-with-nonhtml-ancestor.html
1 <html>
2 <head>
3 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
4 </head>
5 <script src="../../resources/js-test.js"> </script>
6 <script>
7 window.jsTestIsAsync = true;
8
9 function test() {
10     document.forms.f.submit();
11 }
12 </script>
13 <body onload="test()">
14 <p>Test that when dir attribute is specified for non html element, it is not considered for dirname attribute value in submission body.</p>
15 <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 400 400" dir="rtl">
16     <div>
17     <form action="#action" method="GET" name="f">
18         <input type=text name="nonHtmlAncestor" dirname="nonHtmlAncestor.dir"> 
19         <p><button name="mode" type=submit value="add">Post Comment</button></p>
20     </form>
21     </div>
22 </svg>
23 <div id="console"></div>
24 <div id="action">
25 <script>
26 if (document.location.href.match('\\?')) {
27     shouldBeTrue('document.location.search.indexOf("nonHtmlAncestor.dir=ltr") != -1');
28     finishJSTest();
29 }
30
31 successfullyParsed = true;
32 </script>
33 </div>
34 </body>
35 </html>