summaryrefslogtreecommitdiffstats
path: root/layout/reftests/w3c-css/submitted/text3/text-word-spacing-001.html
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/w3c-css/submitted/text3/text-word-spacing-001.html')
-rw-r--r--layout/reftests/w3c-css/submitted/text3/text-word-spacing-001.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/layout/reftests/w3c-css/submitted/text3/text-word-spacing-001.html b/layout/reftests/w3c-css/submitted/text3/text-word-spacing-001.html
new file mode 100644
index 000000000..a9bcfd93b
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text3/text-word-spacing-001.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>CSS Text Test: Word Spacing</title>
+<link rel="author" title="Nicholas Nethercote" href="mailto:nnethercote@mozilla.com">
+<link rel="help" href="http://www.w3.org/TR/css-text-3/#word-spacing">
+<link rel="stylesheet" type="text/css" href="support/ahem.css" />
+<link rel="match" href="text-word-spacing-ref.html">
+<meta name="flags" content="ahem">
+<meta name="assert" content="Test checks that word-spacing works with percentages.">
+<style>
+@font-face {
+ font-family: Ahem;
+ src: url(support/Ahem.ttf);
+}
+/* We use Ahem to avoid very minor differences between the test and the
+ reference that occur with certain font+platform combinations. */
+div { font-family: Ahem; font-size: 20px; }
+div.wsn100 { word-spacing: -100%; }
+div.wsn40 { word-spacing: -40%; }
+div.ws0 { word-spacing: 0%; }
+div.ws25 { word-spacing: calc(25% + 0px); }
+div.ws100 { word-spacing: 100%; }
+div.ws300 { word-spacing: calc(100% + 6em + 50%*4 - 12em/2); }
+div.ws400p1 { word-spacing: calc(400% + 1em); }
+</style>
+<body>
+ <p>Test passes if the space between the words starts at zero and increases by
+ one on each subsequent line.</p>
+ <div class="wsn100" >A Bc Def Ghij</div>
+ <div class="ws0" >A Bc Def Ghij</div>
+ <div class="ws100" >A Bc Def Ghij</div>
+ <div class="wsn40" >A &nbsp;&nbsp;&nbsp;&nbsp;Bc &nbsp;&nbsp;&nbsp;&nbsp;Def &nbsp;&nbsp;&nbsp;&nbsp;Ghij</div>
+ <div class="ws300" >A Bc Def Ghij</div>
+ <div class="ws25" >A &nbsp;&nbsp;&nbsp;Bc &nbsp;&nbsp;&nbsp;Def &nbsp;&nbsp;&nbsp;Ghij</div>
+ <div class="ws400p1">A Bc Def Ghij</div>
+</body>