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

Unified Diff: LayoutTests/editing/style/apply-style-crash3.html

Issue 1124863003: Harden changing font style over unknown elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clean up the test Created 5 years, 7 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 | LayoutTests/editing/style/apply-style-crash3-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/style/apply-style-crash3.html
diff --git a/LayoutTests/editing/style/apply-style-crash3.html b/LayoutTests/editing/style/apply-style-crash3.html
new file mode 100644
index 0000000000000000000000000000000000000000..c168d9fda1fff3dbf8be6e4f09e72cb693817e2f
--- /dev/null
+++ b/LayoutTests/editing/style/apply-style-crash3.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<unknown>
+<script></script>
+<textarea></textarea>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+function onDOMNodeRemoved(e) {
+ if (!(e.srcElement instanceof Element))
+ return;
+
+ e.srcElement.insertAdjacentHTML('afterbegin', ' ');
+ document.execCommand('FontSizeDelta', false, '1px');
+}
+
+document.addEventListener("DOMNodeRemoved", onDOMNodeRemoved, false);
+document.designMode = "on";
+document.execCommand("SelectAll", false)
+var unknown = document.getElementsByTagName("unknown")[0];
+unknown.textContent = "sss";
+unknown.outerHTML = "";
+document.execCommand("SelectAll", false);
+// Put description() here so as to not upset test condition.
+description("Verify that changing the style over an unknown element does not crash.");
+if (window.testRunner)
+ testRunner.notifyDone();
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/editing/style/apply-style-crash3-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698