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

Unified Diff: third_party/WebKit/LayoutTests/fast/parser/strip-script-attrs-on-input.html

Issue 1372343002: Crash fix: Avoid using stale HTMLToken after tree construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO about mutation Created 5 years, 2 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/LayoutTests/fast/parser/strip-script-attrs-on-input-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/parser/strip-script-attrs-on-input.html
diff --git a/third_party/WebKit/LayoutTests/fast/parser/strip-script-attrs-on-input.html b/third_party/WebKit/LayoutTests/fast/parser/strip-script-attrs-on-input.html
new file mode 100644
index 0000000000000000000000000000000000000000..feba9acb85f7a80019695b511131aedc3313c0ca
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/parser/strip-script-attrs-on-input.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<body>
+<div contenteditable="true" id="target">
+ <!-- Blink will remove javascript url attrs when copy&pasted. -->
+ <input onblur="javascript:false;" onclick="javascript:false;" type="text"/>
+</div>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+requestAnimationFrame(function() {
+ var target = document.getElementById("target");
+ var selection = window.getSelection();
+ var range = document.createRange();
+ range.selectNodeContents(target);
+ selection.addRange(range);
+
+ // Invoke HTML parser with ParserContentPolicy disabling scripting content.
+ document.execCommand("Cut");
+ document.execCommand("Paste");
+
+ target.innerHTML = '';
+ testRunner.notifyDone();
+});
+</script>
+<p>PASS: if no OOB access detected in ASAN.</p>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/parser/strip-script-attrs-on-input-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698