Index: third_party/WebKit/LayoutTests/fast/parser/force-plaintext.html |
diff --git a/third_party/WebKit/LayoutTests/fast/parser/force-plaintext.html b/third_party/WebKit/LayoutTests/fast/parser/force-plaintext.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..726abebf1728ecc04c625aeeb2b0bcafd497398d |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/parser/force-plaintext.html |
@@ -0,0 +1,14 @@ |
+<!DOCTYPE html> |
+<p>plaintest test with postMessage</p> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script> |
+var t = async_test("Do not parse plain text as HTML"); |
+window.addEventListener('message', function() { |
+ assert_unreached("Child should not be executable"); |
+}); |
+var iframe = document.createElement('iframe'); |
+iframe.src = "data:text/plain,<script>parent.postMessage('Hello','" + location.origin+"');<\/script>"; |
+iframe.onload = () => t.done(); |
+document.body.appendChild(iframe); |
+</script> |