1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/bidi/dirAuto/dir_auto-set-contained-invalid-dir-R.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,72 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 + <head> 1.7 + <meta charset="utf-8" /> 1.8 + <title>HTML Test: dir=auto, start with dir, then R</title> 1.9 + <link rel="reference" href="dir_auto-contained-dir-R-ref.html" /> 1.10 + <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" /> 1.11 + <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" /> 1.12 + <link rel="author" title="Simon Montagu" href="mailto:smontagu@smontagu.org" /> 1.13 + <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" /> 1.14 + <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" /> 1.15 + <meta name="assert" content=" 1.16 + When dir='auto', the direction is set according to the first strong character 1.17 + of the text while ignoring contained elements with an explicit dir of their own. 1.18 + In this test, it is the Hebrew letter Alef, thus the direction must be 1.19 + resolved as RTL. 1.20 + This is a variation of the original dir_auto-contained-dir-R.html in which 1.21 + an element with an invalid dir attribute has the dir attribute set by 1.22 + script after loading the page" /> 1.23 + <style> 1.24 + input, textarea { 1.25 + font-size:1em; 1.26 + } 1.27 + body { 1.28 + font-size:2em; 1.29 + } 1.30 + .test, .ref { 1.31 + border: medium solid gray; 1.32 + width: 400px; 1.33 + margin: 20px; 1.34 + } 1.35 + .comments { 1.36 + display: none; 1.37 + } 1.38 + </style> 1.39 + <script type="text/javascript"> 1.40 +function setDirs(value) 1.41 +{ 1.42 + var p1 = document.getElementById("p1"); 1.43 + p1.dir = value; 1.44 + 1.45 + var p1 = document.getElementById("p2"); 1.46 + p2.dir = value; 1.47 +} 1.48 + </script> 1.49 + </head> 1.50 + <body onload="setDirs('ltr')"> 1.51 + <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div> 1.52 + <div class="comments"> 1.53 + Key to entities used below: 1.54 + א - The Hebrew letter Alef (strongly RTL). 1.55 + ב - The Hebrew letter Bet (strongly RTL). 1.56 + ג - The Hebrew letter Gimel (strongly RTL). 1.57 + </div> 1.58 + <div class="test"> 1.59 + <div dir="ltr"> 1.60 + <div dir="auto"><p id="p1" dir="foopy">DEF</p>אבגABC.</div> 1.61 + </div> 1.62 + <div dir="rtl"> 1.63 + <div dir="auto"><p id="p2" dir="foopy">DEF</p>אבגABC.</div> 1.64 + </div> 1.65 + </div> 1.66 + <div class="ref"> 1.67 + <div dir="ltr"> 1.68 + <div dir="rtl"><p dir="ltr">DEF</p>אבגABC.</div> 1.69 + </div> 1.70 + <div dir="rtl"> 1.71 + <div dir="rtl"><p dir="ltr">DEF</p>אבגABC.</div> 1.72 + </div> 1.73 + </div> 1.74 + </body> 1.75 +</html>