Tests for bug 793233, r=roc
authorSimon Montagu <smontagu@smontagu.org>
Thu, 25 Oct 2012 01:36:37 -0700
changeset 111493 b339983c1dd50296951a30aebc0da95837d9c848
parent 111469 5374fb4806348de2a9ba4fef05518130e7d5d91f
child 111494 8a9563705dac716b29db9c7f5c0505f131a3a12f
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersroc
bugs793233
milestone19.0a1
Tests for bug 793233, r=roc
layout/reftests/bidi/712600-2-dyn.html
layout/reftests/bidi/779003-1-dynamic.html
layout/reftests/bidi/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bidi/712600-2-dyn.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html class="reftest-wait"><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+    <meta charset="utf-8">
+    <title>HTML Test: BDI: neutral when nested</title>
+    <link rel="reference" href="https://bug712600.bugzilla.mozilla.org/bdi-neutral-nested-ref.html">
+    <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com">
+    <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googlegroups.com">
+    <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-bdi-element">
+    <meta name="assert" content="
+      'For the purposes of applying the bidirectional algorithm to the paragraph-level
+      container that a bdi element finds itself within, the bdi element must be treated
+      like a U+FFFC OBJECT REPLACEMENT CHARACTER.'">
+    <style>
+      body{
+        font-size:2em;
+      }
+    </style>
+  </head>
+  <body>
+    <!-- Key to entities used below:
+      &#x05D0; ... &#x05D5; - The first six Hebrew letters (strongly RTL).
+      &#x202D; - The LRO (left-to-right-override) formatting character.
+      &#x202C; - The PDF (pop directional formatting) formatting character; closes LRO. -->
+
+      <div dir="ltr">א + <bdi>[a + <bdi>[ב + <bdi>[b + 4]</bdi> + 3]</bdi> + 2]</bdi> + 1</div>
+      <div dir="ltr">א + <bdi dir="rtl">[a + <bdi dir="ltr">[ב + <bdi dir="rtl">[b + 4]</bdi> + 3]</bdi> + 2]</bdi> + 1</div>
+      <div dir="ltr">א + <bdi dir="ltr">[<span id='delete1'>z +</span>a + <bdi dir="rtl">[ב + <bdi dir="ltr">[b + 4]</bdi> + 3]</bdi> + 2]</bdi> + 1</div>
+      <div dir="rtl">a + <bdi>[א + <bdi>[b + <bdi>[ב + 3]</bdi> + 2]</bdi> + 1]</bdi> + 0</div>
+      <div dir="rtl">a + <bdi dir="ltr">[א + <bdi dir="rtl">[b + <bdi dir="ltr">[ב + 3]</bdi> + 2]</bdi> + 1]</bdi> + 0</div>
+      <div dir="rtl">a + <bdi dir="rtl">[א + <bdi dir="ltr">[<span
+      id='delete2'>z + </span>b + <bdi dir="rtl">[ב + 3]</bdi> + 2]</bdi> + 1]</bdi> + 0</div>
+
+      <script type="text/javascript">
+	function deleteSpans() {
+	    var n = document.getElementById('delete1');
+	    var n2 = document.getElementById('delete2');
+	    n.parentNode.removeChild(n);
+	    n2.parentNode.removeChild(n2);
+            document.documentElement.removeAttribute("class");
+        }
+        document.addEventListener("MozReftestInvalidate", deleteSpans, false);
+      </script>
+
+</body></html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bidi/779003-1-dynamic.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+   <style type="text/css">
+#searchPaginationFooter {
+  direction: rtl;
+}
+
+.backLink {
+  display: inline;
+}
+
+.nextLink {
+  display: inline;
+}
+
+.pagination,
+.pagination li {
+  display: inline;
+}
+   </style>
+ </head>
+ <body>
+   <div>
+     <div id="searchPaginationFooter">
+       <p class="backLink"> &lt; <span class="gray">السابق</span></p>
+       <ul class="pagination">
+	 <li><span class="select">1</span></li>
+	 <li><a href="#page=2">2</a></li>
+	 <li><a href="#page=3">3</a></li>
+	 <li><a href="#page=4">4</a></li>
+	 <li><a href="#page=5">5</a></li>
+	 <li><a href="#page=6">6</a></li>
+	 <li><a href="#page=7">7</a></li>
+	 <li><a href="#page=8">8</a></li>
+	 <li id="here"><a href="#page=9">9</a></li>
+	 <li>...</li>
+	 <li><a href="#page=325">325</a></li>
+       </ul>
+       <p class="nextLink"><a href="#page=2">التالي</a> &gt; </p>
+     </div>
+   </div>
+<script type="text/javascript">
+function removePage() {
+  var here = document.getElementById("here");
+  here.parentNode.removeChild(here);
+  document.documentElement.removeAttribute("class");
+}
+document.addEventListener("MozReftestInvalidate", removePage, false);
+</script>
+ </body>
+</html>
--- a/layout/reftests/bidi/reftest.list
+++ b/layout/reftests/bidi/reftest.list
@@ -104,24 +104,25 @@ fuzzy-if(Android,24,1) fails-if(/^Window
 == 613157-1.html 613157-1-ref.html
 fails-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia) == 613157-2.html 613157-2-ref.html # bug 696673
 == 662288-1.html 662288-1-ref.html
 == 670226-1.html 670226-1-ref.html
 == 676245-1.html 676245-1-ref.html
 == 698291-1.html 698291-1-ref.html
 == 698706-1.html 698706-1-ref.html
 == 704837-1.html 704837-1-ref.html
+== 712600-1.html 712600-1-ref.html
+== 712600-2.html 712600-2-ref.html
+== 712600-2-dyn.html 712600-2-ref.html
+== 712600-3.html 712600-3-ref.html
 == 718236-1.html 718236-1-ref.html
 == 718236-2.html 718236-2-ref.html
 == 718236-3.html 718236-3-ref.html
 == 726420-1.html 726420-1-ref.html
 == 726460-1.html 726460-1-ref.html
 == 729047-1.html 729047-1-ref.html
 == 730562-1.html 730562-1-ref.html
 == 746987-1.html 746987-1-ref.html
 == 746987-2.html 746987-2-ref.html
 == 746987-3.html 746987-3-ref.html
 == 746987-4.html 746987-4-ref.html
-# See bug 793233
-random == 779003-1.html 779003-1-ref.html
-random == 712600-1.html 712600-1-ref.html
-random == 712600-2.html 712600-2-ref.html
-random == 712600-3.html 712600-3-ref.html
+== 779003-1.html 779003-1-ref.html
+== 779003-1-dynamic.html 779003-1-ref.html