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

Unified Diff: LayoutTests/svg/custom/image-svgload-after-docload.html

Issue 375923002: Don't dispatch '(SVG)load' to ancestors of <svg:image> after doc. 'load' (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Recursion-based sendSVG...AncestorChain...; Additional tests. Created 6 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/svg/custom/image-svgload-after-docload.html
diff --git a/LayoutTests/svg/custom/image-svgload-after-docload.html b/LayoutTests/svg/custom/image-svgload-after-docload.html
new file mode 100644
index 0000000000000000000000000000000000000000..5d9f6e847ae1412664065098f406adf0b74534ab
--- /dev/null
+++ b/LayoutTests/svg/custom/image-svgload-after-docload.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<svg></svg>
+<script>
+var t = async_test("No 'load' is fired on the SVG root when an image is inserted into it.");
+
+window.onload = function() {
+ var svgRoot = document.querySelector('svg');
+ svgRoot.onload = t.unreached_func("'load' should not fire on the SVG root.");
+
+ var image = document.createElementNS('http://www.w3.org/2000/svg', 'image');
+ image.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', 'resources/red-checker.png');
+ image.setAttribute('width', 10);
+ image.setAttribute('height', 10);
+ image.onload = t.step_func(function() {
+ assert_true(true);
+ setTimeout(function() { t.done(); }, 0);
pdr. 2014/07/10 03:48:15 I don't think this setTimeout is needed, nor the a
fs 2014/07/10 08:32:50 The setTimeout is needed to provide a "window" for
+ });
+ svgRoot.appendChild(image);
+}
+</script>
« no previous file with comments | « no previous file | LayoutTests/svg/custom/load-image-removed-in-onload.html » ('j') | Source/core/svg/SVGElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698