Bug 1316482 - add reftests part 1. draft
authorJeremy Chen <jeremychen@mozilla.com>
Thu, 12 Jan 2017 00:39:46 +0800
changeset 459263 36324d8be0507dac19ecf861bb0cc8ec757d4885
parent 459262 02021b59d2c18489cfda92f868c82f4b730cea55
child 459264 c3db30c19b5d37e394f3a07aabb8fd8204df72cf
push id41162
push userjichen@mozilla.com
push dateWed, 11 Jan 2017 16:40:21 +0000
bugs1316482
milestone53.0a1
Bug 1316482 - add reftests part 1. These tests are for testing different sequence of segment break(s) / white spaces / zero-width spaces between two CJK strings. MozReview-Commit-ID: C1sCgrynu5f
layout/reftests/w3c-css/submitted/text3/reftest.list
layout/reftests/w3c-css/submitted/text3/segment-break-transformation-removable-1.html
layout/reftests/w3c-css/submitted/text3/segment-break-transformation-removable-2.html
layout/reftests/w3c-css/submitted/text3/segment-break-transformation-removable-3.html
layout/reftests/w3c-css/submitted/text3/segment-break-transformation-removable-4.html
layout/reftests/w3c-css/submitted/text3/segment-break-transformation-removable-ref.html
layout/reftests/w3c-css/submitted/text3/segment-break-transformation-unremovable-1.html
layout/reftests/w3c-css/submitted/text3/segment-break-transformation-unremovable-2.html
layout/reftests/w3c-css/submitted/text3/segment-break-transformation-unremovable-3.html
layout/reftests/w3c-css/submitted/text3/segment-break-transformation-unremovable-4.html
layout/reftests/w3c-css/submitted/text3/segment-break-transformation-unremovable-ref.html
--- a/layout/reftests/w3c-css/submitted/text3/reftest.list
+++ b/layout/reftests/w3c-css/submitted/text3/reftest.list
@@ -1,8 +1,17 @@
 == text-align-match-parent-01.html text-align-match-parent-ref.html
 == text-align-match-parent-02.html text-align-match-parent-ref.html
 == text-align-match-parent-03.html text-align-match-parent-ref.html
 == text-align-match-parent-04.html text-align-match-parent-ref.html
 == text-align-match-parent-root-ltr.html text-align-match-parent-root-ltr-ref.html
 == text-align-match-parent-root-rtl.html text-align-match-parent-root-rtl-ref.html
 
 == text-word-spacing-001.html text-word-spacing-ref.html
