2006-11-07 Mitz Pettel <mitz@webkit.org>
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Nov 2006 18:39:02 +0000 (18:39 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Nov 2006 18:39:02 +0000 (18:39 +0000)
        Reviewed by Beth.

        Test for http://bugs.webkit.org/show_bug.cgi?id=11505
        REGRESSION: Null pointer deref in HitTestResult::spellingToolTip() (assertion failure in Node::document)

        The null check was added as part for the fix for <rdar://problem/4820814>,
        however the test that was committed with the fix avoids the case of a null
        m_innerNonSharedNode, which this test covers.

        * fast/css-generated-content/spellingToolTip-assert-expected.checksum: Added.
        * fast/css-generated-content/spellingToolTip-assert-expected.png: Added.
        * fast/css-generated-content/spellingToolTip-assert-expected.txt: Added.
        * fast/css-generated-content/spellingToolTip-assert.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/css-generated-content/spellingToolTip-assert-expected.checksum [new file with mode: 0644]
LayoutTests/fast/css-generated-content/spellingToolTip-assert-expected.png [new file with mode: 0644]
LayoutTests/fast/css-generated-content/spellingToolTip-assert-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-generated-content/spellingToolTip-assert.html [new file with mode: 0644]

index 1a13f83d246116c047cb9a553d378e2387369965..7873857e72e4cdef92d4674187cd47884388b631 100644 (file)
@@ -1,3 +1,19 @@
+2006-11-07  Mitz Pettel  <mitz@webkit.org>
+
+        Reviewed by Beth.
+
+        Test for http://bugs.webkit.org/show_bug.cgi?id=11505
+        REGRESSION: Null pointer deref in HitTestResult::spellingToolTip() (assertion failure in Node::document)
+
+        The null check was added as part for the fix for <rdar://problem/4820814>,
+        however the test that was committed with the fix avoids the case of a null
+        m_innerNonSharedNode, which this test covers.
+
+        * fast/css-generated-content/spellingToolTip-assert-expected.checksum: Added.
+        * fast/css-generated-content/spellingToolTip-assert-expected.png: Added.
+        * fast/css-generated-content/spellingToolTip-assert-expected.txt: Added.
+        * fast/css-generated-content/spellingToolTip-assert.html: Added.
+
 2006-11-06  Beth Dakin  <bdakin@apple.com>
 
         Reviewed by Hyatt.
diff --git a/LayoutTests/fast/css-generated-content/spellingToolTip-assert-expected.checksum b/LayoutTests/fast/css-generated-content/spellingToolTip-assert-expected.checksum
new file mode 100644 (file)
index 0000000..cc84eed
--- /dev/null
@@ -0,0 +1 @@
+67b18848c3f6ef8fe7c75052da11d6bd
\ No newline at end of file
diff --git a/LayoutTests/fast/css-generated-content/spellingToolTip-assert-expected.png b/LayoutTests/fast/css-generated-content/spellingToolTip-assert-expected.png
new file mode 100644 (file)
index 0000000..55c791a
Binary files /dev/null and b/LayoutTests/fast/css-generated-content/spellingToolTip-assert-expected.png differ
diff --git a/LayoutTests/fast/css-generated-content/spellingToolTip-assert-expected.txt b/LayoutTests/fast/css-generated-content/spellingToolTip-assert-expected.txt
new file mode 100644 (file)
index 0000000..e8d915b
--- /dev/null
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x576
+      RenderBlock {P} at (0,0) size 784x36
+        RenderText {#text} at (0,0) size 121x18
+          text run at (0,0) width 121: "Regression test for "
+        RenderInline {I} at (0,0) size 659x36
+          RenderInline {A} at (0,0) size 301x18 [color=#0000EE]
+            RenderText {#text} at (121,0) size 301x18
+              text run at (121,0) width 301: "http://bugs.webkit.org/show_bug.cgi?id=11505"
+          RenderText {#text} at (422,0) size 659x36
+            text run at (422,0) width 4: " "
+            text run at (426,0) width 233: "REGRESSION: Null pointer deref in"
+            text run at (0,18) width 446: "HitTestResult::spellingToolTip() (assertion failure in Node::document)"
+        RenderText {#text} at (446,18) size 4x18
+          text run at (446,18) width 4: "."
+      RenderBlock {P} at (0,52) size 784x18
+        RenderText {#text} at (0,0) size 175x18
+          text run at (0,0) width 175: "No assert means test PASS."
+layer at (0,100) size 60x60
+  RenderBlock (positioned) at (0,100) size 60x60 [border: (5px solid #000000)]
+    RenderText at (0,0) size 0x0
diff --git a/LayoutTests/fast/css-generated-content/spellingToolTip-assert.html b/LayoutTests/fast/css-generated-content/spellingToolTip-assert.html
new file mode 100644 (file)
index 0000000..1b0de1f
--- /dev/null
@@ -0,0 +1,33 @@
+<html>
+<head>
+    <title></title>
+    <style type="text/css">
+    html:before {
+        content: "";
+        width: 50px;
+        height: 50px;
+        position: fixed;
+        top: 100px;
+        border: solid 5px;
+    }
+    </style>
+    <script type="text/javascript">
+        function test()
+        {
+            if (!window.layoutTestController)
+                return;
+            eventSender.mouseMoveTo(30, 30);
+            document.body.offsetTop;    // force layout
+            eventSender.mouseMoveTo(30, 130);
+        }
+    </script>
+</head>
+<body onload="test()">
+    <p>
+        Regression test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=11505">http://bugs.webkit.org/show_bug.cgi?id=11505</a>
+        REGRESSION: Null pointer deref in HitTestResult::spellingToolTip() (assertion failure in Node::document)</i>.
+    </p>
+    <p>
+        No assert means test PASS.
+    </p>
+</body>