Bug 1039017 - Reftests for ruby whitespace handling. r=dholbert
authorSusanna Bowen <sgbowen8@gmail.com>
Fri, 15 Aug 2014 10:34:20 -0700
changeset 221425 b2e1f5bb5e0714d7ca65aa5662ed5c3a09a7919c
parent 221424 6978c9d538d4a41ea385cc1ac3abb08a87605195
child 221426 c405cb65f37be213926696a971f51af9e8b4737f
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1039017
milestone34.0a1
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
Bug 1039017 - Reftests for ruby whitespace handling. r=dholbert
layout/reftests/css-ruby/reftest.list
layout/reftests/css-ruby/ruby-whitespace-1-ref.html
layout/reftests/css-ruby/ruby-whitespace-1.html
layout/reftests/css-ruby/ruby-whitespace-2-ref.html
layout/reftests/css-ruby/ruby-whitespace-2.html
layout/reftests/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/reftest.list
@@ -0,0 +1,4 @@
+default-preferences pref(layout.css.ruby.enabled,true)
+
+asserts(1) == ruby-whitespace-1.html ruby-whitespace-1-ref.html # bug 1052145
+== ruby-whitespace-2.html ruby-whitespace-2-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/ruby-whitespace-1-ref.html
@@ -0,0 +1,35 @@
+<html>
+<meta charset="UTF-8">
+<head>
+<style>
+ruby { display: ruby; }
+rb   { display: ruby-base; white-space: nowrap; }
+rp   { display: none; }
+rt   { display: ruby-text; white-space: nowrap; font-size: 50%; }
+rbc  { display: ruby-base-container; }
+rtc  { display: ruby-text-container; }
+ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }
+</style>
+</head>
+<body>
+
+<!-- It's unclear what should happen to the whitespace between the </rtc> and
+     the <rbc>. A literal application of the spec suggests: it gets converted to
+     its own ruby segment, since it is "inter-segment" white space. But then
+     it's a segment containing only trailing whitespace, which gets removed.
+     This results in an empty segment with no whitespace, which doesn't seem
+     correct. //-->
+<ruby><rbc><rb><span>   </span></rb><rb><span>    </span></rb><rb
+  >Base three</rb></rbc><rtc><rt></rt><rt>Text two</rt></rtc><rtc
+  ><rt></rt></rtc><rbc><span>        </span></rbc><rbc><rb
+  >Segment two</rb></rbc><rtc><rt></rt></rtc></ruby>
+
+<ruby><rbc><rb><span>  </span></rb>Base two<rb><span>    </span></rb><rb></rb
+  ></rbc><rtc><rt><span>  </span></rt>Text two<rt><span>     </span></rt><rt
+  ></rt></rtc></ruby>
+
+<ruby><rbc><rb><span>   </span></rb><rb>Base two</rb></rbc><rtc><rt> </rt></rtc
+  ></ruby>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/ruby-whitespace-1.html
@@ -0,0 +1,28 @@
+<html>
+<meta charset="UTF-8">
+<head>
+<style>
+ruby { display: ruby; }
+rb   { display: ruby-base; white-space: nowrap; }
+rp   { display: none; }
+rt   { display: ruby-text; white-space: nowrap; font-size: 50%; }
+rbc  { display: ruby-base-container; }
+rtc  { display: ruby-text-container; }
+ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }
+</style>
+</head>
+<body>
+
+<ruby>
+  <rbc>       <rb>   </rb>    <rb>Base three</rb>   </rbc> 
+      <rtc>    <rt>   </rt>   <rt>Text two</rt>   </rtc>    <rtc><rt></rt></rtc>
+        <rbc><rb>Segment two</rb></rbc><rtc><rt></rt></rtc>
+</ruby>
+
+<rbc>   <rb>  </rb>    <rb>Base two</rb>  </rbc>   <rtc><rt>  </rt>     <rt
+  >Text two</rt></rtc>
+
+<rb></rb>   <rb>Base two</rb>   <rt> </rt>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/ruby-whitespace-2-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<meta charset="UTF-8">
+<head>
+<style>
+ruby { display: ruby; }
+rb   { display: ruby-base; white-space: nowrap; }
+rp   { display: none; }
+rt   { display: ruby-text; white-space: nowrap; font-size: 50%; }
+rbc  { display: ruby-base-container; }
+rtc  { display: ruby-text-container; }
+ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }
+</style>
+</head>
+
+<body>
+
+<!-- Unclear how this should render. See http://lists.w3.org/Archives/Public/www-style/2014Jul/0620.html //-->
+abcd<ruby><rbc><rb><span> BASE</span></rb></rbc><rtc><rt>TEXT</rt></rtc></ruby>
+
+abcd<ruby><rbc><rb><span>BASE</span></rb></rbc><rtc><rt>TEXT</rt></rtc></ruby>
+
+abcd<ruby><rbc><rb><span> BASE</span></rb></rbc><rtc><rt>TEXT</rt></rtc></ruby>
+
+<ruby><rbc></rbc></ruby>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/ruby-whitespace-2.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<meta charset="UTF-8">
+<head>
+<style>
+ruby { display: ruby; }
+rb   { display: ruby-base; white-space: nowrap; }
+rp   { display: none; }
+rt   { display: ruby-text; white-space: nowrap; font-size: 50%; }
+rbc  { display: ruby-base-container; }
+rtc  { display: ruby-text-container; }
+ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }
+</style>
+</head>
+
+<body>
+
+abcd<rbc> BASE</rbc><rt>TEXT</rt>
+
+abcd<rbc> <span>BASE</span></rbc><rt>TEXT</rt>
+
+abcd<rbc><span> BASE</span></rbc><rt>TEXT</rt>
+
+<rbc> </rbc>
+
+</body>
+</html>
--- a/layout/reftests/reftest.list
+++ b/layout/reftests/reftest.list
@@ -85,16 +85,19 @@ include css-gradients/reftest.list
 include css-mediaqueries/reftest.list
 
 # css parsing
 include css-parsing/reftest.list
 
 # css placeholder
 include css-placeholder/reftest.list
 
+# css ruby
+include css-ruby/reftest.list
+
 # css required
 include css-required/reftest.list
 
 # css optional
 include css-optional/reftest.list
 
 # css valid
 include css-valid/reftest.list