+
+== segment-break-transformation-removable-1.html segment-break-transformation-removable-ref.html
+== segment-break-transformation-removable-2.html segment-break-transformation-removable-ref.html
+== segment-break-transformation-removable-3.html segment-break-transformation-removable-ref.html
+== segment-break-transformation-removable-4.html segment-break-transformation-removable-ref.html
+== segment-break-transformation-unremovable-1.html segment-break-transformation-unremovable-ref.html
+== segment-break-transformation-unremovable-2.html segment-break-transformation-unremovable-ref.html
+== segment-break-transformation-unremovable-3.html segment-break-transformation-unremovable-ref.html
+== segment-break-transformation-unremovable-4.html segment-break-transformation-unremovable-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text3/segment-break-transformation-removable-1.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Text 4.1.2. Segment Break Transformation Rules</title>
+<link rel="author" title="Chun-Min (Jeremy) Chen" href="mailto:jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform">
+<link rel="stylesheet" type="text/css" href="support/ahem.css">
+<link rel="match" href="segment-break-transformation-removable-ref.html">
+<meta name="assert" content="Test checks that a collapsible segment break should be removed correctly,
+if the character immediately before/after the segment break is the zero-width space character (U+200B),
+or both the character before/after the segment break is F, W, or H (not A), and neither side is Hangul.">
+<style> p { line-height: 1; font-family: ahem; } </style>
+</head>
+<body>
+<div>Test passes if there is <b>no</b> white space between 2nd and 3rd CJK character.
+<!--Some[LF]Chinese-->
+<p>&#x4e00;&#x4e9b;&#x000a;&#x4e2d;&#x6587;</p>
+<!--Some[ZWSP][LF]Chinese-->
+<p>&#x4e00;&#x4e9b;&#x200b;&#x000a;&#x4e2d;&#x6587;</p>
+<!--Some[LF][ZWSP]Chinese-->
+<p>&#x4e00;&#x4e9b;&#x000a;&#x200b;&#x4e2d;&#x6587;</p>
+<!--Some[ZWSP][LF]Hangul-->
+<p>&#x4e00;&#x4e9b;&#x200b;&#x000a;&#xc5b8;&#xbb38;</p>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text3/segment-break-transformation-removable-2.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Text 4.1.2. Segment Break Transformation Rules</title>
+<link rel="author" title="Chun-Min (Jeremy) Chen" href="mailto:jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform">
+<link rel="stylesheet" type="text/css" href="support/ahem.css">
+<link rel="match" href="segment-break-transformation-removable-ref.html">
+<meta name="assert" content="Test checks that multiple segment breaks should be removed correctly,
+if the character immediately before/after the segment breaks is the zero-width space character (U+200B),
+or both the character before/after the segment breaks is F, W, or H (not A), and neither side is Hangul.">
+<style> p { line-height: 1; font-family: ahem; } </style>
+</head>
+<body>
+<div>Test passes if there is <b>no</b> white space between 2nd and 3rd CJK character.
+<!--Some[LF][LF][LF]Chinese-->
+<p>&#x4e00;&#x4e9b;&#x000a;&#x000a;&#x000a;&#x4e2d;&#x6587;</p>
+<!--Some[ZWSP][LF][LF][LF]Chinese-->
+<p>&#x4e00;&#x4e9b;&#x200b;&#x000a;&#x000a;&#x000a;&#x4e2d;&#x6587;</p>
+<!--Some[LF][LF][LF][ZWSP]Chinese-->
+<p>&#x4e00;&#x4e9b;&#x000a;&#x000a;&#x000a;&#x200b;&#x4e2d;&#x6587;</p>
+<!--Some[ZWSP][LF][LF][LF]Hangul-->
+<p>&#x4e00;&#x4e9b;&#x200b;&#x000a;&#x000a;&#x000a;&#xc5b8;&#xbb38;</p>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text3/segment-break-transformation-removable-3.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Text 4.1.2. Segment Break Transformation Rules</title>
+<link rel="author" title="Chun-Min (Jeremy) Chen" href="mailto:jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform">
+<link rel="stylesheet" type="text/css" href="support/ahem.css">
+<link rel="match" href="segment-break-transformation-removable-ref.html">
+<meta name="assert" content="Test checks that a sequence which consists of a collapsible segment break
+surrounded by multiple white spaces should be removed correctly,
+if the character immediately before/after the sequence is the zero-width space character (U+200B),
+or both the character before/after the sequence is F, W, or H (not A), and neither side is Hangul.">
+<style> p { line-height: 1; font-family: ahem; } </style>
+</head>
+<body>
+<div>Test passes if there is <b>no</b> white space between 2nd and 3rd CJK character.
+<!--Some[WS][WS][LF][WS][WS]Chinese-->
+<p>&#x4e00;&#x4e9b;&#x0020;&#x0020;&#x000a;&#x0020;&#x0020;&#x4e2d;&#x6587;</p>
+<!--Some[ZWSP][WS][WS][LF][WS][WS]Chinese-->
+<p>&#x4e00;&#x4e9b;&#x200b;&#x0020;&#x0020;&#x000a;&#x0020;&#x0020;&#x4e2d;&#x6587;</p>
+<!--Some[WS][WS][LF][WS][WS][ZWSP]Chinese-->
+<p>&#x4e00;&#x4e9b;&#x0020;&#x0020;&#x000a;&#x0020;&#x0020;&#x200b;&#x4e2d;&#x6587;</p>
+<!--Some[ZWSP][WS][WS][LF][WS][WS]Hangul-->
+<p>&#x4e00;&#x4e9b;&#x200b;&#x0020;&#x0020;&#x000a;&#x0020;&#x0020;&#xc5b8;&#xbb38;</p>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text3/segment-break-transformation-removable-4.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Text 4.1.2. Segment Break Transformation Rules</title>
+<link rel="author" title="Chun-Min (Jeremy) Chen" href="mailto:jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform">
+<link rel="stylesheet" type="text/css" href="support/ahem.css">
+<link rel="match" href="segment-break-transformation-removable-ref.html">
+<meta name="assert" content="Test checks that a sequence which consists of multiple collapsible
+segment breaks mixed with multiple white spaces should be removed correctly,
+if the character immediately before/after the sequence is the zero-width space character (U+200B),
+or both the character before/after the sequence is F, W, or H (not A), and neither side is Hangul.">
+<style> p { line-height: 1; font-family: ahem; } </style>
+</head>
+<body>
+<div>Test passes if there is <b>no</b> white space between 2nd and 3rd CJK character.
+<!--Some[WS][LF][WS][LF][WS][LF][WS]Chinese-->
+<p>&#x4e00;&#x4e9b;&#x0020;&#x000a;&#x0020;&#x000a;&#x0020;&#x000a;&#x0020;&#x4e2d;&#x6587;</p>
+<!--Some[ZWSP][WS][LF][WS][LF][WS][LF][WS]Chinese-->
+<p>&#x4e00;&#x4e9b;&#x200b;&#x0020;&#x000a;&#x0020;&#x000a;&#x0020;&#x000a;&#x0020;&#x4e2d;&#x6587;</p>
+<!--Some[WS][LF][WS][LF][WS][LF][WS][ZWSP]Chinese-->
+<p>&#x4e00;&#x4e9b;&#x0020;&#x000a;&#x0020;&#x000a;&#x0020;&#x000a;&#x0020;&#x200b;&#x4e2d;&#x6587;</p>
+<!--Some[ZWSP][WS][LF][WS][LF][WS][LF][WS]Hangul-->
+<p>&#x4e00;&#x4e9b;&#x200b;&#x0020;&#x000a;&#x0020;&#x000a;&#x0020;&#x000a;&#x0020;&#xc5b8;&#xbb38;</p>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text3/segment-break-transformation-removable-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Text 4.1.2. Segment Break Transformation Rules</title>
+<link rel="author" title="Chun-Min (Jeremy) Chen" href="mailto:jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="stylesheet" type="text/css" href="support/ahem.css" />
+<style> p { line-height: 1; font-family: ahem; } </style>
+</head>
+<body>
+<div>Test passes if there is <b>no</b> white space between 2nd and 3rd CJK character.
+<!--Some Chinese-->
+<p>&#x4e00;&#x4e9b;&#x4e2d;&#x6587;</p>
+<!--Some Chinese-->
+<p>&#x4e00;&#x4e9b;&#x4e2d;&#x6587;</p>
+<!--Some Chinese-->
+<p>&#x4e00;&#x4e9b;&#x4e2d;&#x6587;</p>
+<!--Some Hangul-->
+<p>&#x4e00;&#x4e9b;&#xc5b8;&#xbb38;</p>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text3/segment-break-transformation-unremovable-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Text 4.1.2. Segment Break Transformation Rules</title>
+<link rel="author" title="Chun-Min (Jeremy) Chen" href="mailto:jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform">
+<link rel="stylesheet" type="text/css" href="support/ahem.css">
+<link rel="match" href="segment-break-transformation-unremovable-ref.html">
+<meta name="assert" content="Test checks that a collapsible segment break should be converted to a white space (U+0020),
+if both the character before/after the segment break is Hangul.">
+<style> p { font-family: ahem; } </style>
+</head>
+<body>
+<div>Test passes if there is <b>one</b> white space between 2nd and 3rd CJK character.
+<!--Some[LF]Hangul-->
+<p>&#x4e00;&#x4e9b;&#x000a;&#xc5b8;&#xbb38;</p>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text3/segment-break-transformation-unremovable-2.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Text 4.1.2. Segment Break Transformation Rules</title>
+<link rel="author" title="Chun-Min (Jeremy) Chen" href="mailto:jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform">
+<link rel="stylesheet" type="text/css" href="support/ahem.css">
+<link rel="match" href="segment-break-transformation-unremovable-ref.html">
+<meta name="assert" content="Test checks that multiple segment breaks should be converted to a white space (U+0020),
+if both the character before/after the segment breaks is Hangul.">
+<style> p { font-family: ahem; } </style>
+</head>
+<body>
+<div>Test passes if there is <b>one</b> white space between 2nd and 3rd CJK character.
+<!--Some[LF][LF][LF]Hangul-->
+<p>&#x4e00;&#x4e9b;&#x000a;&#x000a;&#x000a;&#xc5b8;&#xbb38;</p>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text3/segment-break-transformation-unremovable-3.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Text 4.1.2. Segment Break Transformation Rules</title>
+<link rel="author" title="Chun-Min (Jeremy) Chen" href="mailto:jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform">
+<link rel="stylesheet" type="text/css" href="support/ahem.css">
+<link rel="match" href="segment-break-transformation-unremovable-ref.html">
+<meta name="assert" content="Test checks that a sequence which consists of a collapsible segment break
+surrounded by multiple white spaces should be converted to a white space (U+0020),
+if both the character before/after the sequence is Hangul.">
+<style> p { font-family: ahem; } </style>
+</head>
+<body>
+<div>Test passes if there is <b>one</b> white space between 2nd and 3rd CJK character.
+<!--Some[WS][WS][LF][WS][WS]Hangul-->
+<p>&#x4e00;&#x4e9b;&#x0020;&#x0020;&#x000a;&#x0020;&#x0020;&#xc5b8;&#xbb38;</p>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text3/segment-break-transformation-unremovable-4.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Text 4.1.2. Segment Break Transformation Rules</title>
+<link rel="author" title="Chun-Min (Jeremy) Chen" href="mailto:jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="help" href="https://drafts.csswg.org/css-text-3/#line-break-transform">
+<link rel="stylesheet" type="text/css" href="support/ahem.css">
+<link rel="match" href="segment-break-transformation-unremovable-ref.html">
+<meta name="assert" content="Test checks that a sequence which consists of multiple collapsible
+segment breaks mixed with multiple white spaces should be converted to a white space (U+0020),
+if both the character before/after the sequence is Hangul.">
+<style> p { font-family: ahem; } </style>
+</head>
+<body>
+<div>Test passes if there is <b>one</b> white space between 2nd and 3rd CJK character.
+<!--Some[WS][LF][WS][LF][WS][LF][WS]Hangul-->
+<p>&#x4e00;&#x4e9b;&#x0020;&#x000a;&#x0020;&#x000a;&#x0020;&#x000a;&#x0020;&#xc5b8;&#xbb38;</p>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/text3/segment-break-transformation-unremovable-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Text 4.1.2. Segment Break Transformation Rules</title>
+<link rel="author" title="Chun-Min (Jeremy) Chen" href="mailto:jeremychen@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org">
+<link rel="stylesheet" type="text/css" href="support/ahem.css" />
+<style> p { font-family: ahem; } </style>
+</head>
+<body>
+<div>Test passes if there is <b>one</b> white space between 2nd and 3rd CJK character.
+<!--Some Hangul-->
+<p>&#x4e00;&#x4e9b;&nbsp;&#xc5b8;&#xbb38;</p>
+</div>
+</body>
+</html>