Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: third_party/WebKit/LayoutTests/editing/execCommand/crash-inserting-span.html

Issue 2135993003: Add null check to fix crash in blink::ComputedStyle::display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a test case Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/EditingUtilities.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/execCommand/crash-inserting-span.html
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/crash-inserting-span.html b/third_party/WebKit/LayoutTests/editing/execCommand/crash-inserting-span.html
new file mode 100644
index 0000000000000000000000000000000000000000..9e030da81c4ff119c81a269ecf578516be4f1dae
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/crash-inserting-span.html
@@ -0,0 +1,32 @@
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+ // This test case was created by ClusterFuzz.
+ // See http://crbug.com/626991
+ function runTest() {
+ // The body of description() is defined in third_party/webgl/src/sdk/tests/js/js-test-pre.js
+ msg = document.title;
+ // For MSIE 6 compatibility
+ var span = document.createElement("span");
+ span.innerHTML = '<p>' + msg + '</p><p>On success, you will see a series of "<span class="pass">PASS</span>" messages, followed by "<span class="pass">TEST COMPLETE</span>".</p>';
+ var description = document.getElementById("description");
+ if (description.firstChild)
+ description.replaceChild(span, description.firstChild);
+ else
+ description.appendChild(span);
+ }
+</script>
+<body onload="runTest()">
+<script>
+ function fuzz() {
+ document.designMode = 'on';
+ document.execCommand("selectAll");
+ document.execCommand("CreateLink", 0, "foo");
+ document.execCommand("inserthtml", false, "<span id='green' style='color:green'>green</span>");
yosin_UTC9 2016/07/13 02:19:43 Could you try to simplify test case? We need to ha
joone 2016/07/13 04:49:25 Okay, I will try to add HTML code instead of runni
+ }
+test(function() {
+ setTimeout(fuzz);
+}, 'run setTimeout');
+</script>
+<div id="description"></div>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/EditingUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698