html

changeset 582:a598fc124dbe

More html5bidi tests: dir-auto/* and br/br-bidi-in-inline-ancestors.html
author Aharon Lanin <aharon@google.com>
date Sun, 19 Feb 2012 10:38:29 +0200
parents 7d5512bbdbe6
children 70827aa55b90
files tests/submission/html5bidi/br/br-bidi-in-inline-ancestors-ref.html tests/submission/html5bidi/br/br-bidi-in-inline-ancestors.html tests/submission/html5bidi/dir-auto/dir_auto-EN-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-EN-L.html tests/submission/html5bidi/dir-auto/dir_auto-EN-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-EN-R.html tests/submission/html5bidi/dir-auto/dir_auto-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-L.html tests/submission/html5bidi/dir-auto/dir_auto-N-EN-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-N-EN-L.html tests/submission/html5bidi/dir-auto/dir_auto-N-EN-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-N-EN-R.html tests/submission/html5bidi/dir-auto/dir_auto-N-EN-ref.html tests/submission/html5bidi/dir-auto/dir_auto-N-EN.html tests/submission/html5bidi/dir-auto/dir_auto-N-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-N-L.html tests/submission/html5bidi/dir-auto/dir_auto-N-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-N-R.html tests/submission/html5bidi/dir-auto/dir_auto-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-R.html tests/submission/html5bidi/dir-auto/dir_auto-contained-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-L.html tests/submission/html5bidi/dir-auto/dir_auto-contained-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-R.html tests/submission/html5bidi/dir-auto/dir_auto-contained-bdi-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-bdi-L.html tests/submission/html5bidi/dir-auto/dir_auto-contained-bdi-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-bdi-R.html tests/submission/html5bidi/dir-auto/dir_auto-contained-dir-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-dir-L.html tests/submission/html5bidi/dir-auto/dir_auto-contained-dir-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-dir-R.html tests/submission/html5bidi/dir-auto/dir_auto-contained-dir_auto-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-dir_auto-L.html tests/submission/html5bidi/dir-auto/dir_auto-contained-dir_auto-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-dir_auto-R.html tests/submission/html5bidi/dir-auto/dir_auto-contained-script-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-script-L.html tests/submission/html5bidi/dir-auto/dir_auto-contained-script-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-script-R.html tests/submission/html5bidi/dir-auto/dir_auto-contained-style-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-style-L.html tests/submission/html5bidi/dir-auto/dir_auto-contained-style-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-style-R.html tests/submission/html5bidi/dir-auto/dir_auto-contained-textarea-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-textarea-L.html tests/submission/html5bidi/dir-auto/dir_auto-contained-textarea-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-contained-textarea-R.html tests/submission/html5bidi/dir-auto/dir_auto-input-EN-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-EN-L.html tests/submission/html5bidi/dir-auto/dir_auto-input-EN-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-EN-R.html tests/submission/html5bidi/dir-auto/dir_auto-input-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-L.html tests/submission/html5bidi/dir-auto/dir_auto-input-N-EN-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-N-EN-L.html tests/submission/html5bidi/dir-auto/dir_auto-input-N-EN-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-N-EN-R.html tests/submission/html5bidi/dir-auto/dir_auto-input-N-EN-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-N-EN.html tests/submission/html5bidi/dir-auto/dir_auto-input-N-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-N-L.html tests/submission/html5bidi/dir-auto/dir_auto-input-N-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-N-R.html tests/submission/html5bidi/dir-auto/dir_auto-input-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-R.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-EN-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-EN-L.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-EN-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-EN-R.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-L.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-EN-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-EN-L.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-EN-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-EN-R.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-EN-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-EN.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-L-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-L.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-R.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-R-ref.html tests/submission/html5bidi/dir-auto/dir_auto-input-script-R.html tests/submission/html5bidi/dir-auto/dir_auto-isolate-ref.html tests/submission/html5bidi/dir-auto/dir_auto-isolate.html tests/submission/html5bidi/dir-auto/dir_auto-pre-N-EN-ref.html tests/submission/html5bidi/dir-auto/dir_auto-pre-N-EN.html tests/submission/html5bidi/dir-auto/dir_auto-pre-N-between-Rs-ref.html tests/submission/html5bidi/dir-auto/dir_auto-pre-N-between-Rs.html tests/submission/html5bidi/dir-auto/dir_auto-pre-mixed-ref.html tests/submission/html5bidi/dir-auto/dir_auto-pre-mixed.html tests/submission/html5bidi/dir-auto/dir_auto-textarea-N-EN-ref.html tests/submission/html5bidi/dir-auto/dir_auto-textarea-N-EN.html tests/submission/html5bidi/dir-auto/dir_auto-textarea-N-between-Rs-ref.html tests/submission/html5bidi/dir-auto/dir_auto-textarea-N-between-Rs.html tests/submission/html5bidi/dir-auto/dir_auto-textarea-mixed-ref.html tests/submission/html5bidi/dir-auto/dir_auto-textarea-mixed.html tests/submission/html5bidi/dir-auto/dir_auto-textarea-script-N-EN-ref.html tests/submission/html5bidi/dir-auto/dir_auto-textarea-script-N-EN.html tests/submission/html5bidi/dir-auto/dir_auto-textarea-script-N-between-Rs-ref.html tests/submission/html5bidi/dir-auto/dir_auto-textarea-script-N-between-Rs.html tests/submission/html5bidi/dir-auto/dir_auto-textarea-script-mixed-ref.html tests/submission/html5bidi/dir-auto/dir_auto-textarea-script-mixed.html
diffstat 104 files changed, 6286 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tests/submission/html5bidi/br/br-bidi-in-inline-ancestors-ref.html	Sun Feb 19 10:38:29 2012 +0200
     1.3 @@ -0,0 +1,38 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +  <head>
     1.7 +    <meta charset="utf-8" />
     1.8 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"/>
     1.9 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
    1.10 +    <style>
    1.11 +      body{
    1.12 +        font-size:2em;
    1.13 +      }
    1.14 +      .test, .ref {
    1.15 +        border: medium solid gray;
    1.16 +        width: 400px;
    1.17 +        margin: 20px;
    1.18 +      }
    1.19 +      .comments { display: none; }
    1.20 +    </style>
    1.21 +  </head>
    1.22 +  <body>
    1.23 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
    1.24 +    <div class="comments">
    1.25 +      Key to entities used below:
    1.26 +        &#x05D0; ... &#x05D8; - The first nine Hebrew letters (strongly RTL).
    1.27 +        &#x202D; - The LRO (left-to-right override) formatting character.
    1.28 +        &#x202C; - The PDF (pop directional formatting) formatting character; closes LRO.
    1.29 +    </div>
    1.30 +    <div class="test">
    1.31 +      &#x202D;&#x05D0;&#x05D1; &#x05D2;&#x05D3; 1. I like &#x05D4;. fg hi&#x202C;
    1.32 +      <br/>
    1.33 +      &#x202D;ab cd 2. &#x05D4; is great! &#x05D5;&#x05D6; &#x05D7;&#x05D8;&#x202C;
    1.34 +    </div>
    1.35 +    <div class="ref">
    1.36 +      &#x202D;&#x05D0;&#x05D1; &#x05D2;&#x05D3; 1. I like &#x05D4;. fg hi&#x202C;
    1.37 +      <br/>
    1.38 +      &#x202D;ab cd 2. &#x05D4; is great! &#x05D5;&#x05D6; &#x05D7;&#x05D8;&#x202C;
    1.39 +    </div>
    1.40 +  </body>
    1.41 +</html>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tests/submission/html5bidi/br/br-bidi-in-inline-ancestors.html	Sun Feb 19 10:38:29 2012 +0200
     2.3 @@ -0,0 +1,59 @@
     2.4 +<!DOCTYPE html>
     2.5 +<html>
     2.6 +  <head>
     2.7 +    <meta charset="utf-8" />
     2.8 +    <title>HTML Test: BR in inline ancestors</title>
     2.9 +    <link rel="reference" href="br-bidi-in-inline-ancestors-ref.html" />
    2.10 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com"/>
    2.11 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
    2.12 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-br-element"/>
    2.13 +    <link rel="help" href="http://www.w3.org/TR/css3-writing-modes/#unicode-bidi" />
    2.14 +    <meta name="assert" content="
    2.15 +      'A br element should separate paragraphs for the purposes of the Unicode bidirectional
    2.16 +      algorithm.'
    2.17 +      'If an inline element is broken around a bidi paragraph boundary (e.g. if split by a block or
    2.18 +      forced paragraph break), then the bidi control codes corresponding to the end of the element
    2.19 +      are added before the interruption and the codes corresponding to the start of the element are
    2.20 +      added after it. (In other words, any embedding levels or overrides started by the element are
    2.21 +      closed at the paragraph break and reopened on the other side of it.)'" />
    2.22 +    <style>
    2.23 +      body{
    2.24 +        font-size:2em;
    2.25 +      }
    2.26 +      .test, .ref {
    2.27 +        border: medium solid gray;
    2.28 +        width: 400px;
    2.29 +        margin: 20px;
    2.30 +      }
    2.31 +      .comments { display: none; }
    2.32 +    </style>
    2.33 +  </head>
    2.34 +  <body>
    2.35 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
    2.36 +    <div class="comments">
    2.37 +      Key to entities used below:
    2.38 +        &#x05D0; ... &#x05D8; - The first nine Hebrew letters (strongly RTL).
    2.39 +        &#x200E; - The LRM (left-to-right mark) formatting character (invisible, stronly LTR).
    2.40 +        &#x2005; - The RLM (right-to-left mark) formatting character (invisible, stronly RTL).
    2.41 +        &#x202D; - The LRO (left-to-right override) formatting character.
    2.42 +        &#x202C; - The PDF (pop directional formatting) formatting character; closes LRO.
    2.43 +    </div>
    2.44 +    <div class="test">
    2.45 +      &#x05D1;&#x05D0;&#x200E;
    2.46 +      <bdo dir="rtl">ih
    2.47 +        <bdo dir="ltr">&#x05D2;&#x05D3;
    2.48 +          <span dir="rtl">fg&#x200F;
    2.49 +            <span dir="ltr">1. I like &#x05D4;.<br/>
    2.50 +              2. &#x05D4; is great!</span>
    2.51 +            &#x200F;cd</span>
    2.52 +          &#x05D5;&#x05D6;</bdo>
    2.53 +        ba</bdo>
    2.54 +      &#x200E;&#x05D8;&#x05D7;
    2.55 +    </div>
    2.56 +    <div class="ref">
    2.57 +      &#x202D;&#x05D0;&#x05D1; &#x05D2;&#x05D3; 1. I like &#x05D4;. fg hi&#x202C;
    2.58 +      <br/>
    2.59 +      &#x202D;ab cd 2. &#x05D4; is great! &#x05D5;&#x05D6; &#x05D7;&#x05D8;&#x202C;
    2.60 +    </div>
    2.61 +  </body>
    2.62 +</html>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-EN-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
     3.3 @@ -0,0 +1,58 @@
     3.4 +<!DOCTYPE html>
     3.5 +<html>
     3.6 +  <head>
     3.7 +    <meta charset="utf-8" />
     3.8 +    <title>HTML Test: dir=auto, start with EN, then L</title>
     3.9 +    <link rel="reference" href="dir_auto-EN-L-ref.html" />
    3.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
    3.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
    3.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
    3.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
    3.14 +    <meta name="assert" content="
    3.15 +      When dir='auto', the direction is set according to the first strong character
    3.16 +      of the text.
    3.17 +      In this test, it is the Latin letter A since digits are not strongly
    3.18 +      directional, thus the direction must be resolved as LTR." />
    3.19 +    <style>
    3.20 +      input, textarea {
    3.21 +        font-size:1em;
    3.22 +      }
    3.23 +      body {
    3.24 +        font-size:2em;
    3.25 +      }
    3.26 +      .test, .ref {
    3.27 +        border: medium solid gray;
    3.28 +        width: 400px;
    3.29 +        margin: 20px;
    3.30 +      }
    3.31 +      .comments {
    3.32 +        display: none;
    3.33 +      }
    3.34 +    </style>
    3.35 +  </head>
    3.36 +  <body>
    3.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
    3.38 +    <div class="comments">
    3.39 +      Key to entities used below:
    3.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
    3.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
    3.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
    3.43 +    </div>
    3.44 +    <div class="test">
    3.45 +      <div dir="ltr">
    3.46 +        <p dir="ltr">123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    3.47 +      </div>
    3.48 +      <div dir="rtl">
    3.49 +        <p dir="ltr">123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    3.50 +      </div>
    3.51 +    </div>
    3.52 +    <div class="ref">
    3.53 +      <div dir="ltr">
    3.54 +        <p dir="ltr">123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    3.55 +      </div>
    3.56 +      <div dir="rtl">
    3.57 +        <p dir="ltr">123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    3.58 +      </div>
    3.59 +    </div>
    3.60 +  </body>
    3.61 +</html>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-EN-L.html	Sun Feb 19 10:38:29 2012 +0200
     4.3 @@ -0,0 +1,58 @@
     4.4 +<!DOCTYPE html>
     4.5 +<html>
     4.6 +  <head>
     4.7 +    <meta charset="utf-8" />
     4.8 +    <title>HTML Test: dir=auto, start with EN, then L</title>
     4.9 +    <link rel="reference" href="dir_auto-EN-L-ref.html" />
    4.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
    4.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
    4.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
    4.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
    4.14 +    <meta name="assert" content="
    4.15 +      When dir='auto', the direction is set according to the first strong character
    4.16 +      of the text.
    4.17 +      In this test, it is the Latin letter A since digits are not strongly
    4.18 +      directional, thus the direction must be resolved as LTR." />
    4.19 +    <style>
    4.20 +      input, textarea {
    4.21 +        font-size:1em;
    4.22 +      }
    4.23 +      body {
    4.24 +        font-size:2em;
    4.25 +      }
    4.26 +      .test, .ref {
    4.27 +        border: medium solid gray;
    4.28 +        width: 400px;
    4.29 +        margin: 20px;
    4.30 +      }
    4.31 +      .comments {
    4.32 +        display: none;
    4.33 +      }
    4.34 +    </style>
    4.35 +  </head>
    4.36 +  <body>
    4.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
    4.38 +    <div class="comments">
    4.39 +      Key to entities used below:
    4.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
    4.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
    4.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
    4.43 +    </div>
    4.44 +    <div class="test">
    4.45 +      <div dir="ltr">
    4.46 +        <p dir="auto">123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    4.47 +      </div>
    4.48 +      <div dir="rtl">
    4.49 +        <p dir="auto">123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    4.50 +      </div>
    4.51 +    </div>
    4.52 +    <div class="ref">
    4.53 +      <div dir="ltr">
    4.54 +        <p dir="ltr">123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    4.55 +      </div>
    4.56 +      <div dir="rtl">
    4.57 +        <p dir="ltr">123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    4.58 +      </div>
    4.59 +    </div>
    4.60 +  </body>
    4.61 +</html>
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-EN-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
     5.3 @@ -0,0 +1,58 @@
     5.4 +<!DOCTYPE html>
     5.5 +<html>
     5.6 +  <head>
     5.7 +    <meta charset="utf-8" />
     5.8 +    <title>HTML Test: dir=auto, start with EN, then R</title>
     5.9 +    <link rel="reference" href="dir_auto-EN-R-ref.html" />
    5.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
    5.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
    5.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
    5.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
    5.14 +    <meta name="assert" content="
    5.15 +      When dir='auto', the direction is set according to the first strong character
    5.16 +      of the text.
    5.17 +      In this test, it is the Hebrew letter Alef since digits are not strongly
    5.18 +      directional, thus the direction must be resolved as RTL." />
    5.19 +    <style>
    5.20 +      input, textarea {
    5.21 +        font-size:1em;
    5.22 +      }
    5.23 +      body {
    5.24 +        font-size:2em;
    5.25 +      }
    5.26 +      .test, .ref {
    5.27 +        border: medium solid gray;
    5.28 +        width: 400px;
    5.29 +        margin: 20px;
    5.30 +      }
    5.31 +      .comments {
    5.32 +        display: none;
    5.33 +      }
    5.34 +    </style>
    5.35 +  </head>
    5.36 +  <body>
    5.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
    5.38 +    <div class="comments">
    5.39 +      Key to entities used below:
    5.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
    5.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
    5.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
    5.43 +    </div>
    5.44 +    <div class="test">
    5.45 +      <div dir="ltr">
    5.46 +        <p dir="rtl">123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
    5.47 +      </div>
    5.48 +      <div dir="rtl">
    5.49 +        <p dir="rtl">123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
    5.50 +      </div>
    5.51 +    </div>
    5.52 +    <div class="ref">
    5.53 +      <div dir="ltr">
    5.54 +        <p dir="rtl">123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
    5.55 +      </div>
    5.56 +      <div dir="rtl">
    5.57 +        <p dir="rtl">123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
    5.58 +      </div>
    5.59 +    </div>
    5.60 +  </body>
    5.61 +</html>
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-EN-R.html	Sun Feb 19 10:38:29 2012 +0200
     6.3 @@ -0,0 +1,58 @@
     6.4 +<!DOCTYPE html>
     6.5 +<html>
     6.6 +  <head>
     6.7 +    <meta charset="utf-8" />
     6.8 +    <title>HTML Test: dir=auto, start with EN, then R</title>
     6.9 +    <link rel="reference" href="dir_auto-EN-R-ref.html" />
    6.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
    6.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
    6.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
    6.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
    6.14 +    <meta name="assert" content="
    6.15 +      When dir='auto', the direction is set according to the first strong character
    6.16 +      of the text.
    6.17 +      In this test, it is the Hebrew letter Alef since digits are not strongly
    6.18 +      directional, thus the direction must be resolved as RTL." />
    6.19 +    <style>
    6.20 +      input, textarea {
    6.21 +        font-size:1em;
    6.22 +      }
    6.23 +      body {
    6.24 +        font-size:2em;
    6.25 +      }
    6.26 +      .test, .ref {
    6.27 +        border: medium solid gray;
    6.28 +        width: 400px;
    6.29 +        margin: 20px;
    6.30 +      }
    6.31 +      .comments {
    6.32 +        display: none;
    6.33 +      }
    6.34 +    </style>
    6.35 +  </head>
    6.36 +  <body>
    6.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
    6.38 +    <div class="comments">
    6.39 +      Key to entities used below:
    6.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
    6.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
    6.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
    6.43 +    </div>
    6.44 +    <div class="test">
    6.45 +      <div dir="ltr">
    6.46 +        <p dir="auto">123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
    6.47 +      </div>
    6.48 +      <div dir="rtl">
    6.49 +        <p dir="auto">123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
    6.50 +      </div>
    6.51 +    </div>
    6.52 +    <div class="ref">
    6.53 +      <div dir="ltr">
    6.54 +        <p dir="rtl">123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
    6.55 +      </div>
    6.56 +      <div dir="rtl">
    6.57 +        <p dir="rtl">123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
    6.58 +      </div>
    6.59 +    </div>
    6.60 +  </body>
    6.61 +</html>
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
     7.3 @@ -0,0 +1,58 @@
     7.4 +<!DOCTYPE html>
     7.5 +<html>
     7.6 +  <head>
     7.7 +    <meta charset="utf-8" />
     7.8 +    <title>HTML Test: dir=auto, start with L</title>
     7.9 +    <link rel="reference" href="dir_auto-L-ref.html" />
    7.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
    7.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
    7.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
    7.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
    7.14 +    <meta name="assert" content="
    7.15 +      When dir='auto', the direction is set according to the first strong character
    7.16 +      of the text.
    7.17 +      In this test, it is the Latin letter A, thus the direction must be
    7.18 +      resolved as LTR." />
    7.19 +    <style>
    7.20 +      input, textarea {
    7.21 +        font-size:1em;
    7.22 +      }
    7.23 +      body {
    7.24 +        font-size:2em;
    7.25 +      }
    7.26 +      .test, .ref {
    7.27 +        border: medium solid gray;
    7.28 +        width: 400px;
    7.29 +        margin: 20px;
    7.30 +      }
    7.31 +      .comments {
    7.32 +        display: none;
    7.33 +      }
    7.34 +    </style>
    7.35 +  </head>
    7.36 +  <body>
    7.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
    7.38 +    <div class="comments">
    7.39 +      Key to entities used below:
    7.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
    7.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
    7.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
    7.43 +    </div>
    7.44 +    <div class="test">
    7.45 +      <div dir="ltr">
    7.46 +        <p dir="ltr">ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    7.47 +      </div>
    7.48 +      <div dir="rtl">
    7.49 +        <p dir="ltr">ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    7.50 +      </div>
    7.51 +    </div>
    7.52 +    <div class="ref">
    7.53 +      <div dir="ltr">
    7.54 +        <p dir="ltr">ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    7.55 +      </div>
    7.56 +      <div dir="rtl">
    7.57 +        <p dir="ltr">ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    7.58 +      </div>
    7.59 +    </div>
    7.60 +  </body>
    7.61 +</html>
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-L.html	Sun Feb 19 10:38:29 2012 +0200
     8.3 @@ -0,0 +1,58 @@
     8.4 +<!DOCTYPE html>
     8.5 +<html>
     8.6 +  <head>
     8.7 +    <meta charset="utf-8" />
     8.8 +    <title>HTML Test: dir=auto, start with L</title>
     8.9 +    <link rel="reference" href="dir_auto-L-ref.html" />
    8.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
    8.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
    8.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
    8.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
    8.14 +    <meta name="assert" content="
    8.15 +      When dir='auto', the direction is set according to the first strong character
    8.16 +      of the text.
    8.17 +      In this test, it is the Latin letter A, thus the direction must be
    8.18 +      resolved as LTR." />
    8.19 +    <style>
    8.20 +      input, textarea {
    8.21 +        font-size:1em;
    8.22 +      }
    8.23 +      body {
    8.24 +        font-size:2em;
    8.25 +      }
    8.26 +      .test, .ref {
    8.27 +        border: medium solid gray;
    8.28 +        width: 400px;
    8.29 +        margin: 20px;
    8.30 +      }
    8.31 +      .comments {
    8.32 +        display: none;
    8.33 +      }
    8.34 +    </style>
    8.35 +  </head>
    8.36 +  <body>
    8.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
    8.38 +    <div class="comments">
    8.39 +      Key to entities used below:
    8.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
    8.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
    8.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
    8.43 +    </div>
    8.44 +    <div class="test">
    8.45 +      <div dir="ltr">
    8.46 +        <p dir="auto">ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    8.47 +      </div>
    8.48 +      <div dir="rtl">
    8.49 +        <p dir="auto">ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    8.50 +      </div>
    8.51 +    </div>
    8.52 +    <div class="ref">
    8.53 +      <div dir="ltr">
    8.54 +        <p dir="ltr">ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    8.55 +      </div>
    8.56 +      <div dir="rtl">
    8.57 +        <p dir="ltr">ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    8.58 +      </div>
    8.59 +    </div>
    8.60 +  </body>
    8.61 +</html>
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-N-EN-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
     9.3 @@ -0,0 +1,58 @@
     9.4 +<!DOCTYPE html>
     9.5 +<html>
     9.6 +  <head>
     9.7 +    <meta charset="utf-8" />
     9.8 +    <title>HTML Test: dir=auto, start with N, then EN, then L</title>
     9.9 +    <link rel="reference" href="dir_auto-N-EN-L-ref.html" />
    9.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
    9.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
    9.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
    9.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
    9.14 +    <meta name="assert" content="
    9.15 +      When dir='auto', the direction is set according to the first strong character
    9.16 +      of the text.
    9.17 +      In this test, it is the Latin letter A since neutrals and digits are not
    9.18 +      strongly directional, thus the direction must be resolved as LTR." />
    9.19 +    <style>
    9.20 +      input, textarea {
    9.21 +        font-size:1em;
    9.22 +      }
    9.23 +      body {
    9.24 +        font-size:2em;
    9.25 +      }
    9.26 +      .test, .ref {
    9.27 +        border: medium solid gray;
    9.28 +        width: 400px;
    9.29 +        margin: 20px;
    9.30 +      }
    9.31 +      .comments {
    9.32 +        display: none;
    9.33 +      }
    9.34 +    </style>
    9.35 +  </head>
    9.36 +  <body>
    9.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
    9.38 +    <div class="comments">
    9.39 +      Key to entities used below:
    9.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
    9.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
    9.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
    9.43 +    </div>
    9.44 +    <div class="test">
    9.45 +      <div dir="ltr">
    9.46 +        <p dir="ltr">.-=123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    9.47 +      </div>
    9.48 +      <div dir="rtl">
    9.49 +        <p dir="ltr">.-=123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    9.50 +      </div>
    9.51 +    </div>
    9.52 +    <div class="ref">
    9.53 +      <div dir="ltr">
    9.54 +        <p dir="ltr">.-=123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    9.55 +      </div>
    9.56 +      <div dir="rtl">
    9.57 +        <p dir="ltr">.-=123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
    9.58 +      </div>
    9.59 +    </div>
    9.60 +  </body>
    9.61 +</html>
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-N-EN-L.html	Sun Feb 19 10:38:29 2012 +0200
    10.3 @@ -0,0 +1,58 @@
    10.4 +<!DOCTYPE html>
    10.5 +<html>
    10.6 +  <head>
    10.7 +    <meta charset="utf-8" />
    10.8 +    <title>HTML Test: dir=auto, start with N, then EN, then L</title>
    10.9 +    <link rel="reference" href="dir_auto-N-EN-L-ref.html" />
   10.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   10.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   10.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   10.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   10.14 +    <meta name="assert" content="
   10.15 +      When dir='auto', the direction is set according to the first strong character
   10.16 +      of the text.
   10.17 +      In this test, it is the Latin letter A since neutrals and digits are not
   10.18 +      strongly directional, thus the direction must be resolved as LTR." />
   10.19 +    <style>
   10.20 +      input, textarea {
   10.21 +        font-size:1em;
   10.22 +      }
   10.23 +      body {
   10.24 +        font-size:2em;
   10.25 +      }
   10.26 +      .test, .ref {
   10.27 +        border: medium solid gray;
   10.28 +        width: 400px;
   10.29 +        margin: 20px;
   10.30 +      }
   10.31 +      .comments {
   10.32 +        display: none;
   10.33 +      }
   10.34 +    </style>
   10.35 +  </head>
   10.36 +  <body>
   10.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   10.38 +    <div class="comments">
   10.39 +      Key to entities used below:
   10.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   10.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   10.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   10.43 +    </div>
   10.44 +    <div class="test">
   10.45 +      <div dir="ltr">
   10.46 +        <p dir="auto">.-=123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
   10.47 +      </div>
   10.48 +      <div dir="rtl">
   10.49 +        <p dir="auto">.-=123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
   10.50 +      </div>
   10.51 +    </div>
   10.52 +    <div class="ref">
   10.53 +      <div dir="ltr">
   10.54 +        <p dir="ltr">.-=123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
   10.55 +      </div>
   10.56 +      <div dir="rtl">
   10.57 +        <p dir="ltr">.-=123ABC&#x05D0;&#x05D1;&#x05D2;.</p>
   10.58 +      </div>
   10.59 +    </div>
   10.60 +  </body>
   10.61 +</html>
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-N-EN-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    11.3 @@ -0,0 +1,58 @@
    11.4 +<!DOCTYPE html>
    11.5 +<html>
    11.6 +  <head>
    11.7 +    <meta charset="utf-8" />
    11.8 +    <title>HTML Test: dir=auto, start with N, then EN, then R</title>
    11.9 +    <link rel="reference" href="dir_auto-N-EN-R-ref.html" />
   11.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   11.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   11.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   11.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   11.14 +    <meta name="assert" content="
   11.15 +      When dir='auto', the direction is set according to the first strong character
   11.16 +      of the text.
   11.17 +      In this test, it is the Hebrew letter Alef since neutrals and digits are not
   11.18 +      strongly directional, thus the direction must be resolved as RTL." />
   11.19 +    <style>
   11.20 +      input, textarea {
   11.21 +        font-size:1em;
   11.22 +      }
   11.23 +      body {
   11.24 +        font-size:2em;
   11.25 +      }
   11.26 +      .test, .ref {
   11.27 +        border: medium solid gray;
   11.28 +        width: 400px;
   11.29 +        margin: 20px;
   11.30 +      }
   11.31 +      .comments {
   11.32 +        display: none;
   11.33 +      }
   11.34 +    </style>
   11.35 +  </head>
   11.36 +  <body>
   11.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   11.38 +    <div class="comments">
   11.39 +      Key to entities used below:
   11.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   11.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   11.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   11.43 +    </div>
   11.44 +    <div class="test">
   11.45 +      <div dir="ltr">
   11.46 +        <p dir="rtl">.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   11.47 +      </div>
   11.48 +      <div dir="rtl">
   11.49 +        <p dir="rtl">.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   11.50 +      </div>
   11.51 +    </div>
   11.52 +    <div class="ref">
   11.53 +      <div dir="ltr">
   11.54 +        <p dir="rtl">.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   11.55 +      </div>
   11.56 +      <div dir="rtl">
   11.57 +        <p dir="rtl">.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   11.58 +      </div>
   11.59 +    </div>
   11.60 +  </body>
   11.61 +</html>
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-N-EN-R.html	Sun Feb 19 10:38:29 2012 +0200
    12.3 @@ -0,0 +1,58 @@
    12.4 +<!DOCTYPE html>
    12.5 +<html>
    12.6 +  <head>
    12.7 +    <meta charset="utf-8" />
    12.8 +    <title>HTML Test: dir=auto, start with N, then EN, then R</title>
    12.9 +    <link rel="reference" href="dir_auto-N-EN-R-ref.html" />
   12.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   12.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   12.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   12.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   12.14 +    <meta name="assert" content="
   12.15 +      When dir='auto', the direction is set according to the first strong character
   12.16 +      of the text.
   12.17 +      In this test, it is the Hebrew letter Alef since neutrals and digits are not
   12.18 +      strongly directional, thus the direction must be resolved as RTL." />
   12.19 +    <style>
   12.20 +      input, textarea {
   12.21 +        font-size:1em;
   12.22 +      }
   12.23 +      body {
   12.24 +        font-size:2em;
   12.25 +      }
   12.26 +      .test, .ref {
   12.27 +        border: medium solid gray;
   12.28 +        width: 400px;
   12.29 +        margin: 20px;
   12.30 +      }
   12.31 +      .comments {
   12.32 +        display: none;
   12.33 +      }
   12.34 +    </style>
   12.35 +  </head>
   12.36 +  <body>
   12.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   12.38 +    <div class="comments">
   12.39 +      Key to entities used below:
   12.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   12.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   12.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   12.43 +    </div>
   12.44 +    <div class="test">
   12.45 +      <div dir="ltr">
   12.46 +        <p dir="auto">.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   12.47 +      </div>
   12.48 +      <div dir="rtl">
   12.49 +        <p dir="auto">.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   12.50 +      </div>
   12.51 +    </div>
   12.52 +    <div class="ref">
   12.53 +      <div dir="ltr">
   12.54 +        <p dir="rtl">.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   12.55 +      </div>
   12.56 +      <div dir="rtl">
   12.57 +        <p dir="rtl">.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   12.58 +      </div>
   12.59 +    </div>
   12.60 +  </body>
   12.61 +</html>
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-N-EN-ref.html	Sun Feb 19 10:38:29 2012 +0200
    13.3 @@ -0,0 +1,51 @@
    13.4 +<!DOCTYPE html>
    13.5 +<html>
    13.6 +  <head>
    13.7 +    <meta charset="utf-8" />
    13.8 +    <title>HTML Test: dir=auto, start with N, then EN, then L</title>
    13.9 +    <link rel="reference" href="dir_auto-N-EN-L-ref.html" />
   13.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   13.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   13.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   13.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   13.14 +    <meta name="assert" content="
   13.15 +      When dir='auto', the direction is set according to the first strong character
   13.16 +      of the text, ignoring neutrals and numbers.
   13.17 +      If there is no strong character, as in this test, the direction defaults to LTR." />
   13.18 +    <style>
   13.19 +      input, textarea {
   13.20 +        font-size:1em;
   13.21 +      }
   13.22 +      body {
   13.23 +        font-size:2em;
   13.24 +      }
   13.25 +      .test, .ref {
   13.26 +        border: medium solid gray;
   13.27 +        width: 400px;
   13.28 +        margin: 20px;
   13.29 +      }
   13.30 +      .comments {
   13.31 +        display: none;
   13.32 +      }
   13.33 +    </style>
   13.34 +  </head>
   13.35 +  <body>
   13.36 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   13.37 +    <div class="test">
   13.38 +      <div dir="ltr">
   13.39 +        <p dir="ltr">@123!</p>
   13.40 +      </div>
   13.41 +      <div dir="rtl">
   13.42 +        <p dir="ltr">@123!</p>
   13.43 +      </div>
   13.44 +    </div>
   13.45 +    <div class="ref">
   13.46 +      <div dir="ltr">
   13.47 +        <p dir="ltr">@123!</p>
   13.48 +      </div>
   13.49 +      <div dir="rtl">
   13.50 +        <p dir="ltr">@123!</p>
   13.51 +      </div>
   13.52 +    </div>
   13.53 +  </body>
   13.54 +</html>
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-N-EN.html	Sun Feb 19 10:38:29 2012 +0200
    14.3 @@ -0,0 +1,51 @@
    14.4 +<!DOCTYPE html>
    14.5 +<html>
    14.6 +  <head>
    14.7 +    <meta charset="utf-8" />
    14.8 +    <title>HTML Test: dir=auto, start with N, then EN, then L</title>
    14.9 +    <link rel="reference" href="dir_auto-N-EN-L-ref.html" />
   14.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   14.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   14.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   14.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   14.14 +    <meta name="assert" content="
   14.15 +      When dir='auto', the direction is set according to the first strong character
   14.16 +      of the text, ignoring neutrals and numbers.
   14.17 +      If there is no strong character, as in this test, the direction defaults to LTR." />
   14.18 +    <style>
   14.19 +      input, textarea {
   14.20 +        font-size:1em;
   14.21 +      }
   14.22 +      body {
   14.23 +        font-size:2em;
   14.24 +      }
   14.25 +      .test, .ref {
   14.26 +        border: medium solid gray;
   14.27 +        width: 400px;
   14.28 +        margin: 20px;
   14.29 +      }
   14.30 +      .comments {
   14.31 +        display: none;
   14.32 +      }
   14.33 +    </style>
   14.34 +  </head>
   14.35 +  <body>
   14.36 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   14.37 +    <div class="test">
   14.38 +      <div dir="ltr">
   14.39 +        <p dir="auto">@123!</p>
   14.40 +      </div>
   14.41 +      <div dir="rtl">
   14.42 +        <p dir="auto">@123!</p>
   14.43 +      </div>
   14.44 +    </div>
   14.45 +    <div class="ref">
   14.46 +      <div dir="ltr">
   14.47 +        <p dir="ltr">@123!</p>
   14.48 +      </div>
   14.49 +      <div dir="rtl">
   14.50 +        <p dir="ltr">@123!</p>
   14.51 +      </div>
   14.52 +    </div>
   14.53 +  </body>
   14.54 +</html>
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-N-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    15.3 @@ -0,0 +1,58 @@
    15.4 +<!DOCTYPE html>
    15.5 +<html>
    15.6 +  <head>
    15.7 +    <meta charset="utf-8" />
    15.8 +    <title>HTML Test: dir=auto, start with N, then L</title>
    15.9 +    <link rel="reference" href="dir_auto-N-L-ref.html" />
   15.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   15.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   15.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   15.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   15.14 +    <meta name="assert" content="
   15.15 +      When dir='auto', the direction is set according to the first strong character
   15.16 +      of the text.
   15.17 +      In this test, it is the Latin letter A since neutrals are not
   15.18 +      strongly directional, thus the direction must be resolved as LTR." />
   15.19 +    <style>
   15.20 +      input, textarea {
   15.21 +        font-size:1em;
   15.22 +      }
   15.23 +      body {
   15.24 +        font-size:2em;
   15.25 +      }
   15.26 +      .test, .ref {
   15.27 +        border: medium solid gray;
   15.28 +        width: 400px;
   15.29 +        margin: 20px;
   15.30 +      }
   15.31 +      .comments {
   15.32 +        display: none;
   15.33 +      }
   15.34 +    </style>
   15.35 +  </head>
   15.36 +  <body>
   15.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   15.38 +    <div class="comments">
   15.39 +      Key to entities used below:
   15.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   15.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   15.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   15.43 +    </div>
   15.44 +    <div class="test">
   15.45 +      <div dir="ltr">
   15.46 +        <p dir="ltr">.-=ABC&#x05D0;&#x05D1;&#x05D2;.</p>
   15.47 +      </div>
   15.48 +      <div dir="rtl">
   15.49 +        <p dir="ltr">.-=ABC&#x05D0;&#x05D1;&#x05D2;.</p>
   15.50 +      </div>
   15.51 +    </div>
   15.52 +    <div class="ref">
   15.53 +      <div dir="ltr">
   15.54 +        <p dir="ltr">.-=ABC&#x05D0;&#x05D1;&#x05D2;.</p>
   15.55 +      </div>
   15.56 +      <div dir="rtl">
   15.57 +        <p dir="ltr">.-=ABC&#x05D0;&#x05D1;&#x05D2;.</p>
   15.58 +      </div>
   15.59 +    </div>
   15.60 +  </body>
   15.61 +</html>
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-N-L.html	Sun Feb 19 10:38:29 2012 +0200
    16.3 @@ -0,0 +1,58 @@
    16.4 +<!DOCTYPE html>
    16.5 +<html>
    16.6 +  <head>
    16.7 +    <meta charset="utf-8" />
    16.8 +    <title>HTML Test: dir=auto, start with N, then L</title>
    16.9 +    <link rel="reference" href="dir_auto-N-L-ref.html" />
   16.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   16.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   16.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   16.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   16.14 +    <meta name="assert" content="
   16.15 +      When dir='auto', the direction is set according to the first strong character
   16.16 +      of the text.
   16.17 +      In this test, it is the Latin letter A since neutrals are not
   16.18 +      strongly directional, thus the direction must be resolved as LTR." />
   16.19 +    <style>
   16.20 +      input, textarea {
   16.21 +        font-size:1em;
   16.22 +      }
   16.23 +      body {
   16.24 +        font-size:2em;
   16.25 +      }
   16.26 +      .test, .ref {
   16.27 +        border: medium solid gray;
   16.28 +        width: 400px;
   16.29 +        margin: 20px;
   16.30 +      }
   16.31 +      .comments {
   16.32 +        display: none;
   16.33 +      }
   16.34 +    </style>
   16.35 +  </head>
   16.36 +  <body>
   16.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   16.38 +    <div class="comments">
   16.39 +      Key to entities used below:
   16.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   16.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   16.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   16.43 +    </div>
   16.44 +    <div class="test">
   16.45 +      <div dir="ltr">
   16.46 +        <p dir="auto">.-=ABC&#x05D0;&#x05D1;&#x05D2;.</p>
   16.47 +      </div>
   16.48 +      <div dir="rtl">
   16.49 +        <p dir="auto">.-=ABC&#x05D0;&#x05D1;&#x05D2;.</p>
   16.50 +      </div>
   16.51 +    </div>
   16.52 +    <div class="ref">
   16.53 +      <div dir="ltr">
   16.54 +        <p dir="ltr">.-=ABC&#x05D0;&#x05D1;&#x05D2;.</p>
   16.55 +      </div>
   16.56 +      <div dir="rtl">
   16.57 +        <p dir="ltr">.-=ABC&#x05D0;&#x05D1;&#x05D2;.</p>
   16.58 +      </div>
   16.59 +    </div>
   16.60 +  </body>
   16.61 +</html>
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-N-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    17.3 @@ -0,0 +1,58 @@
    17.4 +<!DOCTYPE html>
    17.5 +<html>
    17.6 +  <head>
    17.7 +    <meta charset="utf-8" />
    17.8 +    <title>HTML Test: dir=auto, start with N, then R</title>
    17.9 +    <link rel="reference" href="dir_auto-N-R-ref.html" />
   17.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   17.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   17.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   17.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   17.14 +    <meta name="assert" content="
   17.15 +      When dir='auto', the direction is set according to the first strong character
   17.16 +      of the text.
   17.17 +      In this test, it is the Hebrew letter Alef since neutrals are not
   17.18 +      strongly directional, thus the direction must be resolved as RTL." />
   17.19 +    <style>
   17.20 +      input, textarea {
   17.21 +        font-size:1em;
   17.22 +      }
   17.23 +      body {
   17.24 +        font-size:2em;
   17.25 +      }
   17.26 +      .test, .ref {
   17.27 +        border: medium solid gray;
   17.28 +        width: 400px;
   17.29 +        margin: 20px;
   17.30 +      }
   17.31 +      .comments {
   17.32 +        display: none;
   17.33 +      }
   17.34 +    </style>
   17.35 +  </head>
   17.36 +  <body>
   17.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   17.38 +    <div class="comments">
   17.39 +      Key to entities used below:
   17.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   17.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   17.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   17.43 +    </div>
   17.44 +    <div class="test">
   17.45 +      <div dir="ltr">
   17.46 +        <p dir="rtl">.-=&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   17.47 +      </div>
   17.48 +      <div dir="rtl">
   17.49 +        <p dir="rtl">.-=&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   17.50 +      </div>
   17.51 +    </div>
   17.52 +    <div class="ref">
   17.53 +      <div dir="ltr">
   17.54 +        <p dir="rtl">.-=&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   17.55 +      </div>
   17.56 +      <div dir="rtl">
   17.57 +        <p dir="rtl">.-=&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   17.58 +      </div>
   17.59 +    </div>
   17.60 +  </body>
   17.61 +</html>
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-N-R.html	Sun Feb 19 10:38:29 2012 +0200
    18.3 @@ -0,0 +1,58 @@
    18.4 +<!DOCTYPE html>
    18.5 +<html>
    18.6 +  <head>
    18.7 +    <meta charset="utf-8" />
    18.8 +    <title>HTML Test: dir=auto, start with N, then R</title>
    18.9 +    <link rel="reference" href="dir_auto-N-R-ref.html" />
   18.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   18.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   18.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   18.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   18.14 +    <meta name="assert" content="
   18.15 +      When dir='auto', the direction is set according to the first strong character
   18.16 +      of the text.
   18.17 +      In this test, it is the Hebrew letter Alef since neutrals are not
   18.18 +      strongly directional, thus the direction must be resolved as RTL." />
   18.19 +    <style>
   18.20 +      input, textarea {
   18.21 +        font-size:1em;
   18.22 +      }
   18.23 +      body {
   18.24 +        font-size:2em;
   18.25 +      }
   18.26 +      .test, .ref {
   18.27 +        border: medium solid gray;
   18.28 +        width: 400px;
   18.29 +        margin: 20px;
   18.30 +      }
   18.31 +      .comments {
   18.32 +        display: none;
   18.33 +      }
   18.34 +    </style>
   18.35 +  </head>
   18.36 +  <body>
   18.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   18.38 +    <div class="comments">
   18.39 +      Key to entities used below:
   18.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   18.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   18.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   18.43 +    </div>
   18.44 +    <div class="test">
   18.45 +      <div dir="ltr">
   18.46 +        <p dir="auto">.-=&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   18.47 +      </div>
   18.48 +      <div dir="rtl">
   18.49 +        <p dir="auto">.-=&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   18.50 +      </div>
   18.51 +    </div>
   18.52 +    <div class="ref">
   18.53 +      <div dir="ltr">
   18.54 +        <p dir="rtl">.-=&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   18.55 +      </div>
   18.56 +      <div dir="rtl">
   18.57 +        <p dir="rtl">.-=&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   18.58 +      </div>
   18.59 +    </div>
   18.60 +  </body>
   18.61 +</html>
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    19.3 @@ -0,0 +1,59 @@
    19.4 +<!DOCTYPE html>
    19.5 +<html>
    19.6 +  <head>
    19.7 +    <meta charset="utf-8" />
    19.8 +    <title>HTML Test: dir=auto, start with R</title>
    19.9 +    <link rel="reference" href="dir_auto-R-ref.html" />
   19.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   19.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   19.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   19.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   19.14 +    <meta name="assert" content="
   19.15 +      When dir='auto', the direction is set according to the first strong character
   19.16 +      of the text.
   19.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   19.18 +      resolved as RTL." />
   19.19 +    <style>
   19.20 +      input, textarea {
   19.21 +        font-size:1em;
   19.22 +      }
   19.23 +      body {
   19.24 +        font-size:2em;
   19.25 +      }
   19.26 +      .test, .ref {
   19.27 +        border: medium solid gray;
   19.28 +        width: 400px;
   19.29 +        margin: 20px;
   19.30 +      }
   19.31 +      .comments {
   19.32 +        display: none;
   19.33 +      }
   19.34 +    </style>
   19.35 +  </head>
   19.36 +  <body>
   19.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   19.38 +    <div class="comments">
   19.39 +      Key to entities used below:
   19.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   19.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   19.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   19.43 +    </div>
   19.44 +    </div>
   19.45 +    <div class="test">
   19.46 +      <div dir="ltr">
   19.47 +        <p dir="rtl">&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   19.48 +      </div>
   19.49 +      <div dir="rtl">
   19.50 +        <p dir="rtl">&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   19.51 +      </div>
   19.52 +    </div>
   19.53 +    <div class="ref">
   19.54 +      <div dir="ltr">
   19.55 +        <p dir="rtl">&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   19.56 +      </div>
   19.57 +      <div dir="rtl">
   19.58 +        <p dir="rtl">&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   19.59 +      </div>
   19.60 +    </div>
   19.61 +  </body>
   19.62 +</html>
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-R.html	Sun Feb 19 10:38:29 2012 +0200
    20.3 @@ -0,0 +1,58 @@
    20.4 +<!DOCTYPE html>
    20.5 +<html>
    20.6 +  <head>
    20.7 +    <meta charset="utf-8" />
    20.8 +    <title>HTML Test: dir=auto, start with R</title>
    20.9 +    <link rel="reference" href="dir_auto-R-ref.html" />
   20.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   20.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   20.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   20.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   20.14 +    <meta name="assert" content="
   20.15 +      When dir='auto', the direction is set according to the first strong character
   20.16 +      of the text.
   20.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   20.18 +      resolved as RTL." />
   20.19 +    <style>
   20.20 +      input, textarea {
   20.21 +        font-size:1em;
   20.22 +      }
   20.23 +      body {
   20.24 +        font-size:2em;
   20.25 +      }
   20.26 +      .test, .ref {
   20.27 +        border: medium solid gray;
   20.28 +        width: 400px;
   20.29 +        margin: 20px;
   20.30 +      }
   20.31 +      .comments {
   20.32 +        display: none;
   20.33 +      }
   20.34 +    </style>
   20.35 +  </head>
   20.36 +  <body>
   20.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   20.38 +    <div class="comments">
   20.39 +      Key to entities used below:
   20.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   20.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   20.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   20.43 +    </div>
   20.44 +    <div class="test">
   20.45 +      <div dir="ltr">
   20.46 +        <p dir="auto">&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   20.47 +      </div>
   20.48 +      <div dir="rtl">
   20.49 +        <p dir="auto">&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   20.50 +      </div>
   20.51 +    </div>
   20.52 +    <div class="ref">
   20.53 +      <div dir="ltr">
   20.54 +        <p dir="rtl">&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   20.55 +      </div>
   20.56 +      <div dir="rtl">
   20.57 +        <p dir="rtl">&#x05D0;&#x05D1;&#x05D2;ABC.</p>
   20.58 +      </div>
   20.59 +    </div>
   20.60 +  </body>
   20.61 +</html>
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    21.3 @@ -0,0 +1,62 @@
    21.4 +<!DOCTYPE html>
    21.5 +<html>
    21.6 +  <head>
    21.7 +    <meta charset="utf-8" />
    21.8 +    <title>HTML Test: dir=auto, start with L within contained element</title>
    21.9 +    <link rel="reference" href="dir_auto-contained-L-ref.html" />
   21.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   21.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   21.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   21.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   21.14 +    <meta name="assert" content="
   21.15 +      When dir='auto', the direction is set according to the first strong character
   21.16 +      of the text, including text within contained elements.
   21.17 +      In this test, it is the Latin letter A, thus the direction must be
   21.18 +      resolved as LTR." />
   21.19 +    <style>
   21.20 +      input, textarea {
   21.21 +        font-size:1em;
   21.22 +      }
   21.23 +      body {
   21.24 +        font-size:2em;
   21.25 +      }
   21.26 +      .test, .ref {
   21.27 +        border: medium solid gray;
   21.28 +        width: 400px;
   21.29 +        margin: 20px;
   21.30 +      }
   21.31 +      .comments {
   21.32 +        display: none;
   21.33 +      }
   21.34 +    </style>
   21.35 +  </head>
   21.36 +  <body>
   21.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   21.38 +    <div class="comments">
   21.39 +      Key to entities used below:
   21.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   21.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   21.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   21.43 +      &#x05D3; - The Hebrew letter Dalet (strongly RTL).
   21.44 +      &#x05D4; - The Hebrew letter He (strongly RTL).
   21.45 +      &#x05D5; - The Hebrew letter Vav (strongly RTL).
   21.46 +      &#x05D6; - The Hebrew letter Zayin (strongly RTL).
   21.47 +    </div>
   21.48 +    <div class="test">
   21.49 +      <div dir="ltr">
   21.50 +        <div dir="ltr"><div><div>ABC&#x05D0;&#x05D1;&#x05D2;.</div>&#x05D3;&#x05D4;</div>&#x05D5;</div>
   21.51 +      </div>
   21.52 +      <div dir="rtl">
   21.53 +        <div dir="ltr"><div><div>ABC&#x05D0;&#x05D1;&#x05D2;.</div>&#x05D3;&#x05D4;</div>&#x05D5;</div>
   21.54 +      </div>
   21.55 +    </div>
   21.56 +    <div class="ref">
   21.57 +      <div dir="ltr">
   21.58 +        <div dir="ltr"><div><div>ABC&#x05D0;&#x05D1;&#x05D2;.</div>&#x05D3;&#x05D4;</div>&#x05D5;</div>
   21.59 +      </div>
   21.60 +      <div dir="rtl">
   21.61 +        <div dir="ltr"><div><div>ABC&#x05D0;&#x05D1;&#x05D2;.</div>&#x05D3;&#x05D4;</div>&#x05D5;</div>
   21.62 +      </div>
   21.63 +    </div>
   21.64 +  </body>
   21.65 +</html>
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-L.html	Sun Feb 19 10:38:29 2012 +0200
    22.3 @@ -0,0 +1,62 @@
    22.4 +<!DOCTYPE html>
    22.5 +<html>
    22.6 +  <head>
    22.7 +    <meta charset="utf-8" />
    22.8 +    <title>HTML Test: dir=auto, start with L within contained element</title>
    22.9 +    <link rel="reference" href="dir_auto-contained-L-ref.html" />
   22.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   22.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   22.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   22.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   22.14 +    <meta name="assert" content="
   22.15 +      When dir='auto', the direction is set according to the first strong character
   22.16 +      of the text, including text within contained elements.
   22.17 +      In this test, it is the Latin letter A, thus the direction must be
   22.18 +      resolved as LTR." />
   22.19 +    <style>
   22.20 +      input, textarea {
   22.21 +        font-size:1em;
   22.22 +      }
   22.23 +      body {
   22.24 +        font-size:2em;
   22.25 +      }
   22.26 +      .test, .ref {
   22.27 +        border: medium solid gray;
   22.28 +        width: 400px;
   22.29 +        margin: 20px;
   22.30 +      }
   22.31 +      .comments {
   22.32 +        display: none;
   22.33 +      }
   22.34 +    </style>
   22.35 +  </head>
   22.36 +  <body>
   22.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   22.38 +    <div class="comments">
   22.39 +      Key to entities used below:
   22.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   22.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   22.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   22.43 +      &#x05D3; - The Hebrew letter Dalet (strongly RTL).
   22.44 +      &#x05D4; - The Hebrew letter He (strongly RTL).
   22.45 +      &#x05D5; - The Hebrew letter Vav (strongly RTL).
   22.46 +      &#x05D6; - The Hebrew letter Zayin (strongly RTL).
   22.47 +    </div>
   22.48 +    <div class="test">
   22.49 +      <div dir="ltr">
   22.50 +        <div dir="auto"><div><div>ABC&#x05D0;&#x05D1;&#x05D2;.</div>&#x05D3;&#x05D4;</div>&#x05D5;</div>
   22.51 +      </div>
   22.52 +      <div dir="rtl">
   22.53 +        <div dir="auto"><div><div>ABC&#x05D0;&#x05D1;&#x05D2;.</div>&#x05D3;&#x05D4;</div>&#x05D5;</div>
   22.54 +      </div>
   22.55 +    </div>
   22.56 +    <div class="ref">
   22.57 +      <div dir="ltr">
   22.58 +        <div dir="ltr"><div><div>ABC&#x05D0;&#x05D1;&#x05D2;.</div>&#x05D3;&#x05D4;</div>&#x05D5;</div>
   22.59 +      </div>
   22.60 +      <div dir="rtl">
   22.61 +        <div dir="ltr"><div><div>ABC&#x05D0;&#x05D1;&#x05D2;.</div>&#x05D3;&#x05D4;</div>&#x05D5;</div>
   22.62 +      </div>
   22.63 +    </div>
   22.64 +  </body>
   22.65 +</html>
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    23.3 @@ -0,0 +1,58 @@
    23.4 +<!DOCTYPE html>
    23.5 +<html>
    23.6 +  <head>
    23.7 +    <meta charset="utf-8" />
    23.8 +    <title>HTML Test: dir=auto, start with R within contained element</title>
    23.9 +    <link rel="reference" href="dir_auto-contained-R-ref.html" />
   23.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   23.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   23.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   23.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   23.14 +    <meta name="assert" content="
   23.15 +      When dir='auto', the direction is set according to the first strong character
   23.16 +      of the text, including text within contained elements.
   23.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   23.18 +      resolved as RTL." />
   23.19 +    <style>
   23.20 +      input, textarea {
   23.21 +        font-size:1em;
   23.22 +      }
   23.23 +      body {
   23.24 +        font-size:2em;
   23.25 +      }
   23.26 +      .test, .ref {
   23.27 +        border: medium solid gray;
   23.28 +        width: 400px;
   23.29 +        margin: 20px;
   23.30 +      }
   23.31 +      .comments {
   23.32 +        display: none;
   23.33 +      }
   23.34 +    </style>
   23.35 +  </head>
   23.36 +  <body>
   23.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   23.38 +    <div class="comments">
   23.39 +      Key to entities used below:
   23.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   23.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   23.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   23.43 +    </div>
   23.44 +    <div class="test">
   23.45 +      <div dir="ltr">
   23.46 +        <div dir="rtl"><div><div>&#x05D0;&#x05D1;&#x05D2;ABC.</div>XY</div>Z</div>
   23.47 +      </div>
   23.48 +      <div dir="rtl">
   23.49 +        <div dir="rtl"><div><div>&#x05D0;&#x05D1;&#x05D2;ABC.</div>XY</div>Z</div>
   23.50 +      </div>
   23.51 +    </div>
   23.52 +    <div class="ref">
   23.53 +      <div dir="ltr">
   23.54 +        <div dir="rtl"><div><div>&#x05D0;&#x05D1;&#x05D2;ABC.</div>XY</div>Z</div>
   23.55 +      </div>
   23.56 +      <div dir="rtl">
   23.57 +        <div dir="rtl"><div><div>&#x05D0;&#x05D1;&#x05D2;ABC.</div>XY</div>Z</div>
   23.58 +      </div>
   23.59 +    </div>
   23.60 +  </body>
   23.61 +</html>
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-R.html	Sun Feb 19 10:38:29 2012 +0200
    24.3 @@ -0,0 +1,58 @@
    24.4 +<!DOCTYPE html>
    24.5 +<html>
    24.6 +  <head>
    24.7 +    <meta charset="utf-8" />
    24.8 +    <title>HTML Test: dir=auto, start with R within contained element</title>
    24.9 +    <link rel="reference" href="dir_auto-contained-R-ref.html" />
   24.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   24.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   24.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   24.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   24.14 +    <meta name="assert" content="
   24.15 +      When dir='auto', the direction is set according to the first strong character
   24.16 +      of the text, including text within contained elements.
   24.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   24.18 +      resolved as RTL." />
   24.19 +    <style>
   24.20 +      input, textarea {
   24.21 +        font-size:1em;
   24.22 +      }
   24.23 +      body {
   24.24 +        font-size:2em;
   24.25 +      }
   24.26 +      .test, .ref {
   24.27 +        border: medium solid gray;
   24.28 +        width: 400px;
   24.29 +        margin: 20px;
   24.30 +      }
   24.31 +      .comments {
   24.32 +        display: none;
   24.33 +      }
   24.34 +    </style>
   24.35 +  </head>
   24.36 +  <body>
   24.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   24.38 +    <div class="comments">
   24.39 +      Key to entities used below:
   24.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   24.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   24.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   24.43 +    </div>
   24.44 +    <div class="test">
   24.45 +      <div dir="ltr">
   24.46 +        <div dir="auto"><div><div>&#x05D0;&#x05D1;&#x05D2;ABC.</div>XY</div>Z</div>
   24.47 +      </div>
   24.48 +      <div dir="rtl">
   24.49 +        <div dir="auto"><div><div>&#x05D0;&#x05D1;&#x05D2;ABC.</div>XY</div>Z</div>
   24.50 +      </div>
   24.51 +    </div>
   24.52 +    <div class="ref">
   24.53 +      <div dir="ltr">
   24.54 +        <div dir="rtl"><div><div>&#x05D0;&#x05D1;&#x05D2;ABC.</div>XY</div>Z</div>
   24.55 +      </div>
   24.56 +      <div dir="rtl">
   24.57 +        <div dir="rtl"><div><div>&#x05D0;&#x05D1;&#x05D2;ABC.</div>XY</div>Z</div>
   24.58 +      </div>
   24.59 +    </div>
   24.60 +  </body>
   24.61 +</html>
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-bdi-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    25.3 @@ -0,0 +1,61 @@
    25.4 +<!DOCTYPE html>
    25.5 +<html>
    25.6 +  <head>
    25.7 +    <meta charset="utf-8" />
    25.8 +    <title>HTML Test: dir=auto, start with bdi, then L</title>
    25.9 +    <link rel="reference" href="dir_auto-contained-bdi-L-ref.html" />
   25.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   25.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   25.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   25.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   25.14 +    <meta name="assert" content="
   25.15 +      When dir='auto', the direction is set according to the first strong character
   25.16 +      of the text while ignoring bdi elements.
   25.17 +      In this test, it is the Latin letter A, thus the direction must be
   25.18 +      resolved as LTR." />
   25.19 +    <style>
   25.20 +      input, textarea {
   25.21 +        font-size:1em;
   25.22 +      }
   25.23 +      body {
   25.24 +        font-size:2em;
   25.25 +      }
   25.26 +      .test, .ref {
   25.27 +        border: medium solid gray;
   25.28 +        width: 400px;
   25.29 +        margin: 20px;
   25.30 +      }
   25.31 +      .comments {
   25.32 +        display: none;
   25.33 +      }
   25.34 +    </style>
   25.35 +  </head>
   25.36 +  <body>
   25.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   25.38 +    <div class="comments">
   25.39 +      Key to entities used below:
   25.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   25.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   25.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   25.43 +      &#x05D3; - The Hebrew letter Dalet (strongly RTL).
   25.44 +      &#x05D4; - The Hebrew letter He (strongly RTL).
   25.45 +      &#x05D5; - The Hebrew letter Vav (strongly RTL).
   25.46 +    </div>
   25.47 +    <div class="test">
   25.48 +      <div dir="ltr">
   25.49 +        <div dir="ltr"><bdi>&#x05D3;&#x05D4;&#x05D5;</bdi>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   25.50 +      </div>
   25.51 +      <div dir="rtl">
   25.52 +        <div dir="ltr"><bdi>&#x05D3;&#x05D4;&#x05D5;</bdi>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   25.53 +      </div>
   25.54 +    </div>
   25.55 +    <div class="ref">
   25.56 +      <div dir="ltr">
   25.57 +        <div dir="ltr"><bdi>&#x05D3;&#x05D4;&#x05D5;</bdi>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   25.58 +      </div>
   25.59 +      <div dir="rtl">
   25.60 +        <div dir="ltr"><bdi>&#x05D3;&#x05D4;&#x05D5;</bdi>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   25.61 +      </div>
   25.62 +    </div>
   25.63 +  </body>
   25.64 +</html>
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-bdi-L.html	Sun Feb 19 10:38:29 2012 +0200
    26.3 @@ -0,0 +1,61 @@
    26.4 +<!DOCTYPE html>
    26.5 +<html>
    26.6 +  <head>
    26.7 +    <meta charset="utf-8" />
    26.8 +    <title>HTML Test: dir=auto, start with bdi, then L</title>
    26.9 +    <link rel="reference" href="dir_auto-contained-bdi-L-ref.html" />
   26.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   26.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   26.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   26.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   26.14 +    <meta name="assert" content="
   26.15 +      When dir='auto', the direction is set according to the first strong character
   26.16 +      of the text while ignoring bdi elements.
   26.17 +      In this test, it is the Latin letter A, thus the direction must be
   26.18 +      resolved as LTR." />
   26.19 +    <style>
   26.20 +      input, textarea {
   26.21 +        font-size:1em;
   26.22 +      }
   26.23 +      body {
   26.24 +        font-size:2em;
   26.25 +      }
   26.26 +      .test, .ref {
   26.27 +        border: medium solid gray;
   26.28 +        width: 400px;
   26.29 +        margin: 20px;
   26.30 +      }
   26.31 +      .comments {
   26.32 +        display: none;
   26.33 +      }
   26.34 +    </style>
   26.35 +  </head>
   26.36 +  <body>
   26.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   26.38 +    <div class="comments">
   26.39 +      Key to entities used below:
   26.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   26.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   26.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   26.43 +      &#x05D3; - The Hebrew letter Dalet (strongly RTL).
   26.44 +      &#x05D4; - The Hebrew letter He (strongly RTL).
   26.45 +      &#x05D5; - The Hebrew letter Vav (strongly RTL).
   26.46 +    </div>
   26.47 +    <div class="test">
   26.48 +      <div dir="ltr">
   26.49 +        <div dir="auto"><bdi>&#x05D3;&#x05D4;&#x05D5;</bdi>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   26.50 +      </div>
   26.51 +      <div dir="rtl">
   26.52 +        <div dir="auto"><bdi>&#x05D3;&#x05D4;&#x05D5;</bdi>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   26.53 +      </div>
   26.54 +    </div>
   26.55 +    <div class="ref">
   26.56 +      <div dir="ltr">
   26.57 +        <div dir="ltr"><bdi>&#x05D3;&#x05D4;&#x05D5;</bdi>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   26.58 +      </div>
   26.59 +      <div dir="rtl">
   26.60 +        <div dir="ltr"><bdi>&#x05D3;&#x05D4;&#x05D5;</bdi>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   26.61 +      </div>
   26.62 +    </div>
   26.63 +  </body>
   26.64 +</html>
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-bdi-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    27.3 @@ -0,0 +1,58 @@
    27.4 +<!DOCTYPE html>
    27.5 +<html>
    27.6 +  <head>
    27.7 +    <meta charset="utf-8" />
    27.8 +    <title>HTML Test: dir=auto, start with bdi, then R</title>
    27.9 +    <link rel="reference" href="dir_auto-contained-bdi-R-ref.html" />
   27.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   27.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   27.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   27.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   27.14 +    <meta name="assert" content="
   27.15 +      When dir='auto', the direction is set according to the first strong character
   27.16 +      of the text while ignoring bdi elements.
   27.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   27.18 +      resolved as RTL." />
   27.19 +    <style>
   27.20 +      input, textarea {
   27.21 +        font-size:1em;
   27.22 +      }
   27.23 +      body {
   27.24 +        font-size:2em;
   27.25 +      }
   27.26 +      .test, .ref {
   27.27 +        border: medium solid gray;
   27.28 +        width: 400px;
   27.29 +        margin: 20px;
   27.30 +      }
   27.31 +      .comments {
   27.32 +        display: none;
   27.33 +      }
   27.34 +    </style>
   27.35 +  </head>
   27.36 +  <body>
   27.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   27.38 +    <div class="comments">
   27.39 +      Key to entities used below:
   27.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   27.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   27.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   27.43 +    </div>
   27.44 +    <div class="test">
   27.45 +      <div dir="ltr">
   27.46 +        <div dir="rtl"><bdi>DEF</bdi>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   27.47 +      </div>
   27.48 +      <div dir="rtl">
   27.49 +        <div dir="rtl"><bdi>DEF</bdi>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   27.50 +      </div>
   27.51 +    </div>
   27.52 +    <div class="ref">
   27.53 +      <div dir="ltr">
   27.54 +        <div dir="rtl"><bdi>DEF</bdi>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   27.55 +      </div>
   27.56 +      <div dir="rtl">
   27.57 +        <div dir="rtl"><bdi>DEF</bdi>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   27.58 +      </div>
   27.59 +    </div>
   27.60 +  </body>
   27.61 +</html>
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-bdi-R.html	Sun Feb 19 10:38:29 2012 +0200
    28.3 @@ -0,0 +1,58 @@
    28.4 +<!DOCTYPE html>
    28.5 +<html>
    28.6 +  <head>
    28.7 +    <meta charset="utf-8" />
    28.8 +    <title>HTML Test: dir=auto, start with bdi, then R</title>
    28.9 +    <link rel="reference" href="dir_auto-contained-bdi-R-ref.html" />
   28.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   28.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   28.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   28.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   28.14 +    <meta name="assert" content="
   28.15 +      When dir='auto', the direction is set according to the first strong character
   28.16 +      of the text while ignoring bdi elements.
   28.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   28.18 +      resolved as RTL." />
   28.19 +    <style>
   28.20 +      input, textarea {
   28.21 +        font-size:1em;
   28.22 +      }
   28.23 +      body {
   28.24 +        font-size:2em;
   28.25 +      }
   28.26 +      .test, .ref {
   28.27 +        border: medium solid gray;
   28.28 +        width: 400px;
   28.29 +        margin: 20px;
   28.30 +      }
   28.31 +      .comments {
   28.32 +        display: none;
   28.33 +      }
   28.34 +    </style>
   28.35 +  </head>
   28.36 +  <body>
   28.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   28.38 +    <div class="comments">
   28.39 +      Key to entities used below:
   28.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   28.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   28.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   28.43 +    </div>
   28.44 +    <div class="test">
   28.45 +      <div dir="ltr">
   28.46 +        <div dir="auto"><bdi>DEF</bdi>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   28.47 +      </div>
   28.48 +      <div dir="rtl">
   28.49 +        <div dir="auto"><bdi>DEF</bdi>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   28.50 +      </div>
   28.51 +    </div>
   28.52 +    <div class="ref">
   28.53 +      <div dir="ltr">
   28.54 +        <div dir="rtl"><bdi>DEF</bdi>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   28.55 +      </div>
   28.56 +      <div dir="rtl">
   28.57 +        <div dir="rtl"><bdi>DEF</bdi>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   28.58 +      </div>
   28.59 +    </div>
   28.60 +  </body>
   28.61 +</html>
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-dir-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    29.3 @@ -0,0 +1,61 @@
    29.4 +<!DOCTYPE html>
    29.5 +<html>
    29.6 +  <head>
    29.7 +    <meta charset="utf-8" />
    29.8 +    <title>HTML Test: dir=auto, start with dir, then L</title>
    29.9 +    <link rel="reference" href="dir_auto-contained-dir-L-ref.html" />
   29.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   29.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   29.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   29.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   29.14 +    <meta name="assert" content="
   29.15 +      When dir='auto', the direction is set according to the first strong character
   29.16 +      of the text while ignoring contained elements with an explicit dir of their own.
   29.17 +      In this test, it is the Latin letter A, thus the direction must be
   29.18 +      resolved as LTR." />
   29.19 +    <style>
   29.20 +      input, textarea {
   29.21 +        font-size:1em;
   29.22 +      }
   29.23 +      body {
   29.24 +        font-size:2em;
   29.25 +      }
   29.26 +      .test, .ref {
   29.27 +        border: medium solid gray;
   29.28 +        width: 400px;
   29.29 +        margin: 20px;
   29.30 +      }
   29.31 +      .comments {
   29.32 +        display: none;
   29.33 +      }
   29.34 +    </style>
   29.35 +  </head>
   29.36 +  <body>
   29.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   29.38 +    <div class="comments">
   29.39 +      Key to entities used below:
   29.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   29.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   29.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   29.43 +      &#x05D3; - The Hebrew letter Dalet (strongly RTL).
   29.44 +      &#x05D4; - The Hebrew letter He (strongly RTL).
   29.45 +      &#x05D5; - The Hebrew letter Vav (strongly RTL).
   29.46 +    </div>
   29.47 +    <div class="test">
   29.48 +      <div dir="ltr">
   29.49 +        <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   29.50 +      </div>
   29.51 +      <div dir="rtl">
   29.52 +        <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   29.53 +      </div>
   29.54 +    </div>
   29.55 +    <div class="ref">
   29.56 +      <div dir="ltr">
   29.57 +        <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   29.58 +      </div>
   29.59 +      <div dir="rtl">
   29.60 +        <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   29.61 +      </div>
   29.62 +    </div>
   29.63 +  </body>
   29.64 +</html>
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-dir-L.html	Sun Feb 19 10:38:29 2012 +0200
    30.3 @@ -0,0 +1,61 @@
    30.4 +<!DOCTYPE html>
    30.5 +<html>
    30.6 +  <head>
    30.7 +    <meta charset="utf-8" />
    30.8 +    <title>HTML Test: dir=auto, start with dir, then L</title>
    30.9 +    <link rel="reference" href="dir_auto-contained-dir-L-ref.html" />
   30.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   30.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   30.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   30.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   30.14 +    <meta name="assert" content="
   30.15 +      When dir='auto', the direction is set according to the first strong character
   30.16 +      of the text while ignoring contained elements with an explicit dir of their own.
   30.17 +      In this test, it is the Latin letter A, thus the direction must be
   30.18 +      resolved as LTR." />
   30.19 +    <style>
   30.20 +      input, textarea {
   30.21 +        font-size:1em;
   30.22 +      }
   30.23 +      body {
   30.24 +        font-size:2em;
   30.25 +      }
   30.26 +      .test, .ref {
   30.27 +        border: medium solid gray;
   30.28 +        width: 400px;
   30.29 +        margin: 20px;
   30.30 +      }
   30.31 +      .comments {
   30.32 +        display: none;
   30.33 +      }
   30.34 +    </style>
   30.35 +  </head>
   30.36 +  <body>
   30.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   30.38 +    <div class="comments">
   30.39 +      Key to entities used below:
   30.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   30.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   30.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   30.43 +      &#x05D3; - The Hebrew letter Dalet (strongly RTL).
   30.44 +      &#x05D4; - The Hebrew letter He (strongly RTL).
   30.45 +      &#x05D5; - The Hebrew letter Vav (strongly RTL).
   30.46 +    </div>
   30.47 +    <div class="test">
   30.48 +      <div dir="ltr">
   30.49 +        <div dir="auto"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   30.50 +      </div>
   30.51 +      <div dir="rtl">
   30.52 +        <div dir="auto"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   30.53 +      </div>
   30.54 +    </div>
   30.55 +    <div class="ref">
   30.56 +      <div dir="ltr">
   30.57 +        <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   30.58 +      </div>
   30.59 +      <div dir="rtl">
   30.60 +        <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   30.61 +      </div>
   30.62 +    </div>
   30.63 +  </body>
   30.64 +</html>
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-dir-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    31.3 @@ -0,0 +1,58 @@
    31.4 +<!DOCTYPE html>
    31.5 +<html>
    31.6 +  <head>
    31.7 +    <meta charset="utf-8" />
    31.8 +    <title>HTML Test: dir=auto, start with dir, then R</title>
    31.9 +    <link rel="reference" href="dir_auto-contained-dir-R-ref.html" />
   31.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   31.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   31.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   31.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   31.14 +    <meta name="assert" content="
   31.15 +      When dir='auto', the direction is set according to the first strong character
   31.16 +      of the text while ignoring contained elements with an explicit dir of their own.
   31.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   31.18 +      resolved as RTL." />
   31.19 +    <style>
   31.20 +      input, textarea {
   31.21 +        font-size:1em;
   31.22 +      }
   31.23 +      body {
   31.24 +        font-size:2em;
   31.25 +      }
   31.26 +      .test, .ref {
   31.27 +        border: medium solid gray;
   31.28 +        width: 400px;
   31.29 +        margin: 20px;
   31.30 +      }
   31.31 +      .comments {
   31.32 +        display: none;
   31.33 +      }
   31.34 +    </style>
   31.35 +  </head>
   31.36 +  <body>
   31.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   31.38 +    <div class="comments">
   31.39 +      Key to entities used below:
   31.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   31.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   31.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   31.43 +    </div>
   31.44 +    <div class="test">
   31.45 +      <div dir="ltr">
   31.46 +        <div dir="rtl"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   31.47 +      </div>
   31.48 +      <div dir="rtl">
   31.49 +        <div dir="rtl"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   31.50 +      </div>
   31.51 +    </div>
   31.52 +    <div class="ref">
   31.53 +      <div dir="ltr">
   31.54 +        <div dir="rtl"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   31.55 +      </div>
   31.56 +      <div dir="rtl">
   31.57 +        <div dir="rtl"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   31.58 +      </div>
   31.59 +    </div>
   31.60 +  </body>
   31.61 +</html>
    32.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-dir-R.html	Sun Feb 19 10:38:29 2012 +0200
    32.3 @@ -0,0 +1,58 @@
    32.4 +<!DOCTYPE html>
    32.5 +<html>
    32.6 +  <head>
    32.7 +    <meta charset="utf-8" />
    32.8 +    <title>HTML Test: dir=auto, start with dir, then R</title>
    32.9 +    <link rel="reference" href="dir_auto-contained-dir-R-ref.html" />
   32.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   32.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   32.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   32.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   32.14 +    <meta name="assert" content="
   32.15 +      When dir='auto', the direction is set according to the first strong character
   32.16 +      of the text while ignoring contained elements with an explicit dir of their own.
   32.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   32.18 +      resolved as RTL." />
   32.19 +    <style>
   32.20 +      input, textarea {
   32.21 +        font-size:1em;
   32.22 +      }
   32.23 +      body {
   32.24 +        font-size:2em;
   32.25 +      }
   32.26 +      .test, .ref {
   32.27 +        border: medium solid gray;
   32.28 +        width: 400px;
   32.29 +        margin: 20px;
   32.30 +      }
   32.31 +      .comments {
   32.32 +        display: none;
   32.33 +      }
   32.34 +    </style>
   32.35 +  </head>
   32.36 +  <body>
   32.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   32.38 +    <div class="comments">
   32.39 +      Key to entities used below:
   32.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   32.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   32.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   32.43 +    </div>
   32.44 +    <div class="test">
   32.45 +      <div dir="ltr">
   32.46 +        <div dir="auto"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   32.47 +      </div>
   32.48 +      <div dir="rtl">
   32.49 +        <div dir="auto"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   32.50 +      </div>
   32.51 +    </div>
   32.52 +    <div class="ref">
   32.53 +      <div dir="ltr">
   32.54 +        <div dir="rtl"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   32.55 +      </div>
   32.56 +      <div dir="rtl">
   32.57 +        <div dir="rtl"><p dir="ltr">DEF</p>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   32.58 +      </div>
   32.59 +    </div>
   32.60 +  </body>
   32.61 +</html>
    33.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-dir_auto-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    33.3 @@ -0,0 +1,61 @@
    33.4 +<!DOCTYPE html>
    33.5 +<html>
    33.6 +  <head>
    33.7 +    <meta charset="utf-8" />
    33.8 +    <title>HTML Test: dir=auto, start with dir=auto, then L</title>
    33.9 +    <link rel="reference" href="dir_auto-contained-dir_auto-L-ref.html" />
   33.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   33.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   33.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   33.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   33.14 +    <meta name="assert" content="
   33.15 +      When dir='auto', the direction is set according to the first strong character
   33.16 +      of the text while ignoring contained elements with an explicit dir of their own.
   33.17 +      In this test, it is the Latin letter A, thus the direction must be
   33.18 +      resolved as LTR." />
   33.19 +    <style>
   33.20 +      input, textarea {
   33.21 +        font-size:1em;
   33.22 +      }
   33.23 +      body {
   33.24 +        font-size:2em;
   33.25 +      }
   33.26 +      .test, .ref {
   33.27 +        border: medium solid gray;
   33.28 +        width: 400px;
   33.29 +        margin: 20px;
   33.30 +      }
   33.31 +      .comments {
   33.32 +        display: none;
   33.33 +      }
   33.34 +    </style>
   33.35 +  </head>
   33.36 +  <body>
   33.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   33.38 +    <div class="comments">
   33.39 +      Key to entities used below:
   33.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   33.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   33.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   33.43 +      &#x05D3; - The Hebrew letter Dalet (strongly RTL).
   33.44 +      &#x05D4; - The Hebrew letter He (strongly RTL).
   33.45 +      &#x05D5; - The Hebrew letter Vav (strongly RTL).
   33.46 +    </div>
   33.47 +    <div class="test">
   33.48 +      <div dir="ltr">
   33.49 +        <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   33.50 +      </div>
   33.51 +      <div dir="rtl">
   33.52 +        <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   33.53 +      </div>
   33.54 +    </div>
   33.55 +    <div class="ref">
   33.56 +      <div dir="ltr">
   33.57 +        <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   33.58 +      </div>
   33.59 +      <div dir="rtl">
   33.60 +        <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   33.61 +      </div>
   33.62 +    </div>
   33.63 +  </body>
   33.64 +</html>
    34.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-dir_auto-L.html	Sun Feb 19 10:38:29 2012 +0200
    34.3 @@ -0,0 +1,61 @@
    34.4 +<!DOCTYPE html>
    34.5 +<html>
    34.6 +  <head>
    34.7 +    <meta charset="utf-8" />
    34.8 +    <title>HTML Test: dir=auto, start with dir=auto, then L</title>
    34.9 +    <link rel="reference" href="dir_auto-contained-dir_auto-L-ref.html" />
   34.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   34.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   34.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   34.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   34.14 +    <meta name="assert" content="
   34.15 +      When dir='auto', the direction is set according to the first strong character
   34.16 +      of the text while ignoring contained elements with an explicit dir of their own.
   34.17 +      In this test, it is the Latin letter A, thus the direction must be
   34.18 +      resolved as LTR." />
   34.19 +    <style>
   34.20 +      input, textarea {
   34.21 +        font-size:1em;
   34.22 +      }
   34.23 +      body {
   34.24 +        font-size:2em;
   34.25 +      }
   34.26 +      .test, .ref {
   34.27 +        border: medium solid gray;
   34.28 +        width: 400px;
   34.29 +        margin: 20px;
   34.30 +      }
   34.31 +      .comments {
   34.32 +        display: none;
   34.33 +      }
   34.34 +    </style>
   34.35 +  </head>
   34.36 +  <body>
   34.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   34.38 +    <div class="comments">
   34.39 +      Key to entities used below:
   34.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   34.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   34.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   34.43 +      &#x05D3; - The Hebrew letter Dalet (strongly RTL).
   34.44 +      &#x05D4; - The Hebrew letter He (strongly RTL).
   34.45 +      &#x05D5; - The Hebrew letter Vav (strongly RTL).
   34.46 +    </div>
   34.47 +    <div class="test">
   34.48 +      <div dir="ltr">
   34.49 +        <div dir="auto"><p dir="auto">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   34.50 +      </div>
   34.51 +      <div dir="rtl">
   34.52 +        <div dir="auto"><p dir="auto">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   34.53 +      </div>
   34.54 +    </div>
   34.55 +    <div class="ref">
   34.56 +      <div dir="ltr">
   34.57 +        <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   34.58 +      </div>
   34.59 +      <div dir="rtl">
   34.60 +        <div dir="ltr"><p dir="rtl">&#x05D3;&#x05D4;&#x05D5;</p>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   34.61 +      </div>
   34.62 +    </div>
   34.63 +  </body>
   34.64 +</html>
    35.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-dir_auto-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    35.3 @@ -0,0 +1,58 @@
    35.4 +<!DOCTYPE html>
    35.5 +<html>
    35.6 +  <head>
    35.7 +    <meta charset="utf-8" />
    35.8 +    <title>HTML Test: dir=auto, start with dir=auto, then R</title>
    35.9 +    <link rel="reference" href="dir_auto-contained-dir_auto-R-ref.html" />
   35.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   35.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   35.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   35.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   35.14 +    <meta name="assert" content="
   35.15 +      When dir='auto', the direction is set according to the first strong character
   35.16 +      of the text while ignoring contained elements with an explicit dir of their own.
   35.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   35.18 +      resolved as RTL." />
   35.19 +    <style>
   35.20 +      input, textarea {
   35.21 +        font-size:1em;
   35.22 +      }
   35.23 +      body {
   35.24 +        font-size:2em;
   35.25 +      }
   35.26 +      .test, .ref {
   35.27 +        border: medium solid gray;
   35.28 +        width: 400px;
   35.29 +        margin: 20px;
   35.30 +      }
   35.31 +      .comments {
   35.32 +        display: none;
   35.33 +      }
   35.34 +    </style>
   35.35 +  </head>
   35.36 +  <body>
   35.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   35.38 +    <div class="comments">
   35.39 +      Key to entities used below:
   35.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   35.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   35.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   35.43 +    </div>
   35.44 +    <div class="test">
   35.45 +      <div dir="ltr">
   35.46 +        <div dir="rtl"><p dir="ltr">DEF</p>.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   35.47 +      </div>
   35.48 +      <div dir="rtl">
   35.49 +        <div dir="rtl"><p dir="ltr">DEF</p>.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   35.50 +      </div>
   35.51 +    </div>
   35.52 +    <div class="ref">
   35.53 +      <div dir="ltr">
   35.54 +        <div dir="rtl"><p dir="ltr">DEF</p>.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   35.55 +      </div>
   35.56 +      <div dir="rtl">
   35.57 +        <div dir="rtl"><p dir="ltr">DEF</p>.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   35.58 +      </div>
   35.59 +    </div>
   35.60 +  </body>
   35.61 +</html>
    36.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-dir_auto-R.html	Sun Feb 19 10:38:29 2012 +0200
    36.3 @@ -0,0 +1,58 @@
    36.4 +<!DOCTYPE html>
    36.5 +<html>
    36.6 +  <head>
    36.7 +    <meta charset="utf-8" />
    36.8 +    <title>HTML Test: dir=auto, start with dir=auto, then R</title>
    36.9 +    <link rel="reference" href="dir_auto-contained-dir_auto-R-ref.html" />
   36.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   36.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   36.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   36.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   36.14 +    <meta name="assert" content="
   36.15 +      When dir='auto', the direction is set according to the first strong character
   36.16 +      of the text while ignoring contained elements with an explicit dir of their own.
   36.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   36.18 +      resolved as RTL." />
   36.19 +    <style>
   36.20 +      input, textarea {
   36.21 +        font-size:1em;
   36.22 +      }
   36.23 +      body {
   36.24 +        font-size:2em;
   36.25 +      }
   36.26 +      .test, .ref {
   36.27 +        border: medium solid gray;
   36.28 +        width: 400px;
   36.29 +        margin: 20px;
   36.30 +      }
   36.31 +      .comments {
   36.32 +        display: none;
   36.33 +      }
   36.34 +    </style>
   36.35 +  </head>
   36.36 +  <body>
   36.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   36.38 +    <div class="comments">
   36.39 +      Key to entities used below:
   36.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   36.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   36.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   36.43 +    </div>
   36.44 +    <div class="test">
   36.45 +      <div dir="ltr">
   36.46 +        <div dir="auto"><p dir="auto">DEF</p>.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   36.47 +      </div>
   36.48 +      <div dir="rtl">
   36.49 +        <div dir="auto"><p dir="auto">DEF</p>.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   36.50 +      </div>
   36.51 +    </div>
   36.52 +    <div class="ref">
   36.53 +      <div dir="ltr">
   36.54 +        <div dir="rtl"><p dir="ltr">DEF</p>.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   36.55 +      </div>
   36.56 +      <div dir="rtl">
   36.57 +        <div dir="rtl"><p dir="ltr">DEF</p>.-=123&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   36.58 +      </div>
   36.59 +    </div>
   36.60 +  </body>
   36.61 +</html>
    37.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-script-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    37.3 @@ -0,0 +1,58 @@
    37.4 +<!DOCTYPE html>
    37.5 +<html>
    37.6 +  <head>
    37.7 +    <meta charset="utf-8" />
    37.8 +    <title>HTML Test: dir=auto, start with script, then L</title>
    37.9 +    <link rel="reference" href="dir_auto-contained-script-L-ref.html" />
   37.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   37.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   37.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   37.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   37.14 +    <meta name="assert" content="
   37.15 +      When dir='auto', the direction is set according to the first strong character
   37.16 +      of descendant text while ignoring descendant script elements.
   37.17 +      In this test, it is the Latin letter A, thus the direction must be
   37.18 +      resolved as LTR." />
   37.19 +    <style>
   37.20 +      input, textarea {
   37.21 +        font-size:1em;
   37.22 +      }
   37.23 +      body {
   37.24 +        font-size:2em;
   37.25 +      }
   37.26 +      .test, .ref {
   37.27 +        border: medium solid gray;
   37.28 +        width: 400px;
   37.29 +        margin: 20px;
   37.30 +      }
   37.31 +      .comments {
   37.32 +        display: none;
   37.33 +      }
   37.34 +    </style>
   37.35 +  </head>
   37.36 +  <body>
   37.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   37.38 +    <div class="comments">
   37.39 +      Key to entities used below:
   37.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   37.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   37.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   37.43 +    </div>
   37.44 +    <div class="test">
   37.45 +      <div dir="ltr">
   37.46 +        <div dir="ltr"><script>&#x05D0; = 3;</script>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   37.47 +      </div>
   37.48 +      <div dir="rtl">
   37.49 +        <div dir="ltr"><script>&#x05D0; = 3;</script>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   37.50 +      </div>
   37.51 +    </div>
   37.52 +    <div class="ref">
   37.53 +      <div dir="ltr">
   37.54 +        <div dir="ltr"><script>&#x05D0; = 3;</script>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   37.55 +      </div>
   37.56 +      <div dir="rtl">
   37.57 +        <div dir="ltr"><script>&#x05D0; = 3;</script>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   37.58 +      </div>
   37.59 +    </div>
   37.60 +  </body>
   37.61 +</html>
    38.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-script-L.html	Sun Feb 19 10:38:29 2012 +0200
    38.3 @@ -0,0 +1,58 @@
    38.4 +<!DOCTYPE html>
    38.5 +<html>
    38.6 +  <head>
    38.7 +    <meta charset="utf-8" />
    38.8 +    <title>HTML Test: dir=auto, start with script, then L</title>
    38.9 +    <link rel="reference" href="dir_auto-contained-script-L-ref.html" />
   38.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   38.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   38.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   38.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   38.14 +    <meta name="assert" content="
   38.15 +      When dir='auto', the direction is set according to the first strong character
   38.16 +      of descendant text while ignoring descendant script elements.
   38.17 +      In this test, it is the Latin letter A, thus the direction must be
   38.18 +      resolved as LTR." />
   38.19 +    <style>
   38.20 +      input, textarea {
   38.21 +        font-size:1em;
   38.22 +      }
   38.23 +      body {
   38.24 +        font-size:2em;
   38.25 +      }
   38.26 +      .test, .ref {
   38.27 +        border: medium solid gray;
   38.28 +        width: 400px;
   38.29 +        margin: 20px;
   38.30 +      }
   38.31 +      .comments {
   38.32 +        display: none;
   38.33 +      }
   38.34 +    </style>
   38.35 +  </head>
   38.36 +  <body>
   38.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   38.38 +    <div class="comments">
   38.39 +      Key to entities used below:
   38.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   38.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   38.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   38.43 +    </div>
   38.44 +    <div class="test">
   38.45 +      <div dir="ltr">
   38.46 +        <div dir="auto"><script>&#x05D0; = 3;</script>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   38.47 +      </div>
   38.48 +      <div dir="rtl">
   38.49 +        <div dir="auto"><script>&#x05D0; = 3;</script>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   38.50 +      </div>
   38.51 +    </div>
   38.52 +    <div class="ref">
   38.53 +      <div dir="ltr">
   38.54 +        <div dir="ltr"><script>&#x05D0; = 3;</script>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   38.55 +      </div>
   38.56 +      <div dir="rtl">
   38.57 +        <div dir="ltr"><script>&#x05D0; = 3;</script>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   38.58 +      </div>
   38.59 +    </div>
   38.60 +  </body>
   38.61 +</html>
    39.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-script-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    39.3 @@ -0,0 +1,58 @@
    39.4 +<!DOCTYPE html>
    39.5 +<html>
    39.6 +  <head>
    39.7 +    <meta charset="utf-8" />
    39.8 +    <title>HTML Test: dir=auto, start with script, then R</title>
    39.9 +    <link rel="reference" href="dir_auto-contained-script-R-ref.html" />
   39.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   39.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   39.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   39.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   39.14 +    <meta name="assert" content="
   39.15 +      When dir='auto', the direction is set according to the first strong character
   39.16 +      of descendant text while ignoring descendant script elements.
   39.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   39.18 +      resolved as RTL." />
   39.19 +    <style>
   39.20 +      input, textarea {
   39.21 +        font-size:1em;
   39.22 +      }
   39.23 +      body {
   39.24 +        font-size:2em;
   39.25 +      }
   39.26 +      .test, .ref {
   39.27 +        border: medium solid gray;
   39.28 +        width: 400px;
   39.29 +        margin: 20px;
   39.30 +      }
   39.31 +      .comments {
   39.32 +        display: none;
   39.33 +      }
   39.34 +    </style>
   39.35 +  </head>
   39.36 +  <body>
   39.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   39.38 +    <div class="comments">
   39.39 +      Key to entities used below:
   39.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   39.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   39.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   39.43 +    </div>
   39.44 +    <div class="test">
   39.45 +      <div dir="ltr">
   39.46 +        <div dir="rtl"><script>x = 3;</script>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   39.47 +      </div>
   39.48 +      <div dir="rtl">
   39.49 +        <div dir="rtl"><script>x = 3;</script>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   39.50 +      </div>
   39.51 +    </div>
   39.52 +    <div class="ref">
   39.53 +      <div dir="ltr">
   39.54 +        <div dir="rtl"><script>x = 3;</script>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   39.55 +      </div>
   39.56 +      <div dir="rtl">
   39.57 +        <div dir="rtl"><script>x = 3;</script>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   39.58 +      </div>
   39.59 +    </div>
   39.60 +  </body>
   39.61 +</html>
    40.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-script-R.html	Sun Feb 19 10:38:29 2012 +0200
    40.3 @@ -0,0 +1,58 @@
    40.4 +<!DOCTYPE html>
    40.5 +<html>
    40.6 +  <head>
    40.7 +    <meta charset="utf-8" />
    40.8 +    <title>HTML Test: dir=auto, start with script, then R</title>
    40.9 +    <link rel="reference" href="dir_auto-contained-script-R-ref.html" />
   40.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   40.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   40.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   40.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   40.14 +    <meta name="assert" content="
   40.15 +      When dir='auto', the direction is set according to the first strong character
   40.16 +      of descendant text while ignoring descendant script elements.
   40.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   40.18 +      resolved as RTL." />
   40.19 +    <style>
   40.20 +      input, textarea {
   40.21 +        font-size:1em;
   40.22 +      }
   40.23 +      body {
   40.24 +        font-size:2em;
   40.25 +      }
   40.26 +      .test, .ref {
   40.27 +        border: medium solid gray;
   40.28 +        width: 400px;
   40.29 +        margin: 20px;
   40.30 +      }
   40.31 +      .comments {
   40.32 +        display: none;
   40.33 +      }
   40.34 +    </style>
   40.35 +  </head>
   40.36 +  <body>
   40.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   40.38 +    <div class="comments">
   40.39 +      Key to entities used below:
   40.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   40.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   40.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   40.43 +    </div>
   40.44 +    <div class="test">
   40.45 +      <div dir="ltr">
   40.46 +        <div dir="auto"><script>x = 3;</script>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   40.47 +      </div>
   40.48 +      <div dir="rtl">
   40.49 +        <div dir="auto"><script>x = 3;</script>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   40.50 +      </div>
   40.51 +    </div>
   40.52 +    <div class="ref">
   40.53 +      <div dir="ltr">
   40.54 +        <div dir="rtl"><script>x = 3;</script>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   40.55 +      </div>
   40.56 +      <div dir="rtl">
   40.57 +        <div dir="rtl"><script>x = 3;</script>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   40.58 +      </div>
   40.59 +    </div>
   40.60 +  </body>
   40.61 +</html>
    41.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    41.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-style-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    41.3 @@ -0,0 +1,58 @@
    41.4 +<!DOCTYPE html>
    41.5 +<html>
    41.6 +  <head>
    41.7 +    <meta charset="utf-8" />
    41.8 +    <title>HTML Test: dir=auto, start with style, then L</title>
    41.9 +    <link rel="reference" href="dir_auto-contained-style-L-ref.html" />
   41.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   41.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   41.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   41.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   41.14 +    <meta name="assert" content="
   41.15 +      When dir='auto', the direction is set according to the first strong character
   41.16 +      of descendant text while ignoring descendant style elements.
   41.17 +      In this test, it is the Latin letter A, thus the direction must be
   41.18 +      resolved as LTR." />
   41.19 +    <style>
   41.20 +      input, textarea {
   41.21 +        font-size:1em;
   41.22 +      }
   41.23 +      body {
   41.24 +        font-size:2em;
   41.25 +      }
   41.26 +      .test, .ref {
   41.27 +        border: medium solid gray;
   41.28 +        width: 400px;
   41.29 +        margin: 20px;
   41.30 +      }
   41.31 +      .comments {
   41.32 +        display: none;
   41.33 +      }
   41.34 +    </style>
   41.35 +  </head>
   41.36 +  <body>
   41.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   41.38 +    <div class="comments">
   41.39 +      Key to entities used below:
   41.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   41.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   41.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   41.43 +    </div>
   41.44 +    <div class="test">
   41.45 +      <div dir="ltr">
   41.46 +        <div dir="ltr"><style>body {color:black;}</style>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   41.47 +      </div>
   41.48 +      <div dir="rtl">
   41.49 +        <div dir="ltr"><style>body {color:black;}</style>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   41.50 +      </div>
   41.51 +    </div>
   41.52 +    <div class="ref">
   41.53 +      <div dir="ltr">
   41.54 +        <div dir="ltr"><style>body {color:black;}</style>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   41.55 +      </div>
   41.56 +      <div dir="rtl">
   41.57 +        <div dir="ltr"><style>body {color:black;}</style>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   41.58 +      </div>
   41.59 +    </div>
   41.60 +  </body>
   41.61 +</html>
    42.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-style-L.html	Sun Feb 19 10:38:29 2012 +0200
    42.3 @@ -0,0 +1,58 @@
    42.4 +<!DOCTYPE html>
    42.5 +<html>
    42.6 +  <head>
    42.7 +    <meta charset="utf-8" />
    42.8 +    <title>HTML Test: dir=auto, start with style, then L</title>
    42.9 +    <link rel="reference" href="dir_auto-contained-style-L-ref.html" />
   42.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   42.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   42.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   42.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   42.14 +    <meta name="assert" content="
   42.15 +      When dir='auto', the direction is set according to the first strong character
   42.16 +      of descendant text while ignoring descendant style elements.
   42.17 +      In this test, it is the Latin letter A, thus the direction must be
   42.18 +      resolved as LTR." />
   42.19 +    <style>
   42.20 +      input, textarea {
   42.21 +        font-size:1em;
   42.22 +      }
   42.23 +      body {
   42.24 +        font-size:2em;
   42.25 +      }
   42.26 +      .test, .ref {
   42.27 +        border: medium solid gray;
   42.28 +        width: 400px;
   42.29 +        margin: 20px;
   42.30 +      }
   42.31 +      .comments {
   42.32 +        display: none;
   42.33 +      }
   42.34 +    </style>
   42.35 +  </head>
   42.36 +  <body>
   42.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   42.38 +    <div class="comments">
   42.39 +      Key to entities used below:
   42.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   42.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   42.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   42.43 +    </div>
   42.44 +    <div class="test">
   42.45 +      <div dir="ltr">
   42.46 +        <div dir="auto"><style>body {color:black;}</style>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   42.47 +      </div>
   42.48 +      <div dir="rtl">
   42.49 +        <div dir="auto"><style>body {color:black;}</style>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   42.50 +      </div>
   42.51 +    </div>
   42.52 +    <div class="ref">
   42.53 +      <div dir="ltr">
   42.54 +        <div dir="ltr"><style>body {color:black;}</style>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   42.55 +      </div>
   42.56 +      <div dir="rtl">
   42.57 +        <div dir="ltr"><style>body {color:black;}</style>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   42.58 +      </div>
   42.59 +    </div>
   42.60 +  </body>
   42.61 +</html>
    43.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-style-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    43.3 @@ -0,0 +1,58 @@
    43.4 +<!DOCTYPE html>
    43.5 +<html>
    43.6 +  <head>
    43.7 +    <meta charset="utf-8" />
    43.8 +    <title>HTML Test: dir=auto, start with style, then R</title>
    43.9 +    <link rel="reference" href="dir_auto-contained-style-R-ref.html" />
   43.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   43.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   43.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   43.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   43.14 +    <meta name="assert" content="
   43.15 +      When dir='auto', the direction is set according to the first strong character
   43.16 +      of descendant text while ignoring descendant style elements.
   43.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   43.18 +      resolved as RTL." />
   43.19 +    <style>
   43.20 +      input, textarea {
   43.21 +        font-size:1em;
   43.22 +      }
   43.23 +      body {
   43.24 +        font-size:2em;
   43.25 +      }
   43.26 +      .test, .ref {
   43.27 +        border: medium solid gray;
   43.28 +        width: 400px;
   43.29 +        margin: 20px;
   43.30 +      }
   43.31 +      .comments {
   43.32 +        display: none;
   43.33 +      }
   43.34 +    </style>
   43.35 +  </head>
   43.36 +  <body>
   43.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   43.38 +    <div class="comments">
   43.39 +      Key to entities used below:
   43.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   43.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   43.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   43.43 +    </div>
   43.44 +    <div class="test">
   43.45 +      <div dir="ltr">
   43.46 +        <div dir="rtl"><style>body {color:black;}</style>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   43.47 +      </div>
   43.48 +      <div dir="rtl">
   43.49 +        <div dir="rtl"><style>body {color:black;}</style>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   43.50 +      </div>
   43.51 +    </div>
   43.52 +    <div class="ref">
   43.53 +      <div dir="ltr">
   43.54 +        <div dir="rtl"><style>body {color:black;}</style>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   43.55 +      </div>
   43.56 +      <div dir="rtl">
   43.57 +        <div dir="rtl"><style>body {color:black;}</style>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   43.58 +      </div>
   43.59 +    </div>
   43.60 +  </body>
   43.61 +</html>
    44.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-style-R.html	Sun Feb 19 10:38:29 2012 +0200
    44.3 @@ -0,0 +1,58 @@
    44.4 +<!DOCTYPE html>
    44.5 +<html>
    44.6 +  <head>
    44.7 +    <meta charset="utf-8" />
    44.8 +    <title>HTML Test: dir=auto, start with style, then R</title>
    44.9 +    <link rel="reference" href="dir_auto-contained-style-R-ref.html" />
   44.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   44.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   44.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   44.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   44.14 +    <meta name="assert" content="
   44.15 +      When dir='auto', the direction is set according to the first strong character
   44.16 +      of descendant text while ignoring descendant style elements.
   44.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   44.18 +      resolved as RTL." />
   44.19 +    <style>
   44.20 +      input, textarea {
   44.21 +        font-size:1em;
   44.22 +      }
   44.23 +      body {
   44.24 +        font-size:2em;
   44.25 +      }
   44.26 +      .test, .ref {
   44.27 +        border: medium solid gray;
   44.28 +        width: 400px;
   44.29 +        margin: 20px;
   44.30 +      }
   44.31 +      .comments {
   44.32 +        display: none;
   44.33 +      }
   44.34 +    </style>
   44.35 +  </head>
   44.36 +  <body>
   44.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   44.38 +    <div class="comments">
   44.39 +      Key to entities used below:
   44.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   44.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   44.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   44.43 +    </div>
   44.44 +    <div class="test">
   44.45 +      <div dir="ltr">
   44.46 +        <div dir="auto"><style>body {color:black;}</style>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   44.47 +      </div>
   44.48 +      <div dir="rtl">
   44.49 +        <div dir="auto"><style>body {color:black;}</style>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   44.50 +      </div>
   44.51 +    </div>
   44.52 +    <div class="ref">
   44.53 +      <div dir="ltr">
   44.54 +        <div dir="rtl"><style>body {color:black;}</style>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   44.55 +      </div>
   44.56 +      <div dir="rtl">
   44.57 +        <div dir="rtl"><style>body {color:black;}</style>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   44.58 +      </div>
   44.59 +    </div>
   44.60 +  </body>
   44.61 +</html>
    45.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    45.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-textarea-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    45.3 @@ -0,0 +1,61 @@
    45.4 +<!DOCTYPE html>
    45.5 +<html>
    45.6 +  <head>
    45.7 +    <meta charset="utf-8" />
    45.8 +    <title>HTML Test: dir=auto, start with textarea, then L</title>
    45.9 +    <link rel="reference" href="dir_auto-contained-textarea-L-ref.html" />
   45.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   45.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   45.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   45.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   45.14 +    <meta name="assert" content="
   45.15 +      When dir='auto', the direction is set according to the first strong character
   45.16 +      of descendant text while ignoring descendant textarea elements.
   45.17 +      In this test, it is the Latin letter A, thus the direction must be
   45.18 +      resolved as LTR." />
   45.19 +    <style>
   45.20 +      input, textarea {
   45.21 +        font-size:1em;
   45.22 +      }
   45.23 +      body {
   45.24 +        font-size:2em;
   45.25 +      }
   45.26 +      .test, .ref {
   45.27 +        border: medium solid gray;
   45.28 +        width: 400px;
   45.29 +        margin: 20px;
   45.30 +      }
   45.31 +      .comments {
   45.32 +        display: none;
   45.33 +      }
   45.34 +    </style>
   45.35 +  </head>
   45.36 +  <body>
   45.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   45.38 +    <div class="comments">
   45.39 +      Key to entities used below:
   45.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   45.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   45.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   45.43 +      &#x05D3; - The Hebrew letter Dalet (strongly RTL).
   45.44 +      &#x05D4; - The Hebrew letter He (strongly RTL).
   45.45 +      &#x05D5; - The Hebrew letter Vav (strongly RTL).
   45.46 +    </div>
   45.47 +    <div class="test">
   45.48 +      <div dir="ltr">
   45.49 +        <div dir="ltr"><textarea>&#x05D3;&#x05D4;&#x05D5;</textarea>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   45.50 +      </div>
   45.51 +      <div dir="rtl">
   45.52 +        <div dir="ltr"><textarea>&#x05D3;&#x05D4;&#x05D5;</textarea>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   45.53 +      </div>
   45.54 +    </div>
   45.55 +    <div class="ref">
   45.56 +      <div dir="ltr">
   45.57 +        <div dir="ltr"><textarea>&#x05D3;&#x05D4;&#x05D5;</textarea>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   45.58 +      </div>
   45.59 +      <div dir="rtl">
   45.60 +        <div dir="ltr"><textarea>&#x05D3;&#x05D4;&#x05D5;</textarea>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   45.61 +      </div>
   45.62 +    </div>
   45.63 +  </body>
   45.64 +</html>
    46.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    46.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-textarea-L.html	Sun Feb 19 10:38:29 2012 +0200
    46.3 @@ -0,0 +1,61 @@
    46.4 +<!DOCTYPE html>
    46.5 +<html>
    46.6 +  <head>
    46.7 +    <meta charset="utf-8" />
    46.8 +    <title>HTML Test: dir=auto, start with textarea, then L</title>
    46.9 +    <link rel="reference" href="dir_auto-contained-textarea-L-ref.html" />
   46.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   46.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   46.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   46.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   46.14 +    <meta name="assert" content="
   46.15 +      When dir='auto', the direction is set according to the first strong character
   46.16 +      of descendant text while ignoring descendant textarea elements.
   46.17 +      In this test, it is the Latin letter A, thus the direction must be
   46.18 +      resolved as LTR." />
   46.19 +    <style>
   46.20 +      input, textarea {
   46.21 +        font-size:1em;
   46.22 +      }
   46.23 +      body {
   46.24 +        font-size:2em;
   46.25 +      }
   46.26 +      .test, .ref {
   46.27 +        border: medium solid gray;
   46.28 +        width: 400px;
   46.29 +        margin: 20px;
   46.30 +      }
   46.31 +      .comments {
   46.32 +        display: none;
   46.33 +      }
   46.34 +    </style>
   46.35 +  </head>
   46.36 +  <body>
   46.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   46.38 +    <div class="comments">
   46.39 +      Key to entities used below:
   46.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   46.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   46.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   46.43 +      &#x05D3; - The Hebrew letter Dalet (strongly RTL).
   46.44 +      &#x05D4; - The Hebrew letter He (strongly RTL).
   46.45 +      &#x05D5; - The Hebrew letter Vav (strongly RTL).
   46.46 +    </div>
   46.47 +    <div class="test">
   46.48 +      <div dir="ltr">
   46.49 +        <div dir="auto"><textarea>&#x05D3;&#x05D4;&#x05D5;</textarea>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   46.50 +      </div>
   46.51 +      <div dir="rtl">
   46.52 +        <div dir="auto"><textarea>&#x05D3;&#x05D4;&#x05D5;</textarea>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   46.53 +      </div>
   46.54 +    </div>
   46.55 +    <div class="ref">
   46.56 +      <div dir="ltr">
   46.57 +        <div dir="ltr"><textarea>&#x05D3;&#x05D4;&#x05D5;</textarea>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   46.58 +      </div>
   46.59 +      <div dir="rtl">
   46.60 +        <div dir="ltr"><textarea>&#x05D3;&#x05D4;&#x05D5;</textarea>ABC&#x05D0;&#x05D1;&#x05D2;.</div>
   46.61 +      </div>
   46.62 +    </div>
   46.63 +  </body>
   46.64 +</html>
    47.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    47.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-textarea-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    47.3 @@ -0,0 +1,58 @@
    47.4 +<!DOCTYPE html>
    47.5 +<html>
    47.6 +  <head>
    47.7 +    <meta charset="utf-8" />
    47.8 +    <title>HTML Test: dir=auto, start with textarea, then R</title>
    47.9 +    <link rel="reference" href="dir_auto-contained-textarea-R-ref.html" />
   47.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   47.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   47.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   47.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   47.14 +    <meta name="assert" content="
   47.15 +      When dir='auto', the direction is set according to the first strong character
   47.16 +      of descendant text while ignoring descendant textarea elements.
   47.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   47.18 +      resolved as RTL." />
   47.19 +    <style>
   47.20 +      input, textarea {
   47.21 +        font-size:1em;
   47.22 +      }
   47.23 +      body {
   47.24 +        font-size:2em;
   47.25 +      }
   47.26 +      .test, .ref {
   47.27 +        border: medium solid gray;
   47.28 +        width: 400px;
   47.29 +        margin: 20px;
   47.30 +      }
   47.31 +      .comments {
   47.32 +        display: none;
   47.33 +      }
   47.34 +    </style>
   47.35 +  </head>
   47.36 +  <body>
   47.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   47.38 +    <div class="comments">
   47.39 +      Key to entities used below:
   47.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   47.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   47.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   47.43 +    </div>
   47.44 +    <div class="test">
   47.45 +      <div dir="ltr">
   47.46 +        <div dir="auto"><textarea>DEF</textarea>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   47.47 +      </div>
   47.48 +      <div dir="rtl">
   47.49 +        <div dir="auto"><textarea>DEF</textarea>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   47.50 +      </div>
   47.51 +    </div>
   47.52 +    <div class="ref">
   47.53 +      <div dir="ltr">
   47.54 +        <div dir="rtl"><textarea>DEF</textarea>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   47.55 +      </div>
   47.56 +      <div dir="rtl">
   47.57 +        <div dir="rtl"><textarea>DEF</textarea>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   47.58 +      </div>
   47.59 +    </div>
   47.60 +  </body>
   47.61 +</html>
    48.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    48.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-contained-textarea-R.html	Sun Feb 19 10:38:29 2012 +0200
    48.3 @@ -0,0 +1,58 @@
    48.4 +<!DOCTYPE html>
    48.5 +<html>
    48.6 +  <head>
    48.7 +    <meta charset="utf-8" />
    48.8 +    <title>HTML Test: dir=auto, start with textarea, then R</title>
    48.9 +    <link rel="reference" href="dir_auto-contained-textarea-R-ref.html" />
   48.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   48.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   48.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   48.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   48.14 +    <meta name="assert" content="
   48.15 +      When dir='auto', the direction is set according to the first strong character
   48.16 +      of descendant text while ignoring descendant textarea elements.
   48.17 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   48.18 +      resolved as RTL." />
   48.19 +    <style>
   48.20 +      input, textarea {
   48.21 +        font-size:1em;
   48.22 +      }
   48.23 +      body {
   48.24 +        font-size:2em;
   48.25 +      }
   48.26 +      .test, .ref {
   48.27 +        border: medium solid gray;
   48.28 +        width: 400px;
   48.29 +        margin: 20px;
   48.30 +      }
   48.31 +      .comments {
   48.32 +        display: none;
   48.33 +      }
   48.34 +    </style>
   48.35 +  </head>
   48.36 +  <body>
   48.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   48.38 +    <div class="comments">
   48.39 +      Key to entities used below:
   48.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   48.41 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   48.42 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   48.43 +    </div>
   48.44 +    <div class="test">
   48.45 +      <div dir="ltr">
   48.46 +        <div dir="auto"><textarea>DEF</textarea>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   48.47 +      </div>
   48.48 +      <div dir="rtl">
   48.49 +        <div dir="auto"><textarea>DEF</textarea>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   48.50 +      </div>
   48.51 +    </div>
   48.52 +    <div class="ref">
   48.53 +      <div dir="ltr">
   48.54 +        <div dir="rtl"><textarea>DEF</textarea>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   48.55 +      </div>
   48.56 +      <div dir="rtl">
   48.57 +        <div dir="rtl"><textarea>DEF</textarea>&#x05D0;&#x05D1;&#x05D2;ABC.</div>
   48.58 +      </div>
   48.59 +    </div>
   48.60 +  </body>
   48.61 +</html>
    49.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    49.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-EN-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    49.3 @@ -0,0 +1,59 @@
    49.4 +<!DOCTYPE html>
    49.5 +<html>
    49.6 +  <head>
    49.7 +    <meta charset="utf-8" />
    49.8 +    <title>HTML Test: input with dir=auto, start with EN+L</title>
    49.9 +    <link rel="reference" href="dir_auto-input-EN-L-ref.html" />
   49.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   49.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   49.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   49.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   49.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   49.15 +    <meta name="assert" content="
   49.16 +      When dir='auto', the direction of an input element is set according to
   49.17 +      the first strong character of its value.
   49.18 +      In this test, it is the Latin letter A since digits are not strongly
   49.19 +      directional, thus the direction must be resolved as LTR." />
   49.20 +    <style>
   49.21 +      input, textarea {
   49.22 +        font-size:1em;
   49.23 +      }
   49.24 +      body {
   49.25 +        font-size:2em;
   49.26 +      }
   49.27 +      .test, .ref {
   49.28 +        border: medium solid gray;
   49.29 +        width: 400px;
   49.30 +        margin: 20px;
   49.31 +      }
   49.32 +      .comments {
   49.33 +        display: none;
   49.34 +      }
   49.35 +    </style>
   49.36 +  </head>
   49.37 +  <body>
   49.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   49.39 +    <div class="comments">
   49.40 +      Key to entities used below:
   49.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   49.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   49.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   49.44 +    </div>
   49.45 +    <div class="test">
   49.46 +      <div dir="ltr">
   49.47 +        <input type="text" dir="ltr" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   49.48 +      </div>
   49.49 +      <div dir="rtl">
   49.50 +        <input type="text" dir="ltr" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   49.51 +      </div>
   49.52 +    </div>
   49.53 +    <div class="ref">
   49.54 +      <div dir="ltr">
   49.55 +        <input type="text" dir="ltr" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   49.56 +      </div>
   49.57 +      <div dir="rtl">
   49.58 +        <input type="text" dir="ltr" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   49.59 +      </div>
   49.60 +    </div>
   49.61 +  </body>
   49.62 +</html>
    50.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    50.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-EN-L.html	Sun Feb 19 10:38:29 2012 +0200
    50.3 @@ -0,0 +1,59 @@
    50.4 +<!DOCTYPE html>
    50.5 +<html>
    50.6 +  <head>
    50.7 +    <meta charset="utf-8" />
    50.8 +    <title>HTML Test: input with dir=auto, start with EN+L</title>
    50.9 +    <link rel="reference" href="dir_auto-input-EN-L-ref.html" />
   50.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   50.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   50.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   50.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   50.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   50.15 +    <meta name="assert" content="
   50.16 +      When dir='auto', the direction of an input element is set according to
   50.17 +      the first strong character of its value.
   50.18 +      In this test, it is the Latin letter A since digits are not strongly
   50.19 +      directional, thus the direction must be resolved as LTR." />
   50.20 +    <style>
   50.21 +      input, textarea {
   50.22 +        font-size:1em;
   50.23 +      }
   50.24 +      body {
   50.25 +        font-size:2em;
   50.26 +      }
   50.27 +      .test, .ref {
   50.28 +        border: medium solid gray;
   50.29 +        width: 400px;
   50.30 +        margin: 20px;
   50.31 +      }
   50.32 +      .comments {
   50.33 +        display: none;
   50.34 +      }
   50.35 +    </style>
   50.36 +  </head>
   50.37 +  <body>
   50.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   50.39 +    <div class="comments">
   50.40 +      Key to entities used below:
   50.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   50.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   50.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   50.44 +    </div>
   50.45 +    <div class="test">
   50.46 +      <div dir="ltr">
   50.47 +        <input type="text" dir="auto" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   50.48 +      </div>
   50.49 +      <div dir="rtl">
   50.50 +        <input type="text" dir="auto" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   50.51 +      </div>
   50.52 +    </div>
   50.53 +    <div class="ref">
   50.54 +      <div dir="ltr">
   50.55 +        <input type="text" dir="ltr" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   50.56 +      </div>
   50.57 +      <div dir="rtl">
   50.58 +        <input type="text" dir="ltr" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   50.59 +      </div>
   50.60 +    </div>
   50.61 +  </body>
   50.62 +</html>
    51.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    51.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-EN-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    51.3 @@ -0,0 +1,59 @@
    51.4 +<!DOCTYPE html>
    51.5 +<html>
    51.6 +  <head>
    51.7 +    <meta charset="utf-8" />
    51.8 +    <title>HTML Test: input with dir=auto, start with EN+R</title>
    51.9 +    <link rel="reference" href="dir_auto-input-EN-R-ref.html" />
   51.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   51.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   51.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   51.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   51.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   51.15 +    <meta name="assert" content="
   51.16 +      When dir='auto', the direction of an input element is set according to
   51.17 +      the first strong character of its value.
   51.18 +      In this test, it is the Hebrew letter Alef since digits are not strongly
   51.19 +      directional, thus the direction must be resolved as RTL." />
   51.20 +    <style>
   51.21 +      input, textarea {
   51.22 +        font-size:1em;
   51.23 +      }
   51.24 +      body {
   51.25 +        font-size:2em;
   51.26 +      }
   51.27 +      .test, .ref {
   51.28 +        border: medium solid gray;
   51.29 +        width: 400px;
   51.30 +        margin: 20px;
   51.31 +      }
   51.32 +      .comments {
   51.33 +        display: none;
   51.34 +      }
   51.35 +    </style>
   51.36 +  </head>
   51.37 +  <body>
   51.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   51.39 +    <div class="comments">
   51.40 +      Key to entities used below:
   51.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   51.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   51.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   51.44 +    </div>
   51.45 +    <div class="test">
   51.46 +      <div dir="ltr">
   51.47 +        <input type="text" dir="rtl" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   51.48 +      </div>
   51.49 +      <div dir="rtl">
   51.50 +        <input type="text" dir="rtl" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   51.51 +      </div>
   51.52 +    </div>
   51.53 +    <div class="ref">
   51.54 +      <div dir="ltr">
   51.55 +        <input type="text" dir="rtl" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   51.56 +      </div>
   51.57 +      <div dir="rtl">
   51.58 +        <input type="text" dir="rtl" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   51.59 +      </div>
   51.60 +    </div>
   51.61 +  </body>
   51.62 +</html>
    52.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    52.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-EN-R.html	Sun Feb 19 10:38:29 2012 +0200
    52.3 @@ -0,0 +1,59 @@
    52.4 +<!DOCTYPE html>
    52.5 +<html>
    52.6 +  <head>
    52.7 +    <meta charset="utf-8" />
    52.8 +    <title>HTML Test: input with dir=auto, start with EN+R</title>
    52.9 +    <link rel="reference" href="dir_auto-input-EN-R-ref.html" />
   52.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   52.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   52.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   52.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   52.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   52.15 +    <meta name="assert" content="
   52.16 +      When dir='auto', the direction of an input element is set according to
   52.17 +      the first strong character of its value.
   52.18 +      In this test, it is the Hebrew letter Alef since digits are not strongly
   52.19 +      directional, thus the direction must be resolved as RTL." />
   52.20 +    <style>
   52.21 +      input, textarea {
   52.22 +        font-size:1em;
   52.23 +      }
   52.24 +      body {
   52.25 +        font-size:2em;
   52.26 +      }
   52.27 +      .test, .ref {
   52.28 +        border: medium solid gray;
   52.29 +        width: 400px;
   52.30 +        margin: 20px;
   52.31 +      }
   52.32 +      .comments {
   52.33 +        display: none;
   52.34 +      }
   52.35 +    </style>
   52.36 +  </head>
   52.37 +  <body>
   52.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   52.39 +    <div class="comments">
   52.40 +      Key to entities used below:
   52.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   52.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   52.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   52.44 +    </div>
   52.45 +    <div class="test">
   52.46 +      <div dir="ltr">
   52.47 +        <input type="text" dir="auto" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   52.48 +      </div>
   52.49 +      <div dir="rtl">
   52.50 +        <input type="text" dir="auto" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   52.51 +      </div>
   52.52 +    </div>
   52.53 +    <div class="ref">
   52.54 +      <div dir="ltr">
   52.55 +        <input type="text" dir="rtl" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   52.56 +      </div>
   52.57 +      <div dir="rtl">
   52.58 +        <input type="text" dir="rtl" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   52.59 +      </div>
   52.60 +    </div>
   52.61 +  </body>
   52.62 +</html>
    53.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    53.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    53.3 @@ -0,0 +1,59 @@
    53.4 +<!DOCTYPE html>
    53.5 +<html>
    53.6 +  <head>
    53.7 +    <meta charset="utf-8" />
    53.8 +    <title>HTML Test: input with dir=auto, start with L</title>
    53.9 +    <link rel="reference" href="dir_auto-input-L-ref.html" />
   53.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   53.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   53.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   53.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   53.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   53.15 +    <meta name="assert" content="
   53.16 +      When dir='auto', the direction of an input element is set according to
   53.17 +      the first strong character of its value.
   53.18 +      In this test, it is the Latin letter A, thus the direction must be
   53.19 +      resolved as LTR." />
   53.20 +    <style>
   53.21 +      input, textarea {
   53.22 +        font-size:1em;
   53.23 +      }
   53.24 +      body {
   53.25 +        font-size:2em;
   53.26 +      }
   53.27 +      .test, .ref {
   53.28 +        border: medium solid gray;
   53.29 +        width: 400px;
   53.30 +        margin: 20px;
   53.31 +      }
   53.32 +      .comments {
   53.33 +        display: none;
   53.34 +      }
   53.35 +    </style>
   53.36 +  </head>
   53.37 +  <body>
   53.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   53.39 +    <div class="comments">
   53.40 +      Key to entities used below:
   53.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   53.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   53.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   53.44 +    </div>
   53.45 +    <div class="test">
   53.46 +      <div dir="ltr">
   53.47 +        <input type="text" dir="ltr" value="ABC&#x05d0;&#x05d1;&#x05d2;." />
   53.48 +      </div>
   53.49 +      <div dir="rtl">
   53.50 +        <input type="text" dir="ltr" value="ABC&#x05d0;&#x05d1;&#x05d2;." />
   53.51 +      </div>
   53.52 +    </div>
   53.53 +    <div class="ref">
   53.54 +      <div dir="ltr">
   53.55 +        <input type="text" dir="ltr" value="ABC&#x05d0;&#x05d1;&#x05d2;." />
   53.56 +      </div>
   53.57 +      <div dir="rtl">
   53.58 +        <input type="text" dir="ltr" value="ABC&#x05d0;&#x05d1;&#x05d2;." />
   53.59 +      </div>
   53.60 +    </div>
   53.61 +  </body>
   53.62 +</html>
    54.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    54.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-L.html	Sun Feb 19 10:38:29 2012 +0200
    54.3 @@ -0,0 +1,59 @@
    54.4 +<!DOCTYPE html>
    54.5 +<html>
    54.6 +  <head>
    54.7 +    <meta charset="utf-8" />
    54.8 +    <title>HTML Test: input with dir=auto, start with L</title>
    54.9 +    <link rel="reference" href="dir_auto-input-L-ref.html" />
   54.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   54.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   54.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   54.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   54.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   54.15 +    <meta name="assert" content="
   54.16 +      When dir='auto', the direction of an input element is set according to
   54.17 +      the first strong character of its value.
   54.18 +      In this test, it is the Latin letter A, thus the direction must be
   54.19 +      resolved as LTR." />
   54.20 +    <style>
   54.21 +      input, textarea {
   54.22 +        font-size:1em;
   54.23 +      }
   54.24 +      body {
   54.25 +        font-size:2em;
   54.26 +      }
   54.27 +      .test, .ref {
   54.28 +        border: medium solid gray;
   54.29 +        width: 400px;
   54.30 +        margin: 20px;
   54.31 +      }
   54.32 +      .comments {
   54.33 +        display: none;
   54.34 +      }
   54.35 +    </style>
   54.36 +  </head>
   54.37 +  <body>
   54.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   54.39 +    <div class="comments">
   54.40 +      Key to entities used below:
   54.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   54.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   54.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   54.44 +    </div>
   54.45 +    <div class="test">
   54.46 +      <div dir="ltr">
   54.47 +        <input type="text" dir="auto" value="ABC&#x05d0;&#x05d1;&#x05d2;." />
   54.48 +      </div>
   54.49 +      <div dir="rtl">
   54.50 +        <input type="text" dir="auto" value="ABC&#x05d0;&#x05d1;&#x05d2;." />
   54.51 +      </div>
   54.52 +    </div>
   54.53 +    <div class="ref">
   54.54 +      <div dir="ltr">
   54.55 +        <input type="text" dir="ltr" value="ABC&#x05d0;&#x05d1;&#x05d2;." />
   54.56 +      </div>
   54.57 +      <div dir="rtl">
   54.58 +        <input type="text" dir="ltr" value="ABC&#x05d0;&#x05d1;&#x05d2;." />
   54.59 +      </div>
   54.60 +    </div>
   54.61 +  </body>
   54.62 +</html>
    55.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    55.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-N-EN-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    55.3 @@ -0,0 +1,59 @@
    55.4 +<!DOCTYPE html>
    55.5 +<html>
    55.6 +  <head>
    55.7 +    <meta charset="utf-8" />
    55.8 +    <title>HTML Test: input with dir=auto, start with N+EN+L</title>
    55.9 +    <link rel="reference" href="dir_auto-input-N-EN-L-ref.html" />
   55.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   55.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   55.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   55.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   55.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   55.15 +    <meta name="assert" content="
   55.16 +      When dir='auto', the direction of an input element is set according to
   55.17 +      the first strong character of its value.
   55.18 +      In this test, it is the Latin letter A since neutrals and digits are not
   55.19 +      strongly directional, thus the direction must be resolved as LTR." />
   55.20 +    <style>
   55.21 +      input, textarea {
   55.22 +        font-size:1em;
   55.23 +      }
   55.24 +      body {
   55.25 +        font-size:2em;
   55.26 +      }
   55.27 +      .test, .ref {
   55.28 +        border: medium solid gray;
   55.29 +        width: 400px;
   55.30 +        margin: 20px;
   55.31 +      }
   55.32 +      .comments {
   55.33 +        display: none;
   55.34 +      }
   55.35 +    </style>
   55.36 +  </head>
   55.37 +  <body>
   55.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   55.39 +    <div class="comments">
   55.40 +      Key to entities used below:
   55.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   55.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   55.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   55.44 +    </div>
   55.45 +    <div class="test">
   55.46 +      <div dir="ltr">
   55.47 +        <input type="text" dir="ltr" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   55.48 +      </div>
   55.49 +      <div dir="rtl">
   55.50 +        <input type="text" dir="ltr" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   55.51 +      </div>
   55.52 +    </div>
   55.53 +    <div class="ref">
   55.54 +      <div dir="ltr">
   55.55 +        <input type="text" dir="ltr" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   55.56 +      </div>
   55.57 +      <div dir="rtl">
   55.58 +        <input type="text" dir="ltr" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   55.59 +      </div>
   55.60 +    </div>
   55.61 +  </body>
   55.62 +</html>
    56.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    56.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-N-EN-L.html	Sun Feb 19 10:38:29 2012 +0200
    56.3 @@ -0,0 +1,59 @@
    56.4 +<!DOCTYPE html>
    56.5 +<html>
    56.6 +  <head>
    56.7 +    <meta charset="utf-8" />
    56.8 +    <title>HTML Test: input with dir=auto, start with N+EN+L</title>
    56.9 +    <link rel="reference" href="dir_auto-input-N-EN-L-ref.html" />
   56.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   56.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   56.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   56.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   56.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   56.15 +    <meta name="assert" content="
   56.16 +      When dir='auto', the direction of an input element is set according to
   56.17 +      the first strong character of its value.
   56.18 +      In this test, it is the Latin letter A since neutrals and digits are not
   56.19 +      strongly directional, thus the direction must be resolved as LTR." />
   56.20 +    <style>
   56.21 +      input, textarea {
   56.22 +        font-size:1em;
   56.23 +      }
   56.24 +      body {
   56.25 +        font-size:2em;
   56.26 +      }
   56.27 +      .test, .ref {
   56.28 +        border: medium solid gray;
   56.29 +        width: 400px;
   56.30 +        margin: 20px;
   56.31 +      }
   56.32 +      .comments {
   56.33 +        display: none;
   56.34 +      }
   56.35 +    </style>
   56.36 +  </head>
   56.37 +  <body>
   56.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   56.39 +    <div class="comments">
   56.40 +      Key to entities used below:
   56.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   56.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   56.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   56.44 +    </div>
   56.45 +    <div class="test">
   56.46 +      <div dir="ltr">
   56.47 +        <input type="text" dir="auto" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   56.48 +      </div>
   56.49 +      <div dir="rtl">
   56.50 +        <input type="text" dir="auto" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   56.51 +      </div>
   56.52 +    </div>
   56.53 +    <div class="ref">
   56.54 +      <div dir="ltr">
   56.55 +        <input type="text" dir="ltr" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   56.56 +      </div>
   56.57 +      <div dir="rtl">
   56.58 +        <input type="text" dir="ltr" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   56.59 +      </div>
   56.60 +    </div>
   56.61 +  </body>
   56.62 +</html>
    57.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    57.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-N-EN-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    57.3 @@ -0,0 +1,59 @@
    57.4 +<!DOCTYPE html>
    57.5 +<html>
    57.6 +  <head>
    57.7 +    <meta charset="utf-8" />
    57.8 +    <title>HTML Test: input with dir=auto, start with N+EN+R</title>
    57.9 +    <link rel="reference" href="dir_auto-input-N-EN-R-ref.html" />
   57.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   57.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   57.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   57.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   57.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   57.15 +    <meta name="assert" content="
   57.16 +      When dir='auto', the direction of an input element is set according to
   57.17 +      the first strong character of its value.
   57.18 +      In this test, it is the Hebrew letter Alef since neutrals and digits are not
   57.19 +      strongly directional, thus the direction must be resolved as RTL." />
   57.20 +    <style>
   57.21 +      input, textarea {
   57.22 +        font-size:1em;
   57.23 +      }
   57.24 +      body {
   57.25 +        font-size:2em;
   57.26 +      }
   57.27 +      .test, .ref {
   57.28 +        border: medium solid gray;
   57.29 +        width: 400px;
   57.30 +        margin: 20px;
   57.31 +      }
   57.32 +      .comments {
   57.33 +        display: none;
   57.34 +      }
   57.35 +    </style>
   57.36 +  </head>
   57.37 +  <body>
   57.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   57.39 +    <div class="comments">
   57.40 +      Key to entities used below:
   57.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   57.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   57.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   57.44 +    </div>
   57.45 +    <div class="test">
   57.46 +      <div dir="ltr">
   57.47 +        <input type="text" dir="rtl" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   57.48 +      </div>
   57.49 +      <div dir="rtl">
   57.50 +        <input type="text" dir="rtl" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   57.51 +      </div>
   57.52 +    </div>
   57.53 +    <div class="ref">
   57.54 +      <div dir="ltr">
   57.55 +        <input type="text" dir="rtl" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   57.56 +      </div>
   57.57 +      <div dir="rtl">
   57.58 +        <input type="text" dir="rtl" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   57.59 +      </div>
   57.60 +    </div>
   57.61 +  </body>
   57.62 +</html>
    58.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    58.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-N-EN-R.html	Sun Feb 19 10:38:29 2012 +0200
    58.3 @@ -0,0 +1,59 @@
    58.4 +<!DOCTYPE html>
    58.5 +<html>
    58.6 +  <head>
    58.7 +    <meta charset="utf-8" />
    58.8 +    <title>HTML Test: input with dir=auto, start with N+EN+R</title>
    58.9 +    <link rel="reference" href="dir_auto-input-N-EN-R-ref.html" />
   58.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   58.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   58.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   58.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   58.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   58.15 +    <meta name="assert" content="
   58.16 +      When dir='auto', the direction of an input element is set according to
   58.17 +      the first strong character of its value.
   58.18 +      In this test, it is the Hebrew letter Alef since neutrals and digits are not
   58.19 +      strongly directional, thus the direction must be resolved as RTL." />
   58.20 +    <style>
   58.21 +      input, textarea {
   58.22 +        font-size:1em;
   58.23 +      }
   58.24 +      body {
   58.25 +        font-size:2em;
   58.26 +      }
   58.27 +      .test, .ref {
   58.28 +        border: medium solid gray;
   58.29 +        width: 400px;
   58.30 +        margin: 20px;
   58.31 +      }
   58.32 +      .comments {
   58.33 +        display: none;
   58.34 +      }
   58.35 +    </style>
   58.36 +  </head>
   58.37 +  <body>
   58.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   58.39 +    <div class="comments">
   58.40 +      Key to entities used below:
   58.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   58.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   58.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   58.44 +    </div>
   58.45 +    <div class="test">
   58.46 +      <div dir="ltr">
   58.47 +        <input type="text" dir="auto" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   58.48 +      </div>
   58.49 +      <div dir="rtl">
   58.50 +        <input type="text" dir="auto" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   58.51 +      </div>
   58.52 +    </div>
   58.53 +    <div class="ref">
   58.54 +      <div dir="ltr">
   58.55 +        <input type="text" dir="rtl" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   58.56 +      </div>
   58.57 +      <div dir="rtl">
   58.58 +        <input type="text" dir="rtl" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   58.59 +      </div>
   58.60 +    </div>
   58.61 +  </body>
   58.62 +</html>
    59.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    59.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-N-EN-ref.html	Sun Feb 19 10:38:29 2012 +0200
    59.3 @@ -0,0 +1,54 @@
    59.4 +<!DOCTYPE html>
    59.5 +<html>
    59.6 +  <head>
    59.7 +    <meta charset="utf-8" />
    59.8 +    <title>HTML Test: input with dir=auto, all N+EN</title>
    59.9 +    <link rel="reference" href="dir_auto-input-N-EN-ref.html" />
   59.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   59.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   59.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   59.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   59.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   59.15 +    <meta name="assert" content="
   59.16 +      When dir='auto', the direction of an input element is set according to
   59.17 +      the first strong character of its value, or to LTR if there is no such
   59.18 +      character.
   59.19 +      In this test, there is no strongly directional character in the value,
   59.20 +      thus the direction must be resolved as LTR." />
   59.21 +    <style>
   59.22 +      input, textarea {
   59.23 +        font-size:1em;
   59.24 +      }
   59.25 +      body {
   59.26 +        font-size:2em;
   59.27 +      }
   59.28 +      .test, .ref {
   59.29 +        border: medium solid gray;
   59.30 +        width: 400px;
   59.31 +        margin: 20px;
   59.32 +      }
   59.33 +      .comments {
   59.34 +        display: none;
   59.35 +      }
   59.36 +    </style>
   59.37 +  </head>
   59.38 +  <body>
   59.39 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   59.40 +    <div class="test">
   59.41 +      <div dir="ltr">
   59.42 +        <input type="text" dir="ltr" value="@123!" />
   59.43 +      </div>
   59.44 +      <div dir="rtl">
   59.45 +        <input type="text" dir="ltr" value="@123!" />
   59.46 +      </div>
   59.47 +    </div>
   59.48 +    <div class="ref">
   59.49 +      <div dir="ltr">
   59.50 +        <input type="text" dir="ltr" value="@123!" />
   59.51 +      </div>
   59.52 +      <div dir="rtl">
   59.53 +        <input type="text" dir="ltr" value="@123!" />
   59.54 +      </div>
   59.55 +    </div>
   59.56 +  </body>
   59.57 +</html>
    60.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    60.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-N-EN.html	Sun Feb 19 10:38:29 2012 +0200
    60.3 @@ -0,0 +1,54 @@
    60.4 +<!DOCTYPE html>
    60.5 +<html>
    60.6 +  <head>
    60.7 +    <meta charset="utf-8" />
    60.8 +    <title>HTML Test: input with dir=auto, all N+EN</title>
    60.9 +    <link rel="reference" href="dir_auto-input-N-EN-ref.html" />
   60.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   60.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   60.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   60.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   60.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   60.15 +    <meta name="assert" content="
   60.16 +      When dir='auto', the direction of an input element is set according to
   60.17 +      the first strong character of its value, or to LTR if there is no such
   60.18 +      character.
   60.19 +      In this test, there is no strongly directional character in the value,
   60.20 +      thus the direction must be resolved as LTR." />
   60.21 +    <style>
   60.22 +      input, textarea {
   60.23 +        font-size:1em;
   60.24 +      }
   60.25 +      body {
   60.26 +        font-size:2em;
   60.27 +      }
   60.28 +      .test, .ref {
   60.29 +        border: medium solid gray;
   60.30 +        width: 400px;
   60.31 +        margin: 20px;
   60.32 +      }
   60.33 +      .comments {
   60.34 +        display: none;
   60.35 +      }
   60.36 +    </style>
   60.37 +  </head>
   60.38 +  <body>
   60.39 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   60.40 +    <div class="test">
   60.41 +      <div dir="ltr">
   60.42 +        <input type="text" dir="auto" value="@123!" />
   60.43 +      </div>
   60.44 +      <div dir="rtl">
   60.45 +        <input type="text" dir="auto" value="@123!" />
   60.46 +      </div>
   60.47 +    </div>
   60.48 +    <div class="ref">
   60.49 +      <div dir="ltr">
   60.50 +        <input type="text" dir="ltr" value="@123!" />
   60.51 +      </div>
   60.52 +      <div dir="rtl">
   60.53 +        <input type="text" dir="ltr" value="@123!" />
   60.54 +      </div>
   60.55 +    </div>
   60.56 +  </body>
   60.57 +</html>
    61.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    61.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-N-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    61.3 @@ -0,0 +1,59 @@
    61.4 +<!DOCTYPE html>
    61.5 +<html>
    61.6 +  <head>
    61.7 +    <meta charset="utf-8" />
    61.8 +    <title>HTML Test: input with dir=auto, start with N+L</title>
    61.9 +    <link rel="reference" href="dir_auto-input-N-L-ref.html" />
   61.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   61.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   61.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   61.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   61.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   61.15 +    <meta name="assert" content="
   61.16 +      When dir='auto', the direction of an input element is set according to
   61.17 +      the first strong character of its value.
   61.18 +      In this test, it is the Latin letter A since neutrals are not
   61.19 +      strongly directional, thus the direction must be resolved as LTR." />
   61.20 +    <style>
   61.21 +      input, textarea {
   61.22 +        font-size:1em;
   61.23 +      }
   61.24 +      body {
   61.25 +        font-size:2em;
   61.26 +      }
   61.27 +      .test, .ref {
   61.28 +        border: medium solid gray;
   61.29 +        width: 400px;
   61.30 +        margin: 20px;
   61.31 +      }
   61.32 +      .comments {
   61.33 +        display: none;
   61.34 +      }
   61.35 +    </style>
   61.36 +  </head>
   61.37 +  <body>
   61.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   61.39 +    <div class="comments">
   61.40 +      Key to entities used below:
   61.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   61.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   61.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   61.44 +    </div>
   61.45 +    <div class="test">
   61.46 +      <div dir="ltr">
   61.47 +        <input type="text" dir="ltr" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   61.48 +      </div>
   61.49 +      <div dir="rtl">
   61.50 +        <input type="text" dir="ltr" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   61.51 +      </div>
   61.52 +    </div>
   61.53 +    <div class="ref">
   61.54 +      <div dir="ltr">
   61.55 +        <input type="text" dir="ltr" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   61.56 +      </div>
   61.57 +      <div dir="rtl">
   61.58 +        <input type="text" dir="ltr" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   61.59 +      </div>
   61.60 +    </div>
   61.61 +  </body>
   61.62 +</html>
    62.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    62.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-N-L.html	Sun Feb 19 10:38:29 2012 +0200
    62.3 @@ -0,0 +1,59 @@
    62.4 +<!DOCTYPE html>
    62.5 +<html>
    62.6 +  <head>
    62.7 +    <meta charset="utf-8" />
    62.8 +    <title>HTML Test: input with dir=auto, start with N+L</title>
    62.9 +    <link rel="reference" href="dir_auto-input-N-L-ref.html" />
   62.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   62.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   62.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   62.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   62.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   62.15 +    <meta name="assert" content="
   62.16 +      When dir='auto', the direction of an input element is set according to
   62.17 +      the first strong character of its value.
   62.18 +      In this test, it is the Latin letter A since neutrals are not
   62.19 +      strongly directional, thus the direction must be resolved as LTR." />
   62.20 +    <style>
   62.21 +      input, textarea {
   62.22 +        font-size:1em;
   62.23 +      }
   62.24 +      body {
   62.25 +        font-size:2em;
   62.26 +      }
   62.27 +      .test, .ref {
   62.28 +        border: medium solid gray;
   62.29 +        width: 400px;
   62.30 +        margin: 20px;
   62.31 +      }
   62.32 +      .comments {
   62.33 +        display: none;
   62.34 +      }
   62.35 +    </style>
   62.36 +  </head>
   62.37 +  <body>
   62.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   62.39 +    <div class="comments">
   62.40 +      Key to entities used below:
   62.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   62.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   62.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   62.44 +    </div>
   62.45 +    <div class="test">
   62.46 +      <div dir="ltr">
   62.47 +        <input type="text" dir="auto" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   62.48 +      </div>
   62.49 +      <div dir="rtl">
   62.50 +        <input type="text" dir="auto" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   62.51 +      </div>
   62.52 +    </div>
   62.53 +    <div class="ref">
   62.54 +      <div dir="ltr">
   62.55 +        <input type="text" dir="ltr" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   62.56 +      </div>
   62.57 +      <div dir="rtl">
   62.58 +        <input type="text" dir="ltr" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   62.59 +      </div>
   62.60 +    </div>
   62.61 +  </body>
   62.62 +</html>
    63.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    63.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-N-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    63.3 @@ -0,0 +1,59 @@
    63.4 +<!DOCTYPE html>
    63.5 +<html>
    63.6 +  <head>
    63.7 +    <meta charset="utf-8" />
    63.8 +    <title>HTML Test: input with dir=auto, start with N+R</title>
    63.9 +    <link rel="reference" href="dir_auto-input-N-R-ref.html" />
   63.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   63.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   63.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   63.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   63.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   63.15 +    <meta name="assert" content="
   63.16 +      When dir='auto', the direction of an input element is set according to
   63.17 +      the first strong character of its value.
   63.18 +      In this test, it is the Hebrew letter Alef since neutrals are not
   63.19 +      strongly directional, thus the direction must be resolved as RTL." />
   63.20 +    <style>
   63.21 +      input, textarea {
   63.22 +        font-size:1em;
   63.23 +      }
   63.24 +      body {
   63.25 +        font-size:2em;
   63.26 +      }
   63.27 +      .test, .ref {
   63.28 +        border: medium solid gray;
   63.29 +        width: 400px;
   63.30 +        margin: 20px;
   63.31 +      }
   63.32 +      .comments {
   63.33 +        display: none;
   63.34 +      }
   63.35 +    </style>
   63.36 +  </head>
   63.37 +  <body>
   63.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   63.39 +    <div class="comments">
   63.40 +      Key to entities used below:
   63.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   63.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   63.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   63.44 +    </div>
   63.45 +    <div class="test">
   63.46 +      <div dir="ltr">
   63.47 +        <input type="text" dir="rtl" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   63.48 +      </div>
   63.49 +      <div dir="rtl">
   63.50 +        <input type="text" dir="rtl" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   63.51 +      </div>
   63.52 +    </div>
   63.53 +    <div class="ref">
   63.54 +      <div dir="ltr">
   63.55 +        <input type="text" dir="rtl" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   63.56 +      </div>
   63.57 +      <div dir="rtl">
   63.58 +        <input type="text" dir="rtl" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   63.59 +      </div>
   63.60 +    </div>
   63.61 +  </body>
   63.62 +</html>
    64.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    64.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-N-R.html	Sun Feb 19 10:38:29 2012 +0200
    64.3 @@ -0,0 +1,59 @@
    64.4 +<!DOCTYPE html>
    64.5 +<html>
    64.6 +  <head>
    64.7 +    <meta charset="utf-8" />
    64.8 +    <title>HTML Test: input with dir=auto, start with N+R</title>
    64.9 +    <link rel="reference" href="dir_auto-input-N-R-ref.html" />
   64.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   64.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   64.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   64.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   64.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   64.15 +    <meta name="assert" content="
   64.16 +      When dir='auto', the direction of an input element is set according to
   64.17 +      the first strong character of its value.
   64.18 +      In this test, it is the Hebrew letter Alef since neutrals are not
   64.19 +      strongly directional, thus the direction must be resolved as RTL." />
   64.20 +    <style>
   64.21 +      input, textarea {
   64.22 +        font-size:1em;
   64.23 +      }
   64.24 +      body {
   64.25 +        font-size:2em;
   64.26 +      }
   64.27 +      .test, .ref {
   64.28 +        border: medium solid gray;
   64.29 +        width: 400px;
   64.30 +        margin: 20px;
   64.31 +      }
   64.32 +      .comments {
   64.33 +        display: none;
   64.34 +      }
   64.35 +    </style>
   64.36 +  </head>
   64.37 +  <body>
   64.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   64.39 +    <div class="comments">
   64.40 +      Key to entities used below:
   64.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   64.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   64.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   64.44 +    </div>
   64.45 +    <div class="test">
   64.46 +      <div dir="ltr">
   64.47 +        <input type="text" dir="auto" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   64.48 +      </div>
   64.49 +      <div dir="rtl">
   64.50 +        <input type="text" dir="auto" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   64.51 +      </div>
   64.52 +    </div>
   64.53 +    <div class="ref">
   64.54 +      <div dir="ltr">
   64.55 +        <input type="text" dir="rtl" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   64.56 +      </div>
   64.57 +      <div dir="rtl">
   64.58 +        <input type="text" dir="rtl" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   64.59 +      </div>
   64.60 +    </div>
   64.61 +  </body>
   64.62 +</html>
    65.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    65.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    65.3 @@ -0,0 +1,59 @@
    65.4 +<!DOCTYPE html>
    65.5 +<html>
    65.6 +  <head>
    65.7 +    <meta charset="utf-8" />
    65.8 +    <title>HTML Test: input with dir=auto, start with R</title>
    65.9 +    <link rel="reference" href="dir_auto-input-R-ref.html" />
   65.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   65.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   65.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   65.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   65.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   65.15 +    <meta name="assert" content="
   65.16 +      When dir='auto', the direction of an input element is set according to
   65.17 +      the first strong character of its value.
   65.18 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   65.19 +      resolved as RTL." />
   65.20 +    <style>
   65.21 +      input, textarea {
   65.22 +        font-size:1em;
   65.23 +      }
   65.24 +      body {
   65.25 +        font-size:2em;
   65.26 +      }
   65.27 +      .test, .ref {
   65.28 +        border: medium solid gray;
   65.29 +        width: 400px;
   65.30 +        margin: 20px;
   65.31 +      }
   65.32 +      .comments {
   65.33 +        display: none;
   65.34 +      }
   65.35 +    </style>
   65.36 +  </head>
   65.37 +  <body>
   65.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   65.39 +    <div class="comments">
   65.40 +      Key to entities used below:
   65.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   65.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   65.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   65.44 +    </div>
   65.45 +      <div class="test">
   65.46 +      <div dir="ltr">
   65.47 +        <input type="text" dir="rtl" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   65.48 +      </div>
   65.49 +      <div dir="rtl">
   65.50 +        <input type="text" dir="rtl" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   65.51 +      </div>
   65.52 +    </div>
   65.53 +      <div class="ref">
   65.54 +      <div dir="ltr">
   65.55 +        <input type="text" dir="rtl" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   65.56 +      </div>
   65.57 +      <div dir="rtl">
   65.58 +        <input type="text" dir="rtl" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   65.59 +      </div>
   65.60 +    </div>
   65.61 +  </body>
   65.62 +</html>
    66.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    66.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-R.html	Sun Feb 19 10:38:29 2012 +0200
    66.3 @@ -0,0 +1,59 @@
    66.4 +<!DOCTYPE html>
    66.5 +<html>
    66.6 +  <head>
    66.7 +    <meta charset="utf-8" />
    66.8 +    <title>HTML Test: input with dir=auto, start with R</title>
    66.9 +    <link rel="reference" href="dir_auto-input-R-ref.html" />
   66.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   66.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   66.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   66.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   66.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   66.15 +    <meta name="assert" content="
   66.16 +      When dir='auto', the direction of an input element is set according to
   66.17 +      the first strong character of its value.
   66.18 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   66.19 +      resolved as RTL." />
   66.20 +    <style>
   66.21 +      input, textarea {
   66.22 +        font-size:1em;
   66.23 +      }
   66.24 +      body {
   66.25 +        font-size:2em;
   66.26 +      }
   66.27 +      .test, .ref {
   66.28 +        border: medium solid gray;
   66.29 +        width: 400px;
   66.30 +        margin: 20px;
   66.31 +      }
   66.32 +      .comments {
   66.33 +        display: none;
   66.34 +      }
   66.35 +    </style>
   66.36 +  </head>
   66.37 +  <body>
   66.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   66.39 +    <div class="comments">
   66.40 +      Key to entities used below:
   66.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   66.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   66.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   66.44 +    </div>
   66.45 +      <div class="test">
   66.46 +      <div dir="ltr">
   66.47 +        <input type="text" dir="auto" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   66.48 +      </div>
   66.49 +      <div dir="rtl">
   66.50 +        <input type="text" dir="auto" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   66.51 +      </div>
   66.52 +    </div>
   66.53 +      <div class="ref">
   66.54 +      <div dir="ltr">
   66.55 +        <input type="text" dir="rtl" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   66.56 +      </div>
   66.57 +      <div dir="rtl">
   66.58 +        <input type="text" dir="rtl" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   66.59 +      </div>
   66.60 +    </div>
   66.61 +  </body>
   66.62 +</html>
    67.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    67.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-EN-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    67.3 @@ -0,0 +1,59 @@
    67.4 +<!DOCTYPE html>
    67.5 +<html>
    67.6 +  <head>
    67.7 +    <meta charset="utf-8" />
    67.8 +    <title>HTML Test: input with dir=auto, script assigns to start with EN+L</title>
    67.9 +    <link rel="reference" href="dir_auto-input-script-EN-L-ref.html" />
   67.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   67.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   67.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   67.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   67.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   67.15 +    <meta name="assert" content="
   67.16 +      When dir='auto', the direction of an input element is set according to
   67.17 +      the first strong character of its value.
   67.18 +      In this test, it is the Latin letter A since digits are not strongly
   67.19 +      directional, thus the direction must be resolved as LTR." />
   67.20 +    <style>
   67.21 +      input, textarea {
   67.22 +        font-size:1em;
   67.23 +      }
   67.24 +      body {
   67.25 +        font-size:2em;
   67.26 +      }
   67.27 +      .test, .ref {
   67.28 +        border: medium solid gray;
   67.29 +        width: 400px;
   67.30 +        margin: 20px;
   67.31 +      }
   67.32 +      .comments {
   67.33 +        display: none;
   67.34 +      }
   67.35 +    </style>
   67.36 +  </head>
   67.37 +  <body>
   67.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   67.39 +    <div class="comments">
   67.40 +      Key to entities used below:
   67.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   67.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   67.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   67.44 +    </div>
   67.45 +    <div class="test">
   67.46 +      <div dir="ltr">
   67.47 +        <input type="text" dir="ltr" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   67.48 +      </div>
   67.49 +      <div dir="rtl">
   67.50 +        <input type="text" dir="ltr" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   67.51 +      </div>
   67.52 +    </div>
   67.53 +    <div class="ref">
   67.54 +      <div dir="ltr">
   67.55 +        <input type="text" dir="ltr" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   67.56 +      </div>
   67.57 +      <div dir="rtl">
   67.58 +        <input type="text" dir="ltr" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   67.59 +      </div>
   67.60 +    </div>
   67.61 +  </body>
   67.62 +</html>
    68.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    68.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-EN-L.html	Sun Feb 19 10:38:29 2012 +0200
    68.3 @@ -0,0 +1,68 @@
    68.4 +<!DOCTYPE html>
    68.5 +<html>
    68.6 +  <head>
    68.7 +    <meta charset="utf-8" />
    68.8 +    <title>HTML Test: input with dir=auto, script assigns to start with EN+L</title>
    68.9 +    <link rel="reference" href="dir_auto-input-script-EN-L-ref.html" />
   68.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   68.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   68.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   68.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   68.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   68.15 +    <meta name="assert" content="
   68.16 +      When dir='auto', the direction of an input element is set according to
   68.17 +      the first strong character of its value.
   68.18 +      In this test, it is the Latin letter A since digits are not strongly
   68.19 +      directional, thus the direction must be resolved as LTR." />
   68.20 +    <style>
   68.21 +      input, textarea {
   68.22 +        font-size:1em;
   68.23 +      }
   68.24 +      body {
   68.25 +        font-size:2em;
   68.26 +      }
   68.27 +      .test, .ref {
   68.28 +        border: medium solid gray;
   68.29 +        width: 400px;
   68.30 +        margin: 20px;
   68.31 +      }
   68.32 +      .comments {
   68.33 +        display: none;
   68.34 +      }
   68.35 +    </style>
   68.36 +  </head>
   68.37 +  <body>
   68.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   68.39 +    <div class="comments">
   68.40 +      Key to entities used below:
   68.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   68.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   68.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   68.44 +    </div>
   68.45 +    <div id="test" class="test">
   68.46 +      <script>
   68.47 +        window.onload = function() {
   68.48 +          var test = document.getElementById('test');
   68.49 +          var inputs = test.getElementsByTagName('input');
   68.50 +          for (var i = 0; i != inputs.length; i++) {
   68.51 +            inputs[i].value = '123ABC\u05D0\u05D1\u05D2.';
   68.52 +          }
   68.53 +        }
   68.54 +      </script>
   68.55 +      <div dir="ltr">
   68.56 +        <input type="text" dir="auto" value="&#x05D0;" />
   68.57 +      </div>
   68.58 +      <div dir="rtl">
   68.59 +        <input type="text" dir="auto" value="&#x05D0;" />
   68.60 +      </div>
   68.61 +    </div>
   68.62 +    <div class="ref">
   68.63 +      <div dir="ltr">
   68.64 +        <input type="text" dir="ltr" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   68.65 +      </div>
   68.66 +      <div dir="rtl">
   68.67 +        <input type="text" dir="ltr" value="123ABC&#x05D0;&#x05D1;&#x05D2;." />
   68.68 +      </div>
   68.69 +    </div>
   68.70 +  </body>
   68.71 +</html>
    69.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    69.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-EN-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    69.3 @@ -0,0 +1,59 @@
    69.4 +<!DOCTYPE html>
    69.5 +<html>
    69.6 +  <head>
    69.7 +    <meta charset="utf-8" />
    69.8 +    <title>HTML Test: input with dir=auto, script assigns to start with EN+R</title>
    69.9 +    <link rel="reference" href="dir_auto-input-script-EN-R-ref.html" />
   69.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   69.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   69.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   69.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   69.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   69.15 +    <meta name="assert" content="
   69.16 +      When dir='auto', the direction of an input element is set according to
   69.17 +      the first strong character of its value.
   69.18 +      In this test, it is the Hebrew letter Alef since digits are not strongly
   69.19 +      directional, thus the direction must be resolved as RTL." />
   69.20 +    <style>
   69.21 +      input, textarea {
   69.22 +        font-size:1em;
   69.23 +      }
   69.24 +      body {
   69.25 +        font-size:2em;
   69.26 +      }
   69.27 +      .test, .ref {
   69.28 +        border: medium solid gray;
   69.29 +        width: 400px;
   69.30 +        margin: 20px;
   69.31 +      }
   69.32 +      .comments {
   69.33 +        display: none;
   69.34 +      }
   69.35 +    </style>
   69.36 +  </head>
   69.37 +  <body>
   69.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   69.39 +    <div class="comments">
   69.40 +      Key to entities used below:
   69.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   69.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   69.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   69.44 +    </div>
   69.45 +    <div class="test">
   69.46 +      <div dir="ltr">
   69.47 +        <input type="text" dir="rtl" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   69.48 +      </div>
   69.49 +      <div dir="rtl">
   69.50 +        <input type="text" dir="rtl" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   69.51 +      </div>
   69.52 +    </div>
   69.53 +    <div class="ref">
   69.54 +      <div dir="ltr">
   69.55 +        <input type="text" dir="rtl" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   69.56 +      </div>
   69.57 +      <div dir="rtl">
   69.58 +        <input type="text" dir="rtl" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   69.59 +      </div>
   69.60 +    </div>
   69.61 +  </body>
   69.62 +</html>
    70.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    70.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-EN-R.html	Sun Feb 19 10:38:29 2012 +0200
    70.3 @@ -0,0 +1,68 @@
    70.4 +<!DOCTYPE html>
    70.5 +<html>
    70.6 +  <head>
    70.7 +    <meta charset="utf-8" />
    70.8 +    <title>HTML Test: input with dir=auto, script assigns to start with EN+R</title>
    70.9 +    <link rel="reference" href="dir_auto-input-script-EN-R-ref.html" />
   70.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   70.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   70.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   70.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   70.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   70.15 +    <meta name="assert" content="
   70.16 +      When dir='auto', the direction of an input element is set according to
   70.17 +      the first strong character of its value.
   70.18 +      In this test, it is the Hebrew letter Alef since digits are not strongly
   70.19 +      directional, thus the direction must be resolved as RTL." />
   70.20 +    <style>
   70.21 +      input, textarea {
   70.22 +        font-size:1em;
   70.23 +      }
   70.24 +      body {
   70.25 +        font-size:2em;
   70.26 +      }
   70.27 +      .test, .ref {
   70.28 +        border: medium solid gray;
   70.29 +        width: 400px;
   70.30 +        margin: 20px;
   70.31 +      }
   70.32 +      .comments {
   70.33 +        display: none;
   70.34 +      }
   70.35 +    </style>
   70.36 +  </head>
   70.37 +  <body>
   70.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   70.39 +    <div class="comments">
   70.40 +      Key to entities used below:
   70.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   70.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   70.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   70.44 +    </div>
   70.45 +    <div id="test" class="test">
   70.46 +      <script>
   70.47 +        window.onload = function() {
   70.48 +          var test = document.getElementById('test');
   70.49 +          var inputs = test.getElementsByTagName('input');
   70.50 +          for (var i = 0; i != inputs.length; i++) {
   70.51 +            inputs[i].value = '123\u05D0\u05D1\u05D2ABC.';
   70.52 +          }
   70.53 +        }
   70.54 +      </script>
   70.55 +      <div dir="ltr">
   70.56 +        <input type="text" dir="auto" value="a" />
   70.57 +      </div>
   70.58 +      <div dir="rtl">
   70.59 +        <input type="text" dir="auto" value="a" />
   70.60 +      </div>
   70.61 +    </div>
   70.62 +    <div class="ref">
   70.63 +      <div dir="ltr">
   70.64 +        <input type="text" dir="rtl" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   70.65 +      </div>
   70.66 +      <div dir="rtl">
   70.67 +        <input type="text" dir="rtl" value="123&#x05D0;&#x05D1;&#x05D2;ABC." />
   70.68 +      </div>
   70.69 +    </div>
   70.70 +  </body>
   70.71 +</html>
    71.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    71.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    71.3 @@ -0,0 +1,59 @@
    71.4 +<!DOCTYPE html>
    71.5 +<html>
    71.6 +  <head>
    71.7 +    <meta charset="utf-8" />
    71.8 +    <title>HTML Test: input with dir=auto, script assigns to start with L</title>
    71.9 +    <link rel="reference" href="dir_auto-input-script-L-ref.html" />
   71.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   71.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   71.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   71.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   71.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   71.15 +    <meta name="assert" content="
   71.16 +      When dir='auto', the direction of an input element is set according to
   71.17 +      the first strong character of its value.
   71.18 +      In this test, it is the Latin letter A, thus the direction must be
   71.19 +      resolved as LTR." />
   71.20 +    <style>
   71.21 +      input, textarea {
   71.22 +        font-size:1em;
   71.23 +      }
   71.24 +      body {
   71.25 +        font-size:2em;
   71.26 +      }
   71.27 +      .test, .ref {
   71.28 +        border: medium solid gray;
   71.29 +        width: 400px;
   71.30 +        margin: 20px;
   71.31 +      }
   71.32 +      .comments {
   71.33 +        display: none;
   71.34 +      }
   71.35 +    </style>
   71.36 +  </head>
   71.37 +  <body>
   71.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   71.39 +    <div class="comments">
   71.40 +      Key to entities used below:
   71.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   71.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   71.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   71.44 +    </div>
   71.45 +    <div class="test">
   71.46 +      <div dir="ltr">
   71.47 +        <input type="text" dir="ltr" value="ABC&#x05D0;&#x05D1;&#x05D2;." />
   71.48 +      </div>
   71.49 +      <div dir="rtl">
   71.50 +        <input type="text" dir="ltr" value="ABC&#x05D0;&#x05D1;&#x05D2;." />
   71.51 +      </div>
   71.52 +    </div>
   71.53 +    <div class="ref">
   71.54 +      <div dir="ltr">
   71.55 +        <input type="text" dir="ltr" value="ABC&#x05D0;&#x05D1;&#x05D2;." />
   71.56 +      </div>
   71.57 +      <div dir="rtl">
   71.58 +        <input type="text" dir="ltr" value="ABC&#x05D0;&#x05D1;&#x05D2;." />
   71.59 +      </div>
   71.60 +    </div>
   71.61 +  </body>
   71.62 +</html>
    72.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    72.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-L.html	Sun Feb 19 10:38:29 2012 +0200
    72.3 @@ -0,0 +1,68 @@
    72.4 +<!DOCTYPE html>
    72.5 +<html>
    72.6 +  <head>
    72.7 +    <meta charset="utf-8" />
    72.8 +    <title>HTML Test: input with dir=auto, script assigns to start with L</title>
    72.9 +    <link rel="reference" href="dir_auto-input-script-L-ref.html" />
   72.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   72.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   72.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   72.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   72.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   72.15 +    <meta name="assert" content="
   72.16 +      When dir='auto', the direction of an input element is set according to
   72.17 +      the first strong character of its value.
   72.18 +      In this test, it is the Latin letter A, thus the direction must be
   72.19 +      resolved as LTR." />
   72.20 +    <style>
   72.21 +      input, textarea {
   72.22 +        font-size:1em;
   72.23 +      }
   72.24 +      body {
   72.25 +        font-size:2em;
   72.26 +      }
   72.27 +      .test, .ref {
   72.28 +        border: medium solid gray;
   72.29 +        width: 400px;
   72.30 +        margin: 20px;
   72.31 +      }
   72.32 +      .comments {
   72.33 +        display: none;
   72.34 +      }
   72.35 +    </style>
   72.36 +  </head>
   72.37 +  <body>
   72.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   72.39 +    <div class="comments">
   72.40 +      Key to entities used below:
   72.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   72.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   72.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   72.44 +    </div>
   72.45 +    <div id="test" class="test">
   72.46 +      <script>
   72.47 +        window.onload = function() {
   72.48 +          var test = document.getElementById('test');
   72.49 +          var inputs = test.getElementsByTagName('input');
   72.50 +          for (var i = 0; i != inputs.length; i++) {
   72.51 +            inputs[i].value = 'ABC\u05D0\u05D1\u05D2.';
   72.52 +          }
   72.53 +        }
   72.54 +      </script>
   72.55 +      <div dir="ltr">
   72.56 +        <input type="text" dir="auto" value="&#x05D0;" />
   72.57 +      </div>
   72.58 +      <div dir="rtl">
   72.59 +        <input type="text" dir="auto" value="&#x05D0;" />
   72.60 +      </div>
   72.61 +    </div>
   72.62 +    <div class="ref">
   72.63 +      <div dir="ltr">
   72.64 +        <input type="text" dir="ltr" value="ABC&#x05D0;&#x05D1;&#x05D2;." />
   72.65 +      </div>
   72.66 +      <div dir="rtl">
   72.67 +        <input type="text" dir="ltr" value="ABC&#x05D0;&#x05D1;&#x05D2;." />
   72.68 +      </div>
   72.69 +    </div>
   72.70 +  </body>
   72.71 +</html>
    73.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    73.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-EN-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    73.3 @@ -0,0 +1,59 @@
    73.4 +<!DOCTYPE html>
    73.5 +<html>
    73.6 +  <head>
    73.7 +    <meta charset="utf-8" />
    73.8 +    <title>HTML Test: input with dir=auto, script assigns to start with N+EN+L</title>
    73.9 +    <link rel="reference" href="dir_auto-input-script-N-EN-L-ref.html" />
   73.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   73.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   73.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   73.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   73.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   73.15 +    <meta name="assert" content="
   73.16 +      When dir='auto', the direction of an input element is set according to
   73.17 +      the first strong character of its value.
   73.18 +      In this test, it is the Latin letter A since neutrals and digits are not
   73.19 +      strongly directional, thus the direction must be resolved as LTR." />
   73.20 +    <style>
   73.21 +      input, textarea {
   73.22 +        font-size:1em;
   73.23 +      }
   73.24 +      body {
   73.25 +        font-size:2em;
   73.26 +      }
   73.27 +      .test, .ref {
   73.28 +        border: medium solid gray;
   73.29 +        width: 400px;
   73.30 +        margin: 20px;
   73.31 +      }
   73.32 +      .comments {
   73.33 +        display: none;
   73.34 +      }
   73.35 +    </style>
   73.36 +  </head>
   73.37 +  <body>
   73.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   73.39 +    <div class="comments">
   73.40 +      Key to entities used below:
   73.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   73.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   73.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   73.44 +    </div>
   73.45 +    <div class="test">
   73.46 +      <div dir="ltr">
   73.47 +        <input type="text" dir="ltr" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   73.48 +      </div>
   73.49 +      <div dir="rtl">
   73.50 +        <input type="text" dir="ltr" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   73.51 +      </div>
   73.52 +    </div>
   73.53 +    <div class="ref">
   73.54 +      <div dir="ltr">
   73.55 +        <input type="text" dir="ltr" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   73.56 +      </div>
   73.57 +      <div dir="rtl">
   73.58 +        <input type="text" dir="ltr" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   73.59 +      </div>
   73.60 +    </div>
   73.61 +  </body>
   73.62 +</html>
    74.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    74.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-EN-L.html	Sun Feb 19 10:38:29 2012 +0200
    74.3 @@ -0,0 +1,68 @@
    74.4 +<!DOCTYPE html>
    74.5 +<html>
    74.6 +  <head>
    74.7 +    <meta charset="utf-8" />
    74.8 +    <title>HTML Test: input with dir=auto, script assigns to start with N+EN+L</title>
    74.9 +    <link rel="reference" href="dir_auto-input-script-N-EN-L-ref.html" />
   74.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   74.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   74.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   74.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   74.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   74.15 +    <meta name="assert" content="
   74.16 +      When dir='auto', the direction of an input element is set according to
   74.17 +      the first strong character of its value.
   74.18 +      In this test, it is the Latin letter A since neutrals and digits are not
   74.19 +      strongly directional, thus the direction must be resolved as LTR." />
   74.20 +    <style>
   74.21 +      input, textarea {
   74.22 +        font-size:1em;
   74.23 +      }
   74.24 +      body {
   74.25 +        font-size:2em;
   74.26 +      }
   74.27 +      .test, .ref {
   74.28 +        border: medium solid gray;
   74.29 +        width: 400px;
   74.30 +        margin: 20px;
   74.31 +      }
   74.32 +      .comments {
   74.33 +        display: none;
   74.34 +      }
   74.35 +    </style>
   74.36 +  </head>
   74.37 +  <body>
   74.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   74.39 +    <div class="comments">
   74.40 +      Key to entities used below:
   74.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   74.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   74.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   74.44 +    </div>
   74.45 +    <div id="test" class="test">
   74.46 +      <script>
   74.47 +        window.onload = function() {
   74.48 +          var test = document.getElementById('test');
   74.49 +          var inputs = test.getElementsByTagName('input');
   74.50 +          for (var i = 0; i != inputs.length; i++) {
   74.51 +            inputs[i].value = '.-=123ABC\u05D0\u05D1\u05D2.';
   74.52 +          }
   74.53 +        }
   74.54 +      </script>
   74.55 +      <div dir="ltr">
   74.56 +        <input type="text" dir="auto" value="&#x05D0;" />
   74.57 +      </div>
   74.58 +      <div dir="rtl">
   74.59 +        <input type="text" dir="auto" value="&#x05D0;" />
   74.60 +      </div>
   74.61 +    </div>
   74.62 +    <div class="ref">
   74.63 +      <div dir="ltr">
   74.64 +        <input type="text" dir="ltr" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   74.65 +      </div>
   74.66 +      <div dir="rtl">
   74.67 +        <input type="text" dir="ltr" value=".-=123ABC&#x05D0;&#x05D1;&#x05D2;." />
   74.68 +      </div>
   74.69 +    </div>
   74.70 +  </body>
   74.71 +</html>
    75.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    75.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-EN-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    75.3 @@ -0,0 +1,59 @@
    75.4 +<!DOCTYPE html>
    75.5 +<html>
    75.6 +  <head>
    75.7 +    <meta charset="utf-8" />
    75.8 +    <title>HTML Test: input with dir=auto, script assigns to start with N+EN+R</title>
    75.9 +    <link rel="reference" href="dir_auto-input-script-N-EN-R-ref.html" />
   75.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   75.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   75.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   75.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   75.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   75.15 +    <meta name="assert" content="
   75.16 +      When dir='auto', the direction of an input element is set according to
   75.17 +      the first strong character of its value.
   75.18 +      In this test, it is the Hebrew letter Alef since neutrals and digits are not
   75.19 +      strongly directional, thus the direction must be resolved as RTL." />
   75.20 +    <style>
   75.21 +      input, textarea {
   75.22 +        font-size:1em;
   75.23 +      }
   75.24 +      body {
   75.25 +        font-size:2em;
   75.26 +      }
   75.27 +      .test, .ref {
   75.28 +        border: medium solid gray;
   75.29 +        width: 400px;
   75.30 +        margin: 20px;
   75.31 +      }
   75.32 +      .comments {
   75.33 +        display: none;
   75.34 +      }
   75.35 +    </style>
   75.36 +  </head>
   75.37 +  <body>
   75.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   75.39 +    <div class="comments">
   75.40 +      Key to entities used below:
   75.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   75.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   75.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   75.44 +    </div>
   75.45 +    <div class="test">
   75.46 +      <div dir="ltr">
   75.47 +        <input type="text" dir="rtl" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   75.48 +      </div>
   75.49 +      <div dir="rtl">
   75.50 +        <input type="text" dir="rtl" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   75.51 +      </div>
   75.52 +    </div>
   75.53 +    <div class="ref">
   75.54 +      <div dir="ltr">
   75.55 +        <input type="text" dir="rtl" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   75.56 +      </div>
   75.57 +      <div dir="rtl">
   75.58 +        <input type="text" dir="rtl" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   75.59 +      </div>
   75.60 +    </div>
   75.61 +  </body>
   75.62 +</html>
    76.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    76.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-EN-R.html	Sun Feb 19 10:38:29 2012 +0200
    76.3 @@ -0,0 +1,68 @@
    76.4 +<!DOCTYPE html>
    76.5 +<html>
    76.6 +  <head>
    76.7 +    <meta charset="utf-8" />
    76.8 +    <title>HTML Test: input with dir=auto, script assigns to start with N+EN+R</title>
    76.9 +    <link rel="reference" href="dir_auto-input-script-N-EN-R-ref.html" />
   76.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   76.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   76.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   76.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   76.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   76.15 +    <meta name="assert" content="
   76.16 +      When dir='auto', the direction of an input element is set according to
   76.17 +      the first strong character of its value.
   76.18 +      In this test, it is the Hebrew letter Alef since neutrals and digits are not
   76.19 +      strongly directional, thus the direction must be resolved as RTL." />
   76.20 +    <style>
   76.21 +      input, textarea {
   76.22 +        font-size:1em;
   76.23 +      }
   76.24 +      body {
   76.25 +        font-size:2em;
   76.26 +      }
   76.27 +      .test, .ref {
   76.28 +        border: medium solid gray;
   76.29 +        width: 400px;
   76.30 +        margin: 20px;
   76.31 +      }
   76.32 +      .comments {
   76.33 +        display: none;
   76.34 +      }
   76.35 +    </style>
   76.36 +  </head>
   76.37 +  <body>
   76.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   76.39 +    <div class="comments">
   76.40 +      Key to entities used below:
   76.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   76.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   76.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   76.44 +    </div>
   76.45 +    <div id="test" class="test">
   76.46 +      <script>
   76.47 +        window.onload = function() {
   76.48 +          var test = document.getElementById('test');
   76.49 +          var inputs = test.getElementsByTagName('input');
   76.50 +          for (var i = 0; i != inputs.length; i++) {
   76.51 +            inputs[i].value = '.-=123\u05D0\u05D1\u05D2ABC.';
   76.52 +          }
   76.53 +        }
   76.54 +      </script>
   76.55 +      <div dir="ltr">
   76.56 +        <input type="text" dir="auto" value="a" />
   76.57 +      </div>
   76.58 +      <div dir="rtl">
   76.59 +        <input type="text" dir="auto" value="a" />
   76.60 +      </div>
   76.61 +    </div>
   76.62 +    <div class="ref">
   76.63 +      <div dir="ltr">
   76.64 +        <input type="text" dir="rtl" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   76.65 +      </div>
   76.66 +      <div dir="rtl">
   76.67 +        <input type="text" dir="rtl" value=".-=123&#x05D0;&#x05D1;&#x05D2;ABC." />
   76.68 +      </div>
   76.69 +    </div>
   76.70 +  </body>
   76.71 +</html>
    77.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    77.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-EN-ref.html	Sun Feb 19 10:38:29 2012 +0200
    77.3 @@ -0,0 +1,54 @@
    77.4 +<!DOCTYPE html>
    77.5 +<html>
    77.6 +  <head>
    77.7 +    <meta charset="utf-8" />
    77.8 +    <title>HTML Test: input with dir=auto, script assigns to all N+EN</title>
    77.9 +    <link rel="reference" href="dir_auto-input-script-N-EN-ref.html" />
   77.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   77.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   77.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   77.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   77.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   77.15 +    <meta name="assert" content="
   77.16 +      When dir='auto', the direction of an input element is set according to
   77.17 +      the first strong character of its value, or to LTR if there is no such
   77.18 +      character.
   77.19 +      In this test, there is no strongly directional character in the value,
   77.20 +      thus the direction must be resolved as LTR." />
   77.21 +    <style>
   77.22 +      input, textarea {
   77.23 +        font-size:1em;
   77.24 +      }
   77.25 +      body {
   77.26 +        font-size:2em;
   77.27 +      }
   77.28 +      .test, .ref {
   77.29 +        border: medium solid gray;
   77.30 +        width: 400px;
   77.31 +        margin: 20px;
   77.32 +      }
   77.33 +      .comments {
   77.34 +        display: none;
   77.35 +      }
   77.36 +    </style>
   77.37 +  </head>
   77.38 +  <body>
   77.39 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   77.40 +    <div class="test">
   77.41 +      <div dir="ltr">
   77.42 +        <input type="text" dir="ltr" value="@123!" />
   77.43 +      </div>
   77.44 +      <div dir="rtl">
   77.45 +        <input type="text" dir="ltr" value="@123!" />
   77.46 +      </div>
   77.47 +    </div>
   77.48 +    <div class="ref">
   77.49 +      <div dir="ltr">
   77.50 +        <input type="text" dir="ltr" value="@123!" />
   77.51 +      </div>
   77.52 +      <div dir="rtl">
   77.53 +        <input type="text" dir="ltr" value="@123!" />
   77.54 +      </div>
   77.55 +    </div>
   77.56 +  </body>
   77.57 +</html>
    78.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    78.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-EN.html	Sun Feb 19 10:38:29 2012 +0200
    78.3 @@ -0,0 +1,63 @@
    78.4 +<!DOCTYPE html>
    78.5 +<html>
    78.6 +  <head>
    78.7 +    <meta charset="utf-8" />
    78.8 +    <title>HTML Test: input with dir=auto, script assigns to all N+EN</title>
    78.9 +    <link rel="reference" href="dir_auto-input-script-N-EN-ref.html" />
   78.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   78.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   78.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   78.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   78.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   78.15 +    <meta name="assert" content="
   78.16 +      When dir='auto', the direction of an input element is set according to
   78.17 +      the first strong character of its value, or to LTR if there is no such
   78.18 +      character.
   78.19 +      In this test, there is no strongly directional character in the value,
   78.20 +      thus the direction must be resolved as LTR." />
   78.21 +    <style>
   78.22 +      input, textarea {
   78.23 +        font-size:1em;
   78.24 +      }
   78.25 +      body {
   78.26 +        font-size:2em;
   78.27 +      }
   78.28 +      .test, .ref {
   78.29 +        border: medium solid gray;
   78.30 +        width: 400px;
   78.31 +        margin: 20px;
   78.32 +      }
   78.33 +      .comments {
   78.34 +        display: none;
   78.35 +      }
   78.36 +    </style>
   78.37 +  </head>
   78.38 +  <body>
   78.39 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   78.40 +    <div id="test" class="test">
   78.41 +      <script>
   78.42 +        window.onload = function() {
   78.43 +          var test = document.getElementById('test');
   78.44 +          var inputs = test.getElementsByTagName('input');
   78.45 +          for (var i = 0; i != inputs.length; i++) {
   78.46 +            inputs[i].value = '@123!';
   78.47 +          }
   78.48 +        };
   78.49 +      </script>
   78.50 +      <div dir="ltr">
   78.51 +        <input type="text" dir="auto" value="&#x05D0;" />
   78.52 +      </div>
   78.53 +      <div dir="rtl">
   78.54 +        <input type="text" dir="auto" value="&#x05D0;" />
   78.55 +      </div>
   78.56 +    </div>
   78.57 +    <div class="ref">
   78.58 +      <div dir="ltr">
   78.59 +        <input type="text" dir="ltr" value="@123!" />
   78.60 +      </div>
   78.61 +      <div dir="rtl">
   78.62 +        <input type="text" dir="ltr" value="@123!" />
   78.63 +      </div>
   78.64 +    </div>
   78.65 +  </body>
   78.66 +</html>
    79.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    79.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-L-ref.html	Sun Feb 19 10:38:29 2012 +0200
    79.3 @@ -0,0 +1,59 @@
    79.4 +<!DOCTYPE html>
    79.5 +<html>
    79.6 +  <head>
    79.7 +    <meta charset="utf-8" />
    79.8 +    <title>HTML Test: input with dir=auto, script assigns to start with N+L</title>
    79.9 +    <link rel="reference" href="dir_auto-input-script-N-L-ref.html" />
   79.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   79.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   79.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   79.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   79.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   79.15 +    <meta name="assert" content="
   79.16 +      When dir='auto', the direction of an input element is set according to
   79.17 +      the first strong character of its value.
   79.18 +      In this test, it is the Latin letter A since neutrals are not
   79.19 +      strongly directional, thus the direction must be resolved as LTR." />
   79.20 +    <style>
   79.21 +      input, textarea {
   79.22 +        font-size:1em;
   79.23 +      }
   79.24 +      body {
   79.25 +        font-size:2em;
   79.26 +      }
   79.27 +      .test, .ref {
   79.28 +        border: medium solid gray;
   79.29 +        width: 400px;
   79.30 +        margin: 20px;
   79.31 +      }
   79.32 +      .comments {
   79.33 +        display: none;
   79.34 +      }
   79.35 +    </style>
   79.36 +  </head>
   79.37 +  <body>
   79.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   79.39 +    <div class="comments">
   79.40 +      Key to entities used below:
   79.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   79.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   79.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   79.44 +    </div>
   79.45 +    <div class="test">
   79.46 +      <div dir="ltr">
   79.47 +        <input type="text" dir="ltr" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   79.48 +      </div>
   79.49 +      <div dir="rtl">
   79.50 +        <input type="text" dir="ltr" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   79.51 +      </div>
   79.52 +    </div>
   79.53 +    <div class="ref">
   79.54 +      <div dir="ltr">
   79.55 +        <input type="text" dir="ltr" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   79.56 +      </div>
   79.57 +      <div dir="rtl">
   79.58 +        <input type="text" dir="ltr" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   79.59 +      </div>
   79.60 +    </div>
   79.61 +  </body>
   79.62 +</html>
    80.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    80.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-L.html	Sun Feb 19 10:38:29 2012 +0200
    80.3 @@ -0,0 +1,68 @@
    80.4 +<!DOCTYPE html>
    80.5 +<html>
    80.6 +  <head>
    80.7 +    <meta charset="utf-8" />
    80.8 +    <title>HTML Test: input with dir=auto, script assigns to start with N+L</title>
    80.9 +    <link rel="reference" href="dir_auto-input-script-N-L-ref.html" />
   80.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   80.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   80.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   80.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   80.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   80.15 +    <meta name="assert" content="
   80.16 +      When dir='auto', the direction of an input element is set according to
   80.17 +      the first strong character of its value.
   80.18 +      In this test, it is the Latin letter A since neutrals are not
   80.19 +      strongly directional, thus the direction must be resolved as LTR." />
   80.20 +    <style>
   80.21 +      input, textarea {
   80.22 +        font-size:1em;
   80.23 +      }
   80.24 +      body {
   80.25 +        font-size:2em;
   80.26 +      }
   80.27 +      .test, .ref {
   80.28 +        border: medium solid gray;
   80.29 +        width: 400px;
   80.30 +        margin: 20px;
   80.31 +      }
   80.32 +      .comments {
   80.33 +        display: none;
   80.34 +      }
   80.35 +    </style>
   80.36 +  </head>
   80.37 +  <body>
   80.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   80.39 +    <div class="comments">
   80.40 +      Key to entities used below:
   80.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   80.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   80.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   80.44 +    </div>
   80.45 +    <div id="test" class="test">
   80.46 +      <script>
   80.47 +        window.onload = function() {
   80.48 +          var test = document.getElementById('test');
   80.49 +          var inputs = test.getElementsByTagName('input');
   80.50 +          for (var i = 0; i != inputs.length; i++) {
   80.51 +            inputs[i].value = '.-=ABC\u05D0\u05D1\u05D2.';
   80.52 +          }
   80.53 +        }
   80.54 +      </script>
   80.55 +      <div dir="ltr">
   80.56 +        <input type="text" dir="auto" value="&#x05D0;" />
   80.57 +      </div>
   80.58 +      <div dir="rtl">
   80.59 +        <input type="text" dir="auto" value="&#x05D0;" />
   80.60 +      </div>
   80.61 +    </div>
   80.62 +    <div class="ref">
   80.63 +      <div dir="ltr">
   80.64 +        <input type="text" dir="ltr" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   80.65 +      </div>
   80.66 +      <div dir="rtl">
   80.67 +        <input type="text" dir="ltr" value=".-=ABC&#x05D0;&#x05D1;&#x05D2;." />
   80.68 +      </div>
   80.69 +    </div>
   80.70 +  </body>
   80.71 +</html>
    81.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    81.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    81.3 @@ -0,0 +1,59 @@
    81.4 +<!DOCTYPE html>
    81.5 +<html>
    81.6 +  <head>
    81.7 +    <meta charset="utf-8" />
    81.8 +    <title>HTML Test: input with dir=auto, script assigns to start with N+R</title>
    81.9 +    <link rel="reference" href="dir_auto-input-script-N-R-ref.html" />
   81.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   81.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   81.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   81.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   81.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   81.15 +    <meta name="assert" content="
   81.16 +      When dir='auto', the direction of an input element is set according to
   81.17 +      the first strong character of its value.
   81.18 +      In this test, it is the Hebrew letter Alef since neutrals are not
   81.19 +      strongly directional, thus the direction must be resolved as RTL." />
   81.20 +    <style>
   81.21 +      input, textarea {
   81.22 +        font-size:1em;
   81.23 +      }
   81.24 +      body {
   81.25 +        font-size:2em;
   81.26 +      }
   81.27 +      .test, .ref {
   81.28 +        border: medium solid gray;
   81.29 +        width: 400px;
   81.30 +        margin: 20px;
   81.31 +      }
   81.32 +      .comments {
   81.33 +        display: none;
   81.34 +      }
   81.35 +    </style>
   81.36 +  </head>
   81.37 +  <body>
   81.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   81.39 +    <div class="comments">
   81.40 +      Key to entities used below:
   81.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   81.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   81.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   81.44 +    </div>
   81.45 +    <div class="test">
   81.46 +      <div dir="ltr">
   81.47 +        <input type="text" dir="rtl" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   81.48 +      </div>
   81.49 +      <div dir="rtl">
   81.50 +        <input type="text" dir="rtl" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   81.51 +      </div>
   81.52 +    </div>
   81.53 +    <div class="ref">
   81.54 +      <div dir="ltr">
   81.55 +        <input type="text" dir="rtl" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   81.56 +      </div>
   81.57 +      <div dir="rtl">
   81.58 +        <input type="text" dir="rtl" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   81.59 +      </div>
   81.60 +    </div>
   81.61 +  </body>
   81.62 +</html>
    82.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    82.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-N-R.html	Sun Feb 19 10:38:29 2012 +0200
    82.3 @@ -0,0 +1,68 @@
    82.4 +<!DOCTYPE html>
    82.5 +<html>
    82.6 +  <head>
    82.7 +    <meta charset="utf-8" />
    82.8 +    <title>HTML Test: input with dir=auto, script assigns to start with N+R</title>
    82.9 +    <link rel="reference" href="dir_auto-input-script-N-R-ref.html" />
   82.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   82.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   82.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   82.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   82.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   82.15 +    <meta name="assert" content="
   82.16 +      When dir='auto', the direction of an input element is set according to
   82.17 +      the first strong character of its value.
   82.18 +      In this test, it is the Hebrew letter Alef since neutrals are not
   82.19 +      strongly directional, thus the direction must be resolved as RTL." />
   82.20 +    <style>
   82.21 +      input, textarea {
   82.22 +        font-size:1em;
   82.23 +      }
   82.24 +      body {
   82.25 +        font-size:2em;
   82.26 +      }
   82.27 +      .test, .ref {
   82.28 +        border: medium solid gray;
   82.29 +        width: 400px;
   82.30 +        margin: 20px;
   82.31 +      }
   82.32 +      .comments {
   82.33 +        display: none;
   82.34 +      }
   82.35 +    </style>
   82.36 +  </head>
   82.37 +  <body>
   82.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   82.39 +    <div class="comments">
   82.40 +      Key to entities used below:
   82.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   82.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   82.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   82.44 +    </div>
   82.45 +    <div id="test" class="test">
   82.46 +      <script>
   82.47 +        window.onload = function() {
   82.48 +          var test = document.getElementById('test');
   82.49 +          var inputs = test.getElementsByTagName('input');
   82.50 +          for (var i = 0; i != inputs.length; i++) {
   82.51 +            inputs[i].value = '.-=\u05D0\u05D1\u05D2ABC.';
   82.52 +          }
   82.53 +        }
   82.54 +      </script>
   82.55 +      <div dir="ltr">
   82.56 +        <input type="text" dir="auto" value="a" />
   82.57 +      </div>
   82.58 +      <div dir="rtl">
   82.59 +        <input type="text" dir="auto" value="a" />
   82.60 +      </div>
   82.61 +    </div>
   82.62 +    <div class="ref">
   82.63 +      <div dir="ltr">
   82.64 +        <input type="text" dir="rtl" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   82.65 +      </div>
   82.66 +      <div dir="rtl">
   82.67 +        <input type="text" dir="rtl" value=".-=&#x05D0;&#x05D1;&#x05D2;ABC." />
   82.68 +      </div>
   82.69 +    </div>
   82.70 +  </body>
   82.71 +</html>
    83.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    83.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-R-ref.html	Sun Feb 19 10:38:29 2012 +0200
    83.3 @@ -0,0 +1,59 @@
    83.4 +<!DOCTYPE html>
    83.5 +<html>
    83.6 +  <head>
    83.7 +    <meta charset="utf-8" />
    83.8 +    <title>HTML Test: input with dir=auto, script assigns to start with R</title>
    83.9 +    <link rel="reference" href="dir_auto-input-script-R-ref.html" />
   83.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   83.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   83.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   83.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   83.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   83.15 +    <meta name="assert" content="
   83.16 +      When dir='auto', the direction of an input element is set according to
   83.17 +      the first strong character of its value.
   83.18 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   83.19 +      resolved as RTL." />
   83.20 +    <style>
   83.21 +      input, textarea {
   83.22 +        font-size:1em;
   83.23 +      }
   83.24 +      body {
   83.25 +        font-size:2em;
   83.26 +      }
   83.27 +      .test, .ref {
   83.28 +        border: medium solid gray;
   83.29 +        width: 400px;
   83.30 +        margin: 20px;
   83.31 +      }
   83.32 +      .comments {
   83.33 +        display: none;
   83.34 +      }
   83.35 +    </style>
   83.36 +  </head>
   83.37 +  <body>
   83.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   83.39 +    <div class="comments">
   83.40 +      Key to entities used below:
   83.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   83.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   83.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   83.44 +    </div>
   83.45 +      <div class="test">
   83.46 +      <div dir="ltr">
   83.47 +        <input type="text" dir="rtl" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   83.48 +      </div>
   83.49 +      <div dir="rtl">
   83.50 +        <input type="text" dir="rtl" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   83.51 +      </div>
   83.52 +    </div>
   83.53 +      <div class="ref">
   83.54 +      <div dir="ltr">
   83.55 +        <input type="text" dir="rtl" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   83.56 +      </div>
   83.57 +      <div dir="rtl">
   83.58 +        <input type="text" dir="rtl" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   83.59 +      </div>
   83.60 +    </div>
   83.61 +  </body>
   83.62 +</html>
    84.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    84.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-input-script-R.html	Sun Feb 19 10:38:29 2012 +0200
    84.3 @@ -0,0 +1,68 @@
    84.4 +<!DOCTYPE html>
    84.5 +<html>
    84.6 +  <head>
    84.7 +    <meta charset="utf-8" />
    84.8 +    <title>HTML Test: input with dir=auto, script assigns to start with R</title>
    84.9 +    <link rel="reference" href="dir_auto-input-script-R-ref.html" />
   84.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   84.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   84.12 +    <link rel="author" title="Shai Berger" href="mailto:shai@platonix.com" />
   84.13 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   84.14 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   84.15 +    <meta name="assert" content="
   84.16 +      When dir='auto', the direction of an input element is set according to
   84.17 +      the first strong character of its value.
   84.18 +      In this test, it is the Hebrew letter Alef, thus the direction must be
   84.19 +      resolved as RTL." />
   84.20 +    <style>
   84.21 +      input, textarea {
   84.22 +        font-size:1em;
   84.23 +      }
   84.24 +      body {
   84.25 +        font-size:2em;
   84.26 +      }
   84.27 +      .test, .ref {
   84.28 +        border: medium solid gray;
   84.29 +        width: 400px;
   84.30 +        margin: 20px;
   84.31 +      }
   84.32 +      .comments {
   84.33 +        display: none;
   84.34 +      }
   84.35 +    </style>
   84.36 +  </head>
   84.37 +  <body>
   84.38 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   84.39 +    <div class="comments">
   84.40 +      Key to entities used below:
   84.41 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   84.42 +      &#x05D1; - The Hebrew letter Bet (strongly RTL).
   84.43 +      &#x05D2; - The Hebrew letter Gimel (strongly RTL).
   84.44 +    </div>
   84.45 +      <div id="test" class="test">
   84.46 +      <script>
   84.47 +        window.onload = function() {
   84.48 +          var test = document.getElementById('test');
   84.49 +          var inputs = test.getElementsByTagName('input');
   84.50 +          for (var i = 0; i != inputs.length; i++) {
   84.51 +            inputs[i].value = '\u05D0\u05D1\u05D2ABC.';
   84.52 +          }
   84.53 +        }
   84.54 +      </script>
   84.55 +      <div dir="ltr">
   84.56 +        <input type="text" dir="auto" value="a" />
   84.57 +      </div>
   84.58 +      <div dir="rtl">
   84.59 +        <input type="text" dir="auto" value="a" />
   84.60 +      </div>
   84.61 +    </div>
   84.62 +      <div class="ref">
   84.63 +      <div dir="ltr">
   84.64 +        <input type="text" dir="rtl" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   84.65 +      </div>
   84.66 +      <div dir="rtl">
   84.67 +        <input type="text" dir="rtl" value="&#x05D0;&#x05D1;&#x05D2;ABC." />
   84.68 +      </div>
   84.69 +    </div>
   84.70 +  </body>
   84.71 +</html>
    85.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    85.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-isolate-ref.html	Sun Feb 19 10:38:29 2012 +0200
    85.3 @@ -0,0 +1,56 @@
    85.4 +<!DOCTYPE html>
    85.5 +<html>
    85.6 +  <head>
    85.7 +    <meta charset="utf-8" />
    85.8 +    <title>HTML Test: dir=auto, isolated in LTR text</title>
    85.9 +    <link rel="reference" href="dir_auto-isolate-ref.html" />
   85.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   85.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   85.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   85.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   85.14 +    <meta name="assert" content="
   85.15 +      When dir='auto', the direction is set according to the first strong character
   85.16 +      of the text, but the element behaves externally as a neutral character.
   85.17 +      In this test, it allows a preceding R to form a single directional run
   85.18 +      with a succeeding number." />
   85.19 +    <style>
   85.20 +      input, textarea {
   85.21 +        font-size:1em;
   85.22 +      }
   85.23 +      body {
   85.24 +        font-size:2em;
   85.25 +      }
   85.26 +      .test, .ref {
   85.27 +        border: medium solid gray;
   85.28 +        width: 400px;
   85.29 +        margin: 20px;
   85.30 +      }
   85.31 +      .comments {
   85.32 +        display: none;
   85.33 +      }
   85.34 +    </style>
   85.35 +  </head>
   85.36 +  <body>
   85.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   85.38 +    <div class="comments">
   85.39 +      Key to entities used below:
   85.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   85.41 +    </div>
   85.42 +    <div class="test">
   85.43 +      <div dir="ltr">
   85.44 +        &#x202D;1 a! &#x05D0;&#x202C;
   85.45 +      </div>
   85.46 +      <div dir="rtl">
   85.47 +        &#x202D;a !&#x05D0; 1&#x202C;
   85.48 +      </div>
   85.49 +    </div>
   85.50 +    <div class="ref">
   85.51 +      <div dir="ltr">
   85.52 +        &#x202D;1 a! &#x05D0;&#x202C;
   85.53 +      </div>
   85.54 +      <div dir="rtl">
   85.55 +        &#x202D;a !&#x05D0; 1&#x202C;
   85.56 +      </div>
   85.57 +    </div>
   85.58 +  </body>
   85.59 +</html>
    86.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    86.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-isolate.html	Sun Feb 19 10:38:29 2012 +0200
    86.3 @@ -0,0 +1,58 @@
    86.4 +<!DOCTYPE html>
    86.5 +<html>
    86.6 +  <head>
    86.7 +    <meta charset="utf-8" />
    86.8 +    <title>HTML Test: dir=auto, isolated in LTR text</title>
    86.9 +    <link rel="reference" href="dir_auto-isolate-ref.html" />
   86.10 +    <link rel="author" title="Matitiahu Allouche" href="mailto:matitiahu.allouche@google.com" />
   86.11 +    <link rel="author" title="Oren Roth" href="mailto:oren.roth@gmail.com" />
   86.12 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   86.13 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   86.14 +    <meta name="assert" content="
   86.15 +      When dir='auto', the direction is set according to the first strong character
   86.16 +      of the text, but the element behaves externally as a neutral character.
   86.17 +      In this test, it allows a preceding R to form a single directional run
   86.18 +      with a succeeding number." />
   86.19 +    <style>
   86.20 +      input, textarea {
   86.21 +        font-size:1em;
   86.22 +      }
   86.23 +      body {
   86.24 +        font-size:2em;
   86.25 +      }
   86.26 +      .test, .ref {
   86.27 +        border: medium solid gray;
   86.28 +        width: 400px;
   86.29 +        margin: 20px;
   86.30 +      }
   86.31 +      .comments {
   86.32 +        display: none;
   86.33 +      }
   86.34 +    </style>
   86.35 +  </head>
   86.36 +  <body>
   86.37 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   86.38 +    <div class="comments">
   86.39 +      Key to entities used below:
   86.40 +      &#x05D0; - The Hebrew letter Alef (strongly RTL).
   86.41 +      &#x202D; - The LRO (left-to-right-override) formatting character.
   86.42 +      &#x202C; - The PDF (pop directional formatting) formatting character; closes LRO.
   86.43 +    </div>
   86.44 +    <div class="test">
   86.45 +      <div dir="ltr">
   86.46 +        &#x05D0; <span dir="auto">a!</span> 1
   86.47 +      </div>
   86.48 +      <div dir="rtl">
   86.49 +        a <span dir="auto">&#x05D0;!</span> 1
   86.50 +      </div>
   86.51 +    </div>
   86.52 +    <div class="ref">
   86.53 +      <div dir="ltr">
   86.54 +        &#x202D;1 a! &#x05D0;&#x202C;
   86.55 +      </div>
   86.56 +      <div dir="rtl">
   86.57 +        &#x202D;a !&#x05D0; 1&#x202C;
   86.58 +      </div>
   86.59 +    </div>
   86.60 +  </body>
   86.61 +</html>
    87.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    87.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-pre-N-EN-ref.html	Sun Feb 19 10:38:29 2012 +0200
    87.3 @@ -0,0 +1,49 @@
    87.4 +<!DOCTYPE html>
    87.5 +<html>
    87.6 +  <head>
    87.7 +    <meta charset="utf-8" />
    87.8 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
    87.9 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   87.10 +    <style>
   87.11 +      body {
   87.12 +        font-size:18px;
   87.13 +        text-align:left;
   87.14 +      }
   87.15 +      .test, .ref {
   87.16 +        border: medium solid gray;
   87.17 +        width: 400px;
   87.18 +        margin: 20px;
   87.19 +      }
   87.20 +      .comments {
   87.21 +        display: none;
   87.22 +      }
   87.23 +    </style>
   87.24 +  </head>
   87.25 +  <body>
   87.26 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   87.27 +    <div class="test">
   87.28 +      <div dir="ltr">
   87.29 +        <pre dir="ltr">
   87.30 +@123!
   87.31 +        </pre>
   87.32 +      </div>
   87.33 +      <div dir="rtl">
   87.34 +        <pre dir="ltr">
   87.35 +@123!
   87.36 +        </pre>
   87.37 +      </div>
   87.38 +    </div>
   87.39 +    <div class="ref">
   87.40 +      <div dir="ltr">
   87.41 +        <pre dir="ltr">
   87.42 +@123!
   87.43 +        </pre>
   87.44 +      </div>
   87.45 +      <div dir="rtl">
   87.46 +        <pre dir="ltr">
   87.47 +@123!
   87.48 +        </pre>
   87.49 +      </div>
   87.50 +    </div>
   87.51 +  </body>
   87.52 +</html>
    88.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    88.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-pre-N-EN.html	Sun Feb 19 10:38:29 2012 +0200
    88.3 @@ -0,0 +1,66 @@
    88.4 +<!DOCTYPE html>
    88.5 +<html>
    88.6 +  <head>
    88.7 +    <meta charset="utf-8" />
    88.8 +    <title>HTML Test: pre with dir=auto, all N+EN</title>
    88.9 +    <link rel="reference" href="dir_auto-pre-N-EN-ref.html" />
   88.10 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
   88.11 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   88.12 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   88.13 +    <link rel="help" href="http://dev.w3.org/csswg/css3-writing-modes/#unicode-bidi0" />
   88.14 +    <meta name="assert" content="
   88.15 +      When dir='auto', the direction is set according to the first strong character
   88.16 +      of the text.
   88.17 +      For textarea and pre elements, the heuristic is applied on a per-paragraph level.
   88.18 +      If there is no strong character, as in this test, the direction defaults to LTR." />
   88.19 +    <style>
   88.20 +      body {
   88.21 +        font-size:18px;
   88.22 +        text-align:left;
   88.23 +      }
   88.24 +      .test, .ref {
   88.25 +        border: medium solid gray;
   88.26 +        width: 400px;
   88.27 +        margin: 20px;
   88.28 +      }
   88.29 +      .comments {
   88.30 +        display: none;
   88.31 +      }
   88.32 +    </style>
   88.33 +  </head>
   88.34 +  <body>
   88.35 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   88.36 +    <div class="comments">
   88.37 +      Key to entities used below:
   88.38 +        &#x200E; - LRM, the invisible left-to-right mark (strongly LTR).
   88.39 +        &#x200F; - RLM, the invisible right-to-left mark (strongly RTL).
   88.40 +      We use text-align:left because neither the dir="auto" nor the unicode-bidi:plaintext
   88.41 +      specification states whether text-align:start and text-align:end should obey the paragraph
   88.42 +      direction or the direction property in a unicode-bidi:plaintext element.
   88.43 +    </div>
   88.44 +    <div class="test">
   88.45 +      <div dir="ltr">
   88.46 +        <pre dir="auto">
   88.47 +@123!
   88.48 +        </pre>
   88.49 +      </div>
   88.50 +      <div dir="rtl">
   88.51 +        <pre dir="auto">
   88.52 +@123!
   88.53 +        </pre>
   88.54 +      </div>
   88.55 +    </div>
   88.56 +    <div class="ref">
   88.57 +      <div dir="ltr">
   88.58 +        <pre dir="ltr">
   88.59 +@123!
   88.60 +        </pre>
   88.61 +      </div>
   88.62 +      <div dir="rtl">
   88.63 +        <pre dir="ltr">
   88.64 +@123!
   88.65 +        </pre>
   88.66 +      </div>
   88.67 +    </div>
   88.68 +  </body>
   88.69 +</html>
    89.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    89.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-pre-N-between-Rs-ref.html	Sun Feb 19 10:38:29 2012 +0200
    89.3 @@ -0,0 +1,61 @@
    89.4 +<!DOCTYPE html>
    89.5 +<html>
    89.6 +  <head>
    89.7 +    <meta charset="utf-8" />
    89.8 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
    89.9 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   89.10 +    <style>
   89.11 +      body {
   89.12 +        font-size:18px;
   89.13 +        text-align:left;
   89.14 +      }
   89.15 +      .test, .ref {
   89.16 +        border: medium solid gray;
   89.17 +        width: 400px;
   89.18 +        margin: 20px;
   89.19 +      }
   89.20 +      .comments {
   89.21 +        display: none;
   89.22 +      }
   89.23 +    </style>
   89.24 +  </head>
   89.25 +  <body>
   89.26 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   89.27 +    <div class="comments">
   89.28 +      Key to entities used below:
   89.29 +        &#x05D0; - The Hebrew letter Alef (strongly RTL).
   89.30 +    </div>
   89.31 +    <div class="test">
   89.32 +      <div dir="ltr">
   89.33 +        <pre dir="rtl">
   89.34 +&#x05D0;
   89.35 +!...
   89.36 +&#x05D0;
   89.37 +        </pre>
   89.38 +      </div>
   89.39 +      <div dir="rtl">
   89.40 +        <pre dir="rtl">
   89.41 +&#x05D0;
   89.42 +!...
   89.43 +&#x05D0;
   89.44 +        </pre>
   89.45 +      </div>
   89.46 +    </div>
   89.47 +    <div class="ref">
   89.48 +      <div dir="ltr">
   89.49 +        <pre dir="rtl">
   89.50 +&#x05D0;
   89.51 +!...
   89.52 +&#x05D0;
   89.53 +        </pre>
   89.54 +      </div>
   89.55 +      <div dir="rtl">
   89.56 +        <pre dir="rtl">
   89.57 +&#x05D0;
   89.58 +!...
   89.59 +&#x05D0;
   89.60 +        </pre>
   89.61 +      </div>
   89.62 +    </div>
   89.63 +  </body>
   89.64 +</html>
    90.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    90.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-pre-N-between-Rs.html	Sun Feb 19 10:38:29 2012 +0200
    90.3 @@ -0,0 +1,76 @@
    90.4 +<!DOCTYPE html>
    90.5 +<html>
    90.6 +  <head>
    90.7 +    <meta charset="utf-8" />
    90.8 +    <title>HTML Test: pre with dir=auto, all-N between all-Rs</title>
    90.9 +    <link rel="reference" href="dir_auto-pre-N-between-Rs-ref.html" />
   90.10 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
   90.11 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   90.12 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   90.13 +    <link rel="help" href="http://dev.w3.org/csswg/css3-writing-modes/#unicode-bidi0" />
   90.14 +    <meta name="assert" content="
   90.15 +      When dir='auto', the direction is set according to the first strong character
   90.16 +      of the text.
   90.17 +      For textarea and pre elements, the heuristic is applied on a per-paragraph level.
   90.18 +      If there is no strong character, as in this test, the direction defaults to LTR." />
   90.19 +    <style>
   90.20 +      body {
   90.21 +        font-size:18px;
   90.22 +        text-align:left;
   90.23 +      }
   90.24 +      .test, .ref {
   90.25 +        border: medium solid gray;
   90.26 +        width: 400px;
   90.27 +        margin: 20px;
   90.28 +      }
   90.29 +      .comments {
   90.30 +        display: none;
   90.31 +      }
   90.32 +    </style>
   90.33 +  </head>
   90.34 +  <body>
   90.35 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   90.36 +    <div class="comments">
   90.37 +      Key to entities used below:
   90.38 +        &#x05D0; - The Hebrew letter Alef (strongly RTL).
   90.39 +      We use text-align:left because neither the dir="auto" nor the unicode-bidi:plaintext
   90.40 +      specification states whether text-align:start and text-align:end should obey the paragraph
   90.41 +      direction or the direction property in a unicode-bidi:plaintext element.
   90.42 +      The ...! paragraph, being neutral, is supposed to be displayed LTR (i.e. as ...!, not as !...)
   90.43 +      despite both the paragraph before it and the paragraph after it being all-RTL, which makes the
   90.44 +      element as a whole RTL.
   90.45 +    </div>
   90.46 +    <div class="test">
   90.47 +      <div dir="ltr">
   90.48 +        <pre dir="auto">
   90.49 +&#x05D0;
   90.50 +...!
   90.51 +&#x05D0;
   90.52 +        </pre>
   90.53 +      </div>
   90.54 +      <div dir="rtl">
   90.55 +        <pre dir="auto">
   90.56 +&#x05D0;
   90.57 +...!
   90.58 +&#x05D0;
   90.59 +        </pre>
   90.60 +      </div>
   90.61 +    </div>
   90.62 +    <div class="ref">
   90.63 +      <div dir="ltr">
   90.64 +        <pre dir="rtl">
   90.65 +&#x05D0;
   90.66 +!...
   90.67 +&#x05D0;
   90.68 +        </pre>
   90.69 +      </div>
   90.70 +      <div dir="rtl">
   90.71 +        <pre dir="rtl">
   90.72 +&#x05D0;
   90.73 +!...
   90.74 +&#x05D0;
   90.75 +        </pre>
   90.76 +      </div>
   90.77 +    </div>
   90.78 +  </body>
   90.79 +</html>
    91.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    91.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-pre-mixed-ref.html	Sun Feb 19 10:38:29 2012 +0200
    91.3 @@ -0,0 +1,61 @@
    91.4 +<!DOCTYPE html>
    91.5 +<html>
    91.6 +  <head>
    91.7 +    <meta charset="utf-8" />
    91.8 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
    91.9 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   91.10 +    <style>
   91.11 +      body {
   91.12 +        font-size:18px;
   91.13 +        text-align:left;
   91.14 +      }
   91.15 +      .test, .ref {
   91.16 +        border: medium solid gray;
   91.17 +        width: 400px;
   91.18 +        margin: 20px;
   91.19 +      }
   91.20 +      .comments {
   91.21 +        display: none;
   91.22 +      }
   91.23 +    </style>
   91.24 +  </head>
   91.25 +  <body>
   91.26 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   91.27 +    <div class="test">
   91.28 +      <div dir="ltr">
   91.29 +        <pre dir="ltr">
   91.30 +@123!
   91.31 +@123!
   91.32 +@123!
   91.33 +@123!
   91.34 +        </pre>
   91.35 +      </div>
   91.36 +      <div dir="rtl">
   91.37 +        <pre dir="ltr">
   91.38 +@123!
   91.39 +@123!
   91.40 +@123!
   91.41 +@123!
   91.42 +        </pre>
   91.43 +      </div>
   91.44 +    </div>
   91.45 +    <div class="ref">
   91.46 +      <div dir="ltr">
   91.47 +        <pre dir="ltr">
   91.48 +@123!
   91.49 +@123!
   91.50 +@123!
   91.51 +@123!
   91.52 +        </pre>
   91.53 +      </div>
   91.54 +      <div dir="rtl">
   91.55 +        <pre dir="ltr">
   91.56 +@123!
   91.57 +@123!
   91.58 +@123!
   91.59 +@123!
   91.60 +        </pre>
   91.61 +      </div>
   91.62 +    </div>
   91.63 +  </body>
   91.64 +</html>
    92.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    92.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-pre-mixed.html	Sun Feb 19 10:38:29 2012 +0200
    92.3 @@ -0,0 +1,77 @@
    92.4 +<!DOCTYPE html>
    92.5 +<html>
    92.6 +  <head>
    92.7 +    <meta charset="utf-8" />
    92.8 +    <title>HTML Test: pre with dir=auto, mixed L and R paragraphs</title>
    92.9 +    <link rel="reference" href="dir_auto-pre-mixed-ref.html" />
   92.10 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
   92.11 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   92.12 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   92.13 +    <link rel="help" href="http://dev.w3.org/csswg/css3-writing-modes/#unicode-bidi0" />
   92.14 +    <meta name="assert" content="
   92.15 +      When dir='auto', the direction is set according to the first strong character
   92.16 +      of the text.
   92.17 +      For textarea and pre elements, the heuristic is applied on a per-paragraph level." />
   92.18 +    <style>
   92.19 +      body {
   92.20 +        font-size:18px;
   92.21 +        text-align:left;
   92.22 +      }
   92.23 +      .test, .ref {
   92.24 +        border: medium solid gray;
   92.25 +        width: 400px;
   92.26 +        margin: 20px;
   92.27 +      }
   92.28 +      .comments {
   92.29 +        display: none;
   92.30 +      }
   92.31 +    </style>
   92.32 +  </head>
   92.33 +  <body>
   92.34 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   92.35 +    <div class="comments">
   92.36 +      Key to entities used below:
   92.37 +        &#x200E; - LRM, the invisible left-to-right mark (strongly LTR).
   92.38 +        &#x200F; - RLM, the invisible right-to-left mark (strongly RTL).
   92.39 +      We use text-align:left because neither the dir="auto" nor the unicode-bidi:plaintext
   92.40 +      specification states whether text-align:start and text-align:end should obey the paragraph
   92.41 +      direction or the direction property in a unicode-bidi:plaintext element.
   92.42 +    </div>
   92.43 +    <div class="test">
   92.44 +      <div dir="ltr">
   92.45 +        <pre dir="auto">
   92.46 +@&#x200E;123&#x200F;!
   92.47 +!&#x200F;123&#x200E;@
   92.48 +@123&#x200E;&#x200F;!
   92.49 +!123&#x200F;&#x200E;@
   92.50 +        </pre>
   92.51 +      </div>
   92.52 +      <div dir="rtl">
   92.53 +        <pre dir="auto">
   92.54 +@&#x200E;123&#x200F;!
   92.55 +!&#x200F;123&#x200E;@
   92.56 +@123&#x200E;&#x200F;!
   92.57 +!123&#x200F;&#x200E;@
   92.58 +        </pre>
   92.59 +      </div>
   92.60 +    </div>
   92.61 +    <div class="ref">
   92.62 +      <div dir="ltr">
   92.63 +        <pre dir="ltr">
   92.64 +@123!
   92.65 +@123!
   92.66 +@123!
   92.67 +@123!
   92.68 +        </pre>
   92.69 +      </div>
   92.70 +      <div dir="rtl">
   92.71 +        <pre dir="ltr">
   92.72 +@123!
   92.73 +@123!
   92.74 +@123!
   92.75 +@123!
   92.76 +        </pre>
   92.77 +      </div>
   92.78 +    </div>
   92.79 +  </body>
   92.80 +</html>
    93.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    93.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-textarea-N-EN-ref.html	Sun Feb 19 10:38:29 2012 +0200
    93.3 @@ -0,0 +1,49 @@
    93.4 +<!DOCTYPE html>
    93.5 +<html>
    93.6 +  <head>
    93.7 +    <meta charset="utf-8" />
    93.8 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
    93.9 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   93.10 +    <style>
   93.11 +      body, textarea {
   93.12 +        font-size:18px;
   93.13 +        text-align:left;
   93.14 +      }
   93.15 +      .test, .ref {
   93.16 +        border: medium solid gray;
   93.17 +        width: 400px;
   93.18 +        margin: 20px;
   93.19 +      }
   93.20 +      .comments {
   93.21 +        display: none;
   93.22 +      }
   93.23 +    </style>
   93.24 +  </head>
   93.25 +  <body>
   93.26 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   93.27 +    <div class="test">
   93.28 +      <div dir="ltr">
   93.29 +        <textarea rows="2" dir="ltr">
   93.30 +@123!
   93.31 +        </textarea>
   93.32 +      </div>
   93.33 +      <div dir="rtl">
   93.34 +        <textarea rows="2" dir="ltr">
   93.35 +@123!
   93.36 +        </textarea>
   93.37 +      </div>
   93.38 +    </div>
   93.39 +    <div class="ref">
   93.40 +      <div dir="ltr">
   93.41 +        <textarea rows="2" dir="ltr">
   93.42 +@123!
   93.43 +        </textarea>
   93.44 +      </div>
   93.45 +      <div dir="rtl">
   93.46 +        <textarea rows="2" dir="ltr">
   93.47 +@123!
   93.48 +        </textarea>
   93.49 +      </div>
   93.50 +    </div>
   93.51 +  </body>
   93.52 +</html>
    94.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    94.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-textarea-N-EN.html	Sun Feb 19 10:38:29 2012 +0200
    94.3 @@ -0,0 +1,66 @@
    94.4 +<!DOCTYPE html>
    94.5 +<html>
    94.6 +  <head>
    94.7 +    <meta charset="utf-8" />
    94.8 +    <title>HTML Test: textarea with dir=auto, all N+EN</title>
    94.9 +    <link rel="reference" href="dir_auto-textarea-N-EN-ref.html" />
   94.10 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
   94.11 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   94.12 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   94.13 +    <link rel="help" href="http://dev.w3.org/csswg/css3-writing-modes/#unicode-bidi0" />
   94.14 +    <meta name="assert" content="
   94.15 +      When dir='auto', the direction is set according to the first strong character
   94.16 +      of the text.
   94.17 +      For textarea and pre elements, the heuristic is applied on a per-paragraph level.
   94.18 +      If there is no strong character, as in this test, the direction defaults to LTR." />
   94.19 +    <style>
   94.20 +      body, textarea {
   94.21 +        font-size:18px;
   94.22 +        text-align:left;
   94.23 +      }
   94.24 +      .test, .ref {
   94.25 +        border: medium solid gray;
   94.26 +        width: 400px;
   94.27 +        margin: 20px;
   94.28 +      }
   94.29 +      .comments {
   94.30 +        display: none;
   94.31 +      }
   94.32 +    </style>
   94.33 +  </head>
   94.34 +  <body>
   94.35 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   94.36 +    <div class="comments">
   94.37 +      Key to entities used below:
   94.38 +        &#x200E; - LRM, the invisible left-to-right mark (strongly LTR).
   94.39 +        &#x200F; - RLM, the invisible right-to-left mark (strongly RTL).
   94.40 +      We use text-align:left because neither the dir="auto" nor the unicode-bidi:plaintext
   94.41 +      specification states whether text-align:start and text-align:end should obey the paragraph
   94.42 +      direction or the direction property in a unicode-bidi:plaintext element.
   94.43 +    </div>
   94.44 +    <div class="test">
   94.45 +      <div dir="ltr">
   94.46 +        <textarea rows="2" dir="auto">
   94.47 +@123!
   94.48 +        </textarea>
   94.49 +      </div>
   94.50 +      <div dir="rtl">
   94.51 +        <textarea rows="2" dir="auto">
   94.52 +@123!
   94.53 +        </textarea>
   94.54 +      </div>
   94.55 +    </div>
   94.56 +    <div class="ref">
   94.57 +      <div dir="ltr">
   94.58 +        <textarea rows="2" dir="ltr">
   94.59 +@123!
   94.60 +        </textarea>
   94.61 +      </div>
   94.62 +      <div dir="rtl">
   94.63 +        <textarea rows="2" dir="ltr">
   94.64 +@123!
   94.65 +        </textarea>
   94.66 +      </div>
   94.67 +    </div>
   94.68 +  </body>
   94.69 +</html>
    95.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    95.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-textarea-N-between-Rs-ref.html	Sun Feb 19 10:38:29 2012 +0200
    95.3 @@ -0,0 +1,61 @@
    95.4 +<!DOCTYPE html>
    95.5 +<html>
    95.6 +  <head>
    95.7 +    <meta charset="utf-8" />
    95.8 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
    95.9 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   95.10 +    <style>
   95.11 +      body, textarea {
   95.12 +        font-size:18px;
   95.13 +        text-align:left;
   95.14 +      }
   95.15 +      .test, .ref {
   95.16 +        border: medium solid gray;
   95.17 +        width: 400px;
   95.18 +        margin: 20px;
   95.19 +      }
   95.20 +      .comments {
   95.21 +        display: none;
   95.22 +      }
   95.23 +    </style>
   95.24 +  </head>
   95.25 +  <body>
   95.26 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   95.27 +    <div class="comments">
   95.28 +      Key to entities used below:
   95.29 +        &#x05D0; - The Hebrew letter Alef (strongly RTL).
   95.30 +    </div>
   95.31 +    <div class="test">
   95.32 +      <div dir="ltr">
   95.33 +        <textarea rows="4" dir="rtl">
   95.34 +&#x05D0;
   95.35 +!...
   95.36 +&#x05D0;
   95.37 +        </textarea>
   95.38 +      </div>
   95.39 +      <div dir="rtl">
   95.40 +        <textarea rows="4" dir="rtl">
   95.41 +&#x05D0;
   95.42 +!...
   95.43 +&#x05D0;
   95.44 +        </textarea>
   95.45 +      </div>
   95.46 +    </div>
   95.47 +    <div class="ref">
   95.48 +      <div dir="ltr">
   95.49 +        <textarea rows="4" dir="rtl">
   95.50 +&#x05D0;
   95.51 +!...
   95.52 +&#x05D0;
   95.53 +        </textarea>
   95.54 +      </div>
   95.55 +      <div dir="rtl">
   95.56 +        <textarea rows="4" dir="rtl">
   95.57 +&#x05D0;
   95.58 +!...
   95.59 +&#x05D0;
   95.60 +        </textarea>
   95.61 +      </div>
   95.62 +    </div>
   95.63 +  </body>
   95.64 +</html>
    96.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    96.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-textarea-N-between-Rs.html	Sun Feb 19 10:38:29 2012 +0200
    96.3 @@ -0,0 +1,76 @@
    96.4 +<!DOCTYPE html>
    96.5 +<html>
    96.6 +  <head>
    96.7 +    <meta charset="utf-8" />
    96.8 +    <title>HTML Test: textarea with dir=auto, all-N between all-Rs</title>
    96.9 +    <link rel="reference" href="dir_auto-textarea-N-between-Rs-ref.html" />
   96.10 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
   96.11 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   96.12 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   96.13 +    <link rel="help" href="http://dev.w3.org/csswg/css3-writing-modes/#unicode-bidi0" />
   96.14 +    <meta name="assert" content="
   96.15 +      When dir='auto', the direction is set according to the first strong character
   96.16 +      of the text.
   96.17 +      For textarea and pre elements, the heuristic is applied on a per-paragraph level.
   96.18 +      If there is no strong character, as in this test, the direction defaults to LTR." />
   96.19 +    <style>
   96.20 +      body, textarea {
   96.21 +        font-size:18px;
   96.22 +        text-align:left;
   96.23 +      }
   96.24 +      .test, .ref {
   96.25 +        border: medium solid gray;
   96.26 +        width: 400px;
   96.27 +        margin: 20px;
   96.28 +      }
   96.29 +      .comments {
   96.30 +        display: none;
   96.31 +      }
   96.32 +    </style>
   96.33 +  </head>
   96.34 +  <body>
   96.35 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   96.36 +    <div class="comments">
   96.37 +      Key to entities used below:
   96.38 +        &#x05D0; - The Hebrew letter Alef (strongly RTL).
   96.39 +      We use text-align:left because neither the dir="auto" nor the unicode-bidi:plaintext
   96.40 +      specification states whether text-align:start and text-align:end should obey the paragraph
   96.41 +      direction or the direction property in a unicode-bidi:plaintext element.
   96.42 +      The ...! paragraph, being neutral, is supposed to be displayed LTR (i.e. as ...!, not as !...)
   96.43 +      despite both the paragraph before it and the paragraph after it being all-RTL, which makes the
   96.44 +      element as a whole RTL.
   96.45 +    </div>
   96.46 +    <div class="test">
   96.47 +      <div dir="ltr">
   96.48 +        <textarea rows="4" dir="auto">
   96.49 +&#x05D0;
   96.50 +...!
   96.51 +&#x05D0;
   96.52 +        </textarea>
   96.53 +      </div>
   96.54 +      <div dir="rtl">
   96.55 +        <textarea rows="4" dir="auto">
   96.56 +&#x05D0;
   96.57 +...!
   96.58 +&#x05D0;
   96.59 +        </textarea>
   96.60 +      </div>
   96.61 +    </div>
   96.62 +    <div class="ref">
   96.63 +      <div dir="ltr">
   96.64 +        <textarea rows="4" dir="rtl">
   96.65 +&#x05D0;
   96.66 +!...
   96.67 +&#x05D0;
   96.68 +        </textarea>
   96.69 +      </div>
   96.70 +      <div dir="rtl">
   96.71 +        <textarea rows="4" dir="rtl">
   96.72 +&#x05D0;
   96.73 +!...
   96.74 +&#x05D0;
   96.75 +        </textarea>
   96.76 +      </div>
   96.77 +    </div>
   96.78 +  </body>
   96.79 +</html>
    97.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    97.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-textarea-mixed-ref.html	Sun Feb 19 10:38:29 2012 +0200
    97.3 @@ -0,0 +1,61 @@
    97.4 +<!DOCTYPE html>
    97.5 +<html>
    97.6 +  <head>
    97.7 +    <meta charset="utf-8" />
    97.8 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
    97.9 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   97.10 +    <style>
   97.11 +      body, textarea {
   97.12 +        font-size:18px;
   97.13 +        text-align:left;
   97.14 +      }
   97.15 +      .test, .ref {
   97.16 +        border: medium solid gray;
   97.17 +        width: 400px;
   97.18 +        margin: 20px;
   97.19 +      }
   97.20 +      .comments {
   97.21 +        display: none;
   97.22 +      }
   97.23 +    </style>
   97.24 +  </head>
   97.25 +  <body>
   97.26 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   97.27 +    <div class="test">
   97.28 +      <div dir="ltr">
   97.29 +        <textarea rows="5" dir="rtl">
   97.30 +!123@
   97.31 +!123@
   97.32 +!123@
   97.33 +!123@
   97.34 +        </textarea>
   97.35 +      </div>
   97.36 +      <div dir="rtl">
   97.37 +        <textarea rows="5" dir="ltr">
   97.38 +@123!
   97.39 +@123!
   97.40 +@123!
   97.41 +@123!
   97.42 +        </textarea>
   97.43 +      </div>
   97.44 +    </div>
   97.45 +    <div class="ref">
   97.46 +      <div dir="ltr">
   97.47 +        <textarea rows="5" dir="rtl">
   97.48 +!123@
   97.49 +!123@
   97.50 +!123@
   97.51 +!123@
   97.52 +        </textarea>
   97.53 +      </div>
   97.54 +      <div dir="rtl">
   97.55 +        <textarea rows="5" dir="ltr">
   97.56 +@123!
   97.57 +@123!
   97.58 +@123!
   97.59 +@123!
   97.60 +        </textarea>
   97.61 +      </div>
   97.62 +    </div>
   97.63 +  </body>
   97.64 +</html>
    98.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    98.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-textarea-mixed.html	Sun Feb 19 10:38:29 2012 +0200
    98.3 @@ -0,0 +1,77 @@
    98.4 +<!DOCTYPE html>
    98.5 +<html>
    98.6 +  <head>
    98.7 +    <meta charset="utf-8" />
    98.8 +    <title>HTML Test: textarea with dir=auto, mixed L and R paragraphs</title>
    98.9 +    <link rel="reference" href="dir_auto-textarea-mixed-ref.html" />
   98.10 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
   98.11 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   98.12 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
   98.13 +    <link rel="help" href="http://dev.w3.org/csswg/css3-writing-modes/#unicode-bidi0" />
   98.14 +    <meta name="assert" content="
   98.15 +      When dir='auto', the direction is set according to the first strong character
   98.16 +      of the text.
   98.17 +      For textarea and pre elements, the heuristic is applied on a per-paragraph level." />
   98.18 +    <style>
   98.19 +      body, textarea {
   98.20 +        font-size:18px;
   98.21 +        text-align:left;
   98.22 +      }
   98.23 +      .test, .ref {
   98.24 +        border: medium solid gray;
   98.25 +        width: 400px;
   98.26 +        margin: 20px;
   98.27 +      }
   98.28 +      .comments {
   98.29 +        display: none;
   98.30 +      }
   98.31 +    </style>
   98.32 +  </head>
   98.33 +  <body>
   98.34 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   98.35 +    <div class="comments">
   98.36 +      Key to entities used below:
   98.37 +        &#x200E; - LRM, the invisible left-to-right mark (strongly LTR).
   98.38 +        &#x200F; - RLM, the invisible right-to-left mark (strongly RTL).
   98.39 +      We use text-align:left because neither the dir="auto" nor the unicode-bidi:plaintext
   98.40 +      specification states whether text-align:start and text-align:end should obey the paragraph
   98.41 +      direction or the direction property in a unicode-bidi:plaintext element.
   98.42 +    </div>
   98.43 +    <div class="test">
   98.44 +      <div dir="ltr">
   98.45 +        <textarea rows="5" dir="auto">
   98.46 +!&#x200F;123&#x200E;@
   98.47 +@&#x200E;123&#x200F;!
   98.48 +!123&#x200F;&#x200E;@
   98.49 +@123&#x200E;&#x200F;!
   98.50 +        </textarea>
   98.51 +      </div>
   98.52 +      <div dir="rtl">
   98.53 +        <textarea rows="5" dir="auto">
   98.54 +@&#x200E;123&#x200F;!
   98.55 +!&#x200F;123&#x200E;@
   98.56 +@123&#x200E;&#x200F;!
   98.57 +!123&#x200F;&#x200E;@
   98.58 +        </textarea>
   98.59 +      </div>
   98.60 +    </div>
   98.61 +    <div class="ref">
   98.62 +      <div dir="ltr">
   98.63 +        <textarea rows="5" dir="rtl">
   98.64 +!123@
   98.65 +!123@
   98.66 +!123@
   98.67 +!123@
   98.68 +        </textarea>
   98.69 +      </div>
   98.70 +      <div dir="rtl">
   98.71 +        <textarea rows="5" dir="ltr">
   98.72 +@123!
   98.73 +@123!
   98.74 +@123!
   98.75 +@123!
   98.76 +        </textarea>
   98.77 +      </div>
   98.78 +    </div>
   98.79 +  </body>
   98.80 +</html>
    99.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    99.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-textarea-script-N-EN-ref.html	Sun Feb 19 10:38:29 2012 +0200
    99.3 @@ -0,0 +1,49 @@
    99.4 +<!DOCTYPE html>
    99.5 +<html>
    99.6 +  <head>
    99.7 +    <meta charset="utf-8" />
    99.8 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
    99.9 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
   99.10 +    <style>
   99.11 +      body, textarea {
   99.12 +        font-size:18px;
   99.13 +        text-align:left;
   99.14 +      }
   99.15 +      .test, .ref {
   99.16 +        border: medium solid gray;
   99.17 +        width: 400px;
   99.18 +        margin: 20px;
   99.19 +      }
   99.20 +      .comments {
   99.21 +        display: none;
   99.22 +      }
   99.23 +    </style>
   99.24 +  </head>
   99.25 +  <body>
   99.26 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
   99.27 +    <div class="test">
   99.28 +      <div dir="ltr">
   99.29 +        <textarea rows="2" dir="ltr">
   99.30 +@123!
   99.31 +        </textarea>
   99.32 +      </div>
   99.33 +      <div dir="rtl">
   99.34 +        <textarea rows="2" dir="ltr">
   99.35 +@123!
   99.36 +        </textarea>
   99.37 +      </div>
   99.38 +    </div>
   99.39 +    <div class="ref">
   99.40 +      <div dir="ltr">
   99.41 +        <textarea rows="2" dir="ltr">
   99.42 +@123!
   99.43 +        </textarea>
   99.44 +      </div>
   99.45 +      <div dir="rtl">
   99.46 +        <textarea rows="2" dir="ltr">
   99.47 +@123!
   99.48 +        </textarea>
   99.49 +      </div>
   99.50 +    </div>
   99.51 +  </body>
   99.52 +</html>
   100.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   100.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-textarea-script-N-EN.html	Sun Feb 19 10:38:29 2012 +0200
   100.3 @@ -0,0 +1,75 @@
   100.4 +<!DOCTYPE html>
   100.5 +<html>
   100.6 +  <head>
   100.7 +    <meta charset="utf-8" />
   100.8 +    <title>HTML Test: textarea with dir=auto, script assigns to all N+EN</title>
   100.9 +    <link rel="reference" href="dir_auto-textarea-script-N-EN-ref.html" />
  100.10 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
  100.11 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
  100.12 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
  100.13 +    <link rel="help" href="http://dev.w3.org/csswg/css3-writing-modes/#unicode-bidi0" />
  100.14 +    <meta name="assert" content="
  100.15 +      When dir='auto', the direction is set according to the first strong character
  100.16 +      of the text.
  100.17 +      For textarea and pre elements, the heuristic is applied on a per-paragraph level.
  100.18 +      If there is no strong character, as in this test, the direction defaults to LTR." />
  100.19 +    <style>
  100.20 +      body, textarea {
  100.21 +        font-size:18px;
  100.22 +        text-align:left;
  100.23 +      }
  100.24 +      .test, .ref {
  100.25 +        border: medium solid gray;
  100.26 +        width: 400px;
  100.27 +        margin: 20px;
  100.28 +      }
  100.29 +      .comments {
  100.30 +        display: none;
  100.31 +      }
  100.32 +    </style>
  100.33 +  </head>
  100.34 +  <body>
  100.35 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
  100.36 +    <div class="comments">
  100.37 +      Key to entities used below:
  100.38 +        &#x200E; - LRM, the invisible left-to-right mark (strongly LTR).
  100.39 +        &#x200F; - RLM, the invisible right-to-left mark (strongly RTL).
  100.40 +      We use text-align:left because neither the dir="auto" nor the unicode-bidi:plaintext
  100.41 +      specification states whether text-align:start and text-align:end should obey the paragraph
  100.42 +      direction or the direction property in a unicode-bidi:plaintext element.
  100.43 +    </div>
  100.44 +    <div id="test" class="test">
  100.45 +      <script>
  100.46 +        window.onload = function() {
  100.47 +          var test = document.getElementById('test');
  100.48 +          var textareas = test.getElementsByTagName('textarea');
  100.49 +          for (var i = 0; i != textareas.length; i++) {
  100.50 +            textareas[i].value = '@123!\n';
  100.51 +          }
  100.52 +        }
  100.53 +      </script>
  100.54 +      <div dir="ltr">
  100.55 +        <textarea rows="2" dir="auto">
  100.56 +&#x200F;
  100.57 +        </textarea>
  100.58 +      </div>
  100.59 +      <div dir="rtl">
  100.60 +        <textarea rows="2" dir="auto">
  100.61 +&#x200F;
  100.62 +        </textarea>
  100.63 +      </div>
  100.64 +    </div>
  100.65 +    <div class="ref">
  100.66 +      <div dir="ltr">
  100.67 +        <textarea rows="2" dir="ltr">
  100.68 +@123!
  100.69 +        </textarea>
  100.70 +      </div>
  100.71 +      <div dir="rtl">
  100.72 +        <textarea rows="2" dir="ltr">
  100.73 +@123!
  100.74 +        </textarea>
  100.75 +      </div>
  100.76 +    </div>
  100.77 +  </body>
  100.78 +</html>
   101.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   101.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-textarea-script-N-between-Rs-ref.html	Sun Feb 19 10:38:29 2012 +0200
   101.3 @@ -0,0 +1,62 @@
   101.4 +<!DOCTYPE html>
   101.5 +<html>
   101.6 +  <head>
   101.7 +    <meta charset="utf-8" />
   101.8 +    <link rel="reference" href="dir_auto-textarea-N-between-Rs-ref.html" />
   101.9 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
  101.10 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
  101.11 +    <style>
  101.12 +      body, textarea {
  101.13 +        font-size:18px;
  101.14 +        text-align:left;
  101.15 +      }
  101.16 +      .test, .ref {
  101.17 +        border: medium solid gray;
  101.18 +        width: 400px;
  101.19 +        margin: 20px;
  101.20 +      }
  101.21 +      .comments {
  101.22 +        display: none;
  101.23 +      }
  101.24 +    </style>
  101.25 +  </head>
  101.26 +  <body>
  101.27 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
  101.28 +    <div class="comments">
  101.29 +      Key to entities used below:
  101.30 +        &#x05D0; - The Hebrew letter Alef (strongly RTL).
  101.31 +    </div>
  101.32 +    <div class="test">
  101.33 +      <div dir="ltr">
  101.34 +        <textarea rows="4" dir="rtl">
  101.35 +&#x05D0;
  101.36 +!...
  101.37 +&#x05D0;
  101.38 +        </textarea>
  101.39 +      </div>
  101.40 +      <div dir="rtl">
  101.41 +        <textarea rows="4" dir="rtl">
  101.42 +&#x05D0;
  101.43 +!...
  101.44 +&#x05D0;
  101.45 +        </textarea>
  101.46 +      </div>
  101.47 +    </div>
  101.48 +    <div class="ref">
  101.49 +      <div dir="ltr">
  101.50 +        <textarea rows="4" dir="rtl">
  101.51 +&#x05D0;
  101.52 +!...
  101.53 +&#x05D0;
  101.54 +        </textarea>
  101.55 +      </div>
  101.56 +      <div dir="rtl">
  101.57 +        <textarea rows="4" dir="rtl">
  101.58 +&#x05D0;
  101.59 +!...
  101.60 +&#x05D0;
  101.61 +        </textarea>
  101.62 +      </div>
  101.63 +    </div>
  101.64 +  </body>
  101.65 +</html>
   102.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   102.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-textarea-script-N-between-Rs.html	Sun Feb 19 10:38:29 2012 +0200
   102.3 @@ -0,0 +1,81 @@
   102.4 +<!DOCTYPE html>
   102.5 +<html>
   102.6 +  <head>
   102.7 +    <meta charset="utf-8" />
   102.8 +    <title>HTML Test: textarea with dir=auto, script assigns to all-N between all-Rs</title>
   102.9 +    <link rel="reference" href="dir_auto-textarea-script-N-between-Rs-ref.html" />
  102.10 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
  102.11 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
  102.12 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
  102.13 +    <link rel="help" href="http://dev.w3.org/csswg/css3-writing-modes/#unicode-bidi0" />
  102.14 +    <meta name="assert" content="
  102.15 +      When dir='auto', the direction is set according to the first strong character
  102.16 +      of the text.
  102.17 +      For textarea and pre elements, the heuristic is applied on a per-paragraph level.
  102.18 +      If there is no strong character, as in this test, the direction defaults to LTR." />
  102.19 +    <style>
  102.20 +      body, textarea {
  102.21 +        font-size:18px;
  102.22 +        text-align:left;
  102.23 +      }
  102.24 +      .test, .ref {
  102.25 +        border: medium solid gray;
  102.26 +        width: 400px;
  102.27 +        margin: 20px;
  102.28 +      }
  102.29 +      .comments {
  102.30 +        display: none;
  102.31 +      }
  102.32 +    </style>
  102.33 +  </head>
  102.34 +  <body>
  102.35 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
  102.36 +    <div class="comments">
  102.37 +      Key to entities used below:
  102.38 +        &#x05D0; - The Hebrew letter Alef (strongly RTL).
  102.39 +      We use text-align:left because neither the dir="auto" nor the unicode-bidi:plaintext
  102.40 +      specification states whether text-align:start and text-align:end should obey the paragraph
  102.41 +      direction or the direction property in a unicode-bidi:plaintext element.
  102.42 +      The ...! paragraph, being neutral, is supposed to be displayed LTR (i.e. as ...!, not as !...)
  102.43 +      despite both the paragraph before it and the paragraph after it being all-RTL, which makes the
  102.44 +      element as a whole RTL.
  102.45 +    </div>
  102.46 +    <div id="test" class="test">
  102.47 +      <script>
  102.48 +        window.onload = function() {
  102.49 +          var test = document.getElementById('test');
  102.50 +          var textareas = test.getElementsByTagName('textarea');
  102.51 +          for (var i = 0; i != textareas.length; i++) {
  102.52 +            textareas[i].value = '\u05D0\n...!\n\u05D0';
  102.53 +          }
  102.54 +        }
  102.55 +      </script>
  102.56 +      <div dir="ltr">
  102.57 +        <textarea rows="4" dir="auto">
  102.58 +LTR text
  102.59 +        </textarea>
  102.60 +      </div>
  102.61 +      <div dir="rtl">
  102.62 +        <textarea rows="4" dir="auto">
  102.63 +LTR text
  102.64 +        </textarea>
  102.65 +      </div>
  102.66 +    </div>
  102.67 +    <div class="ref">
  102.68 +      <div dir="ltr">
  102.69 +        <textarea rows="4" dir="rtl">
  102.70 +&#x05D0;
  102.71 +!...
  102.72 +&#x05D0;
  102.73 +        </textarea>
  102.74 +      </div>
  102.75 +      <div dir="rtl">
  102.76 +        <textarea rows="4" dir="rtl">
  102.77 +&#x05D0;
  102.78 +!...
  102.79 +&#x05D0;
  102.80 +        </textarea>
  102.81 +      </div>
  102.82 +    </div>
  102.83 +  </body>
  102.84 +</html>
   103.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   103.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-textarea-script-mixed-ref.html	Sun Feb 19 10:38:29 2012 +0200
   103.3 @@ -0,0 +1,61 @@
   103.4 +<!DOCTYPE html>
   103.5 +<html>
   103.6 +  <head>
   103.7 +    <meta charset="utf-8" />
   103.8 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
   103.9 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
  103.10 +    <style>
  103.11 +      body, textarea {
  103.12 +        font-size:18px;
  103.13 +        text-align:left;
  103.14 +      }
  103.15 +      .test, .ref {
  103.16 +        border: medium solid gray;
  103.17 +        width: 400px;
  103.18 +        margin: 20px;
  103.19 +      }
  103.20 +      .comments {
  103.21 +        display: none;
  103.22 +      }
  103.23 +    </style>
  103.24 +  </head>
  103.25 +  <body>
  103.26 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
  103.27 +    <div class="test">
  103.28 +      <div dir="ltr">
  103.29 +        <textarea rows="5" dir="rtl">
  103.30 +!123@
  103.31 +!123@
  103.32 +!123@
  103.33 +!123@
  103.34 +        </textarea>
  103.35 +      </div>
  103.36 +      <div dir="rtl">
  103.37 +        <textarea rows="5" dir="ltr">
  103.38 +@123!
  103.39 +@123!
  103.40 +@123!
  103.41 +@123!
  103.42 +        </textarea>
  103.43 +      </div>
  103.44 +    </div>
  103.45 +    <div class="ref">
  103.46 +      <div dir="ltr">
  103.47 +        <textarea rows="5" dir="rtl">
  103.48 +!123@
  103.49 +!123@
  103.50 +!123@
  103.51 +!123@
  103.52 +        </textarea>
  103.53 +      </div>
  103.54 +      <div dir="rtl">
  103.55 +        <textarea rows="5" dir="ltr">
  103.56 +@123!
  103.57 +@123!
  103.58 +@123!
  103.59 +@123!
  103.60 +        </textarea>
  103.61 +      </div>
  103.62 +    </div>
  103.63 +  </body>
  103.64 +</html>
   104.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   104.2 +++ b/tests/submission/html5bidi/dir-auto/dir_auto-textarea-script-mixed.html	Sun Feb 19 10:38:29 2012 +0200
   104.3 @@ -0,0 +1,95 @@
   104.4 +<!DOCTYPE html>
   104.5 +<html>
   104.6 +  <head>
   104.7 +    <meta charset="utf-8" />
   104.8 +    <title>HTML Test: textarea with dir=auto, script assigns to mixed L and R paragraphs</title>
   104.9 +    <link rel="reference" href="dir_auto-textarea-script-mixed-ref.html" />
  104.10 +    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" />
  104.11 +    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com" />
  104.12 +    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute" />
  104.13 +    <link rel="help" href="http://dev.w3.org/csswg/css3-writing-modes/#unicode-bidi0" />
  104.14 +    <meta name="assert" content="
  104.15 +      When dir='auto', the direction is set according to the first strong character
  104.16 +      of the text.
  104.17 +      For textarea and pre elements, the heuristic is applied on a per-paragraph level." />
  104.18 +    <style>
  104.19 +      body, textarea {
  104.20 +        font-size:18px;
  104.21 +        text-align:left;
  104.22 +      }
  104.23 +      .test, .ref {
  104.24 +        border: medium solid gray;
  104.25 +        width: 400px;
  104.26 +        margin: 20px;
  104.27 +      }
  104.28 +      .comments {
  104.29 +        display: none;
  104.30 +      }
  104.31 +    </style>
  104.32 +  </head>
  104.33 +  <body>
  104.34 +    <div class="instructions"><p>Test passes if the two boxes below look exactly the same.</p></div>
  104.35 +    <div class="comments">
  104.36 +      Key to entities used below:
  104.37 +        &#x200E; - LRM, the invisible left-to-right mark (strongly LTR).
  104.38 +        &#x200F; - RLM, the invisible right-to-left mark (strongly RTL).
  104.39 +      We use text-align:left because neither the dir="auto" nor the unicode-bidi:plaintext
  104.40 +      specification states whether text-align:start and text-align:end should obey the paragraph
  104.41 +      direction or the direction property in a unicode-bidi:plaintext element.
  104.42 +    </div>
  104.43 +    <div id="test" class="test">
  104.44 +      <script>
  104.45 +        window.onload = function() {
  104.46 +          var test = document.getElementById('test');
  104.47 +          var textareas = test.getElementsByTagName('textarea');
  104.48 +          for (var i = 0; i != textareas.length; i++) {
  104.49 +            var input = textareas[i];
  104.50 +            if (input.parentNode.dir == 'ltr') {
  104.51 +              // Assign a value whose first strong is RTL.
  104.52 +              input.value =
  104.53 +                  '!\u200F123\u200E@\n' +
  104.54 +                  '@\u200E123\u200F!\n' +
  104.55 +                  '!123\u200F\u200E@\n' +
  104.56 +                  '@123\u200E\u200F!\n';
  104.57 +            } else {
  104.58 +              // Assign a value whose first strong is LTR.
  104.59 +              input.value =
  104.60 +                  '@\u200E123\u200F!\n' +
  104.61 +                  '!\u200F123\u200E@\n' +
  104.62 +                  '@123\u200E\u200F!\n' +
  104.63 +                  '!123\u200F\u200E@\n';
  104.64 +            }
  104.65 +          }
  104.66 +        }
  104.67 +      </script>
  104.68 +      <div dir="ltr">
  104.69 +        <textarea rows="5" dir="auto">
  104.70 +&#x200E;
  104.71 +        </textarea>
  104.72 +      </div>
  104.73 +      <div dir="rtl">
  104.74 +        <textarea rows="5" dir="auto">
  104.75 +&#x200F;
  104.76 +        </textarea>
  104.77 +      </div>
  104.78 +    </div>
  104.79 +    <div class="ref">
  104.80 +      <div dir="ltr">
  104.81 +        <textarea rows="5" dir="rtl">
  104.82 +!123@
  104.83 +!123@
  104.84 +!123@
  104.85 +!123@
  104.86 +        </textarea>
  104.87 +      </div>
  104.88 +      <div dir="rtl">
  104.89 +        <textarea rows="5" dir="ltr">
  104.90 +@123!
  104.91 +@123!
  104.92 +@123!
  104.93 +@123!
  104.94 +        </textarea>
  104.95 +      </div>
  104.96 +    </div>
  104.97 +  </body>
  104.98 +</html>
Set up and maintained by W3C Systems Team, please report bugs to sysreq@w3.org.

W3C would like to thank Microsoft who donated the server that allows us to run this service.