Title: [194916] trunk/LayoutTests
Revision
194916
Author
[email protected]
Date
2016-01-12 12:11:03 -0800 (Tue, 12 Jan 2016)

Log Message

Null dereference loading Blink layout test editing/apply-inline-style-to-element-with-no-renderer-crash.html
https://bugs.webkit.org/show_bug.cgi?id=149287
<rdar://problem/22746217>

Reviewed by Brent Fulgham.

* imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash-expected.txt: Added.
* imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (194915 => 194916)


--- trunk/LayoutTests/ChangeLog	2016-01-12 20:05:52 UTC (rev 194915)
+++ trunk/LayoutTests/ChangeLog	2016-01-12 20:11:03 UTC (rev 194916)
@@ -1,3 +1,14 @@
+2016-01-12  Jiewen Tan  <[email protected]>
+
+        Null dereference loading Blink layout test editing/apply-inline-style-to-element-with-no-renderer-crash.html
+        https://bugs.webkit.org/show_bug.cgi?id=149287
+        <rdar://problem/22746217>
+
+        Reviewed by Brent Fulgham.
+
+        * imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash-expected.txt: Added.
+        * imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash.html: Added.
+
 2016-01-12  Brady Eidson  <[email protected]>
 
         Modern IDB: storage/indexeddb/dont-wedge.html is flaky.

Added: trunk/LayoutTests/imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash-expected.txt (0 => 194916)


--- trunk/LayoutTests/imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash-expected.txt	2016-01-12 20:11:03 UTC (rev 194916)
@@ -0,0 +1 @@
+PASS. WebKit didn't crash.

Added: trunk/LayoutTests/imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash.html (0 => 194916)


--- trunk/LayoutTests/imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash.html	                        (rev 0)
+++ trunk/LayoutTests/imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash.html	2016-01-12 20:11:03 UTC (rev 194916)
@@ -0,0 +1,43 @@
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+
+// If we create an anchor element using execCommand('CreateLink') in an SVG namespace it won't get a renderer because the command will create
+// an HTML rather than an SVG anchor. Our subsequent attempt to apply an inline style on the should fail rather than result in a crash.
+_onload_ = function() {
+    tspan = document.getElementById("tspan");
+    tspan2 = document.getElementById("tspan2");
+    textPath = document.getElementById("textPath");
+
+    colorprofile = document.createElementNS('http://www.w3.org/2000/svg', 'color_profile');
+    li = document.createElement('li');
+    colorprofile.appendChild(li);
+    document.implementation.createDocument('' ,'' ,null).adoptNode(colorprofile)
+
+    input=document.createElement('input');
+    textPath.parentNode.insertBefore(input, textPath);
+    window.getSelection().setBaseAndExtent(input, 4);
+
+    document.designMode='on';
+    document.execCommand('Transpose');
+    document.execCommand('selectall');
+    document.execCommand('CreateLink', 0, '#');
+    document.execCommand('CreateLink', 0, '#');
+    document.execCommand('Undo');
+    document.designMode='off'
+    document.execCommand('Undo');
+    document.execCommand('Undo');
+    document.designMode='on';
+    document.execCommand('italic');
+
+    document.write("PASS. WebKit didn't crash.");
+}
+</script>
+<svg>
+    <text>
+        <tspan id="tspan">
+            <tspan id="tspan2">%uef5f%u9776%u638a</tspan>
+            <textPath id="textPath"></textPath>
+        </tspan>
+    </text>
+</svg>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to