Tests for bug 83958, originally by David Baron
authorSimon Montagu <smontagu@smontagu.org>
Mon, 11 Apr 2011 10:59:29 +0300
changeset 67827 23b93110ab641a6cbc8f735869ac44a721321515
parent 67826 f79edc2f8714d33d5855509df40f1f67266f29d5
child 67828 e6e29229954b5c7761af32e43d0e47218df3502d
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs83958
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Tests for bug 83958, originally by David Baron
layout/reftests/bidi/83958-1-ref.html
layout/reftests/bidi/83958-1a.html
layout/reftests/bidi/83958-1b.html
layout/reftests/bidi/83958-1c.html
layout/reftests/bidi/83958-2-ref.html
layout/reftests/bidi/83958-2a.html
layout/reftests/bidi/83958-2b.html
layout/reftests/bidi/83958-2c.html
layout/reftests/bidi/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bidi/83958-1-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+  <meta charset="UTF-8">
+  <title>Bidirectional Text Test 2</title>
+  <style>
+   p { font-family: monospace; }
+  </style>
+ </head>
+ <body>
+  <p>The following lines should all read "ABCDEFGHI":</p>
+  <p>ABCDEFGHI</p>
+  <p>ABCDEFGHI</p>
+  <p>ABCDEFGHI</p>
+  <p>ABCDEFGHI</p>
+  <p>ABCDEFGHI</p>
+  <p>ABCDEFGHI</p>
+  <p>ABCDEFGHI</p>
+  <p>ABCDEFGHI</p>
+  <p>ABCDEFGHI</p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bidi/83958-1a.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+  <meta charset="UTF-8">
+  <title>Bidirectional Text Test 2 - Formatting Characters</title>
+  <style>
+   p { font-family: monospace; text-align: left; }
+  </style>
+ </head>
+<!-- Testcases based on http://dbaron.org/css/test/bidi2_charcode by L. David Baron. -->
+ <body>
+  <p>The following lines should all read "ABCDEFGHI":</p>
+  <p>ABCDEFGHI</p>
+  <p dir="rtl">&#x202b;ABCDEFGHI&#x202c;</p>
+  <p dir="rtl">&#x202b;ABC<span>DEF</span>GHI&#x202c;</p>
+  <p dir="rtl">&#x202e;IHGFEDCBA&#x202c;</p>
+  <p dir="rtl">&#x202e;IHG<span>FED</span>CBA&#x202c;</p>
+  <p dir="rtl">&#x202e;IHG&#x202b;DEF&#x202c;CBA&#x202c;</p>
+  <p dir="rtl">&#x202e;IHG&#x202e;FED&#x202c;CBA&#x202c;</p>
+  <p dir="rtl">&#x202e;IHG&#x202e;FED&#x202c;CBA&#x202c;</p>
+  <p dir="rtl">&#x202e;IHG&#x202d;DEF&#x202c;CBA&#x202c;</p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bidi/83958-1b.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+  <meta charset="UTF-8">
+  <title>Bidirectional Text Test 2 - CSS</title>
+  <style>
+   p { font-family: monospace; text-align: left; }
+.rtl { direction: rtl; }
+.ltr { direction: ltr; }
+.rle { direction: rtl; unicode-bidi: embed; }
+.lre { direction: ltr; unicode-bidi: embed; }
+.rlo { direction: rtl; unicode-bidi: bidi-override; }
+.lro { direction: ltr; unicode-bidi: bidi-override; }
+.embed { unicode-bidi: embed; }
+.override { unicode-bidi: bidi-override; }
+  </style>
+ </head>
+<!-- Testcases based on http://dbaron.org/css/test/bidi2 by L. David Baron. -->
+ <body>
+  <p>The following lines should all read "ABCDEFGHI":</p>
+  <p>ABCDEFGHI</p>
+  <p class="rtl">ABCDEFGHI</p>
+  <p class="rtl">ABC<span>DEF</span>GHI</p>
+  <p class="rlo">IHGFEDCBA</p>
+  <p class="rlo">IHG<span>FED</span>CBA</p>
+  <p class="rlo">IHG<span class="embed">DEF</span>CBA</p>
+  <p class="rlo">IHG<span class="override">FED</span>CBA</p>
+  <p class="rlo">IHG<span style="unicode-bidi: inherit">FED</span>CBA</p>
+  <p class="rlo">IHG<span class="lro">DEF</span>CBA</p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bidi/83958-1c.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+  <meta charset="UTF-8">
+  <title>Bidirectional Text Test 2 - HTML</title>
+  <style>
+   p { font-family: monospace; text-align: left; }
+.rtl { direction: rtl; }
+.ltr { direction: ltr; }
+.rle { direction: rtl; unicode-bidi: embed; }
+.lre { direction: ltr; unicode-bidi: embed; }
+.rlo { direction: rtl; unicode-bidi: bidi-override;}
+.lro { direction: ltr; unicode-bidi: bidi-override; }
+.embed { unicode-bidi: embed; }
+.override { unicode-bidi: bidi-override; }
+  </style>
+ </head>
+<!-- Testcases based on http://dbaron.org/css/test/bidi2_html by L. David Baron. -->
+ <body>
+  <p>The following lines should all read "ABCDEFGHI":</p>
+  <p>ABCDEFGHI</p>
+  <p class="rtl">ABCDEFGHI</p>
+  <p class="rtl">ABC<span>DEF</span>GHI</p>
+  <p class="rlo">IHGFEDCBA</p>
+  <p class="rlo">IHG<span>FED</span>CBA</p>
+  <p class="rlo">IHG<span dir="rtl">DEF</span>CBA</p>
+  <p class="rlo">IHG<bdo dir="rtl">FED</bdo>CBA</p>
+  <p class="rlo">IHG<span style="unicode-bidi: inherit">FED</span>CBA</p>
+  <p class="rlo">IHG<bdo dir="ltr">DEF</bdo>CBA</p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bidi/83958-2-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+ <head>
+  <meta charset="UTF-8">
+  <title>Bidirectional Text Test 2</title>
+  <style>
+   p { font-family: monospace; direction: ltr; unicode-bidi: bidi-override;}
+  </style>
+ </head>
+ <body>
+  <p>&#x05D2;&#x05D1;&#x05D0;</p>
+  <p>&#x05D2;&#x05D1;&#x05D0;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2;</p>
+  <p>&#x05D2;&#x05D1;&#x05D0;&nbsp;ABC&nbsp;&#x05D5;&#x05D4;&#x05D3;</p>
+  <p>&#x05D5;&#x05D4;&#x05D3;&nbsp;ABC&nbsp;&#x05D2;&#x05D1;&#x05D0;</p>
+  <p>&#x05D2;&#x05D1;&#x05D0;&nbsp;ABC&nbsp;&#x05D5;&#x05D4;&#x05D3;&nbsp;DEF&nbsp;&#x05D8;&#x05D7;&#x05D6;</p>
+  <p>&#x05D2;&#x05D1;&#x05D0;&nbsp;ABC&nbsp;&#x05D5;&#x05D4;&#x05D3;&nbsp;DEF&nbsp;&#x05D8;&#x05D7;&#x05D6;</p>
+  <p>&#x05D2;&#x05D1;&#x05D0;&nbsp;ABC&nbsp;&#x05D5;&#x05D4;&#x05D3;&nbsp;DEF&nbsp;&#x05D8;&#x05D7;&#x05D6;</p>
+  <p>&#x05D8;&#x05D7;&#x05D6;&nbsp;DEF&nbsp;&#x05D5;&#x05D4;&#x05D3;&nbsp;ABC&nbsp;&#x05D2;&#x05D1;&#x05D0;</p>
+  <p>&#x05D5;&#x05D4;&#x05D3;&nbsp;ABC&nbsp;&#x05D2;&#x05D1;&#x05D0;&nbsp;DEF&nbsp;&#x05D8;&#x05D7;&#x05D6;</p>
+  <p>&#x05D5;&#x05D4;&#x05D3;&nbsp;CBA&nbsp;&#x05D2;&#x05D1;&#x05D0;&nbsp;DEF&nbsp;&#x05D8;&#x05D7;&#x05D6;</p>
+  <p>&#x05D2;&#x05D1;&#x05D0;&nbsp;ABC&nbsp;&#x05D3;&#x05D4;&#x05D5;&nbsp;DEF&nbsp;&#x05D8;&#x05D7;&#x05D6;</p>
+  <p>&#x05D8;&#x05D7;&#x05D6;&nbsp;ABC&nbsp;&#x05D3;&#x05D4;&#x05D5;&nbsp;DEF&nbsp;&#x05D2;&#x05D1;&#x05D0;</p>
+  <p>&#x05D2;&#x05D1;&#x05D0;&nbsp;ABC&nbsp;&#x05D5;&#x05D4;&#x05D3;&nbsp;DEF&nbsp;GHI&nbsp;&#x05D8;&#x05D7;&#x05D6;</p>
+  <p>FED&nbsp;&#x05D5;&#x05D4;&#x05D3;&nbsp;CBA&nbsp;&#x05D2;&#x05D1;&#x05D0;&nbsp;GHI&nbsp;&#x05D8;&#x05D7;&#x05D6;</p>
+  <p>&#x05D2;&#x05D1;&#x05D0;&nbsp;ABC&nbsp;FED&nbsp;&#x05D5;&#x05D4;&#x05D3;&nbspGHI&nbsp;&#x05D8;&#x05D7;&#x05D6;</p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bidi/83958-2a.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+  <meta charset="UTF-8">
+  <title>Bidirectional Text Test 2 - Formatting Characters</title>
+  <style>
+   p { font-family: monospace; text-align: left; }
+  </style>
+ </head>
+<!-- Testcases based on http://dbaron.org/css/test/bidi2_charcode by L. David Baron. -->
+ <body>
+  <p>&#x05D0;&#x05D1;&#x05D2;</p>
+  <p>&#x202a;&#x05D0;&#x05D1;&#x05D2;&#x202c;</p>
+  <p>&#x202d;&#x05D0;&#x05D1;&#x05D2;&#x202c;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; ABC &#x05D3;&#x05D4;&#x05D5;</p>
+  <p dir="rtl">&#x05D0;&#x05D1;&#x05D2; ABC &#x05D3;&#x05D4;&#x05D5;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; ABC &#x05D3;&#x05D4;&#x05D5; DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <span>ABC &#x05D3;&#x05D4;&#x05D5;</span> DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; &#x202a;ABC &#x05D3;&#x05D4;&#x05D5; DEF&#x202c; &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; &#x202b;ABC &#x05D3;&#x05D4;&#x05D5; DEF&#x202c; &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; &#x202b;ABC &#x05D3;&#x05D4;&#x05D5;&#x202c; DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; &#x202e;ABC &#x05D3;&#x05D4;&#x05D5;&#x202c; DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; &#x202d;ABC &#x05D3;&#x05D4;&#x05D5;&#x202c; DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p dir="rtl">&#x05D0;&#x05D1;&#x05D2; &#x202d;ABC &#x05D3;&#x05D4;&#x05D5;&#x202c; DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; ABC &#x05D3;&#x05D4;&#x05D5; DEF GHI &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; &#x202e;ABC &#x05D3;&#x05D4;&#x05D5; DEF&#x202c; GHI &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; ABC &#x202e;&#x05D3;&#x05D4;&#x05D5; DEF&#x202c; GHI &#x05D6;&#x05D7;&#x05D8;</p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bidi/83958-2b.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+  <meta charset="UTF-8">
+  <title>Bidirectional Text Test 2 - CSS</title>
+  <style>
+p { font-family: monospace; text-align: left; }
+.embed { unicode-bidi: embed; }
+.override { unicode-bidi: bidi-override; }
+.rtl { direction: rtl; }
+.ltr { direction: ltr; }
+  </style>
+ </head>
+<!-- Testcases based on http://dbaron.org/css/test/bidi2 by L. David Baron. -->
+ <body>
+  <p>&#x05D0;&#x05D1;&#x05D2;</p>
+  <p class="embed">&#x05D0;&#x05D1;&#x05D2;</p>
+  <p class="override">&#x05D0;&#x05D1;&#x05D2;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; ABC &#x05D3;&#x05D4;&#x05D5;</p>
+  <p class="rtl">&#x05D0;&#x05D1;&#x05D2; ABC &#x05D3;&#x05D4;&#x05D5;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; ABC &#x05D3;&#x05D4;&#x05D5; DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <span>ABC &#x05D3;&#x05D4;&#x05D5;</span> DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <span class="ltr embed">ABC &#x05D3;&#x05D4;&#x05D5; DEF</span> &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <span class="rtl embed">ABC &#x05D3;&#x05D4;&#x05D5; DEF</span> &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <span class="rtl embed">ABC &#x05D3;&#x05D4;&#x05D5;</span> DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <span class="rtl override">ABC &#x05D3;&#x05D4;&#x05D5;</span> DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <span class="ltr override">ABC &#x05D3;&#x05D4;&#x05D5;</span> DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p class="rtl">&#x05D0;&#x05D1;&#x05D2; <span class="ltr override">ABC &#x05D3;&#x05D4;&#x05D5;</span> DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; ABC &#x05D3;&#x05D4;&#x05D5; DEF GHI &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <span class="rtl override">ABC &#x05D3;&#x05D4;&#x05D5; DEF</span> GHI &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; ABC <span class="rtl override">&#x05D3;&#x05D4;&#x05D5; DEF</span> GHI &#x05D6;&#x05D7;&#x05D8;</p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bidi/83958-2c.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <head>
+  <meta charset="UTF-8">
+  <title>Bidirectional Text Test 2 - HTML</title>
+  <style>
+p { font-family: monospace; text-align: left; }
+.embed { unicode-bidi: embed; }
+.override { unicode-bidi: bidi-override; }
+.rtl { direction: rtl; }
+.ltr { direction: ltr; }
+  </style>
+ </head>
+<!-- Testcases based on http://dbaron.org/css/test/bidi2_html by L. David Baron. -->
+ <body>
+  <p>&#x05D0;&#x05D1;&#x05D2;</p>
+  <p class="embed">&#x05D0;&#x05D1;&#x05D2;</p>
+  <p class="override">&#x05D0;&#x05D1;&#x05D2;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; ABC &#x05D3;&#x05D4;&#x05D5;</p>
+  <p class="rtl">&#x05D0;&#x05D1;&#x05D2; ABC &#x05D3;&#x05D4;&#x05D5;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; ABC &#x05D3;&#x05D4;&#x05D5; DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <span>ABC &#x05D3;&#x05D4;&#x05D5;</span> DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <span dir="ltr">ABC &#x05D3;&#x05D4;&#x05D5; DEF</span> &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <span dir="rtl">ABC &#x05D3;&#x05D4;&#x05D5; DEF</span> &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <span dir="rtl">ABC &#x05D3;&#x05D4;&#x05D5;</span> DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <bdo dir="rtl">ABC &#x05D3;&#x05D4;&#x05D5;</bdo> DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <bdo dir="ltr">ABC &#x05D3;&#x05D4;&#x05D5;</bdo> DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p class="rtl">&#x05D0;&#x05D1;&#x05D2; <bdo dir="ltr">ABC &#x05D3;&#x05D4;&#x05D5;</bdo> DEF &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; ABC &#x05D3;&#x05D4;&#x05D5; DEF GHI &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; <bdo dir="rtl">ABC &#x05D3;&#x05D4;&#x05D5; DEF</bdo> GHI &#x05D6;&#x05D7;&#x05D8;</p>
+  <p>&#x05D0;&#x05D1;&#x05D2; ABC <bdo dir="rtl">&#x05D3;&#x05D4;&#x05D5; DEF</bdo> GHI &#x05D6;&#x05D7;&#x05D8;</p>
+ </body>
+</html>
--- a/layout/reftests/bidi/reftest.list
+++ b/layout/reftests/bidi/reftest.list
@@ -28,16 +28,22 @@ random-if(cocoaWidget) == mirroring-02.h
 == mixedChartype-02.html mixedChartype-02-ref.html
 == mixedChartype-02-j.html mixedChartype-02-ref.html
 == mixedChartype-03.html mixedChartype-03-ref.html
 == mixedChartype-03-j.html mixedChartype-03-ref.html
 == with-first-letter-1a.html with-first-letter-1-ref.html
 == with-first-letter-1b.html with-first-letter-1-ref.html
 == with-first-letter-2a.html with-first-letter-2-ref.html
 == with-first-letter-2b.html with-first-letter-2-ref.html
+== 83958-1a.html 83958-1-ref.html
+== 83958-1b.html 83958-1-ref.html
+== 83958-1c.html 83958-1-ref.html
+== 83958-2a.html 83958-2-ref.html
+== 83958-2b.html 83958-2-ref.html
+== 83958-2c.html 83958-2-ref.html
 == 115921-1.html 115921-1-ref.html
 == 115921-2.html 115921-2-ref.html
 == 258928-1.html 258928-1-ref.html
 random-if(winWidget) == 267459-1.html 267459-1-ref.html # depends on windows version, see bug 590101
 == 267459-2.html 267459-2-ref.html
 == 299065-1.html 299065-1-ref.html
 random-if(winWidget) == 305643-1.html 305643-1-ref.html # depends on windows version, see bug 590101
 == 332655-1.html 332655-1-ref.html