QT 4.8 soft hyphen bug has no failing test case
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2012 01:04:07 +0000 (01:04 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2012 01:04:07 +0000 (01:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81964

Patch by Dave Tharp <dtharp@codeaurora.org> on 2012-03-22
Reviewed by Beth Dakin.

Adding test to expose soft hyphen problem in QT 4.8.0

* fast/text/soft-hyphen-5-expected.txt: Added.
* fast/text/soft-hyphen-5.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111801 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/text/soft-hyphen-5-expected.txt [new file with mode: 0644]
LayoutTests/fast/text/soft-hyphen-5.html [new file with mode: 0644]

index 0179a1e..aa95367 100644 (file)
@@ -1,3 +1,15 @@
+2012-03-22  Dave Tharp  <dtharp@codeaurora.org>
+
+        QT 4.8 soft hyphen bug has no failing test case
+        https://bugs.webkit.org/show_bug.cgi?id=81964
+
+        Reviewed by Beth Dakin.
+
+        Adding test to expose soft hyphen problem in QT 4.8.0
+
+        * fast/text/soft-hyphen-5-expected.txt: Added.
+        * fast/text/soft-hyphen-5.html: Added.
+
 2012-03-22  Emil A Eklund  <eae@chromium.org>
 
         Unreviewed rebaseline for chromium leopard.
diff --git a/LayoutTests/fast/text/soft-hyphen-5-expected.txt b/LayoutTests/fast/text/soft-hyphen-5-expected.txt
new file mode 100644 (file)
index 0000000..9437dcb
--- /dev/null
@@ -0,0 +1,10 @@
+Soft Hyphen Test
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS true is true
+anti­dis­est­ab­lish­ment­arian­ism.
diff --git a/LayoutTests/fast/text/soft-hyphen-5.html b/LayoutTests/fast/text/soft-hyphen-5.html
new file mode 100644 (file)
index 0000000..fb59f7d
--- /dev/null
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body onload="runTest();">
+    <script>
+        description("Soft Hyphen Test");
+
+        function runTest() {
+            if (window.layoutTestController)
+                layoutTestController.dumpAsText();
+
+            // 56 is 4 * the font size (14). We're expecting the text to break up into 4 lines.
+            // 4 lines + the padding gives a div height of 92 in webkit and FF, 88 in chrome.
+            // So anything less than 56 is a FAIL.
+            var doesItPass = Boolean(document.getElementById('text1').offsetHeight > 56) ;
+            shouldBeTrue(String(doesItPass)) ;
+        }
+    </script>
+
+    <div id="text1" style="width:150px; font-family:Ahem; font-size:14px; border:2px solid red">
+        <p>anti&shy;dis&shy;est&shy;ab&shy;lish&shy;ment&shy;arian&shy;ism.</p>
+    </div>
+
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>