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

Unified Diff: LayoutTests/fast/images/image-beforeload-event-crash.html

Issue 18226005: Do not fire beforeload events from frames with scripting disabled (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Do not fire events when the parser is stopped Created 7 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
Index: LayoutTests/fast/images/image-beforeload-event-crash.html
diff --git a/LayoutTests/fast/images/image-beforeload-event-crash.html b/LayoutTests/fast/images/image-beforeload-event-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..7b4db06067bd9635f7534914e7408ba64bacb402
--- /dev/null
+++ b/LayoutTests/fast/images/image-beforeload-event-crash.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+ .dataUriBackgroundImage {
+ background-image: url("data:image/svg+xml,<svg></svg>");
+ }
+</style>
+<script>
+ function createAndAttachStyledElement() {
+ var pEl = document.createElementNS("http://www.w3.org/1999/xhtml", "p");
+ pEl.setAttribute("class", "dataUriBackgroundImage");
+ document.body.appendChild(pEl);
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ }
+
+ document.addEventListener("DOMContentLoaded", createAndAttachStyledElement, false);
+ document.addEventListener("beforeload", function(event) { event.preventDefault(); }, true);
+</script>
+</head>
+<body>
+ Test for crbug.com/256013: This test passes if it does not crash.<br/>
+ <object data="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="></object>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698