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

Unified Diff: LayoutTests/svg/dom/SVGScriptElement/script-external-no-multiple-load.html

Issue 1141683003: Don't dispatch two 'load' events for external SVGScriptElement loads (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/svg/dom/SVGScriptElement/script-external-no-multiple-load-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/dom/SVGScriptElement/script-external-no-multiple-load.html
diff --git a/LayoutTests/svg/dom/SVGScriptElement/script-external-no-multiple-load.html b/LayoutTests/svg/dom/SVGScriptElement/script-external-no-multiple-load.html
new file mode 100644
index 0000000000000000000000000000000000000000..4e69758d6c4214d2db002d3170f2567063f03c84
--- /dev/null
+++ b/LayoutTests/svg/dom/SVGScriptElement/script-external-no-multiple-load.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<script src=../../../resources/js-test.js></script>
+<script>
+window.jsTestIsAsync = true;
+
+var loadEventsFired = 0;
+
+onload = function() {
+ var newExternalScript = document.createElementNS("http://www.w3.org/2000/svg", "script");
+ newExternalScript.onload = function() {
+ loadEventsFired++;
+ setTimeout(function() {
fs 2015/05/19 07:25:40 Not very fond of this, but did manage to come up w
pdr. 2015/05/19 18:18:26 I think this is fine. setTimeout is our hook for w
+ shouldBe("loadEventsFired", "1");
+ finishJSTest();
+ }, 0);
+ };
+ newExternalScript.setAttributeNS("http://www.w3.org/1999/xlink", "href", "resources/script-load.js");
+ document.querySelector("svg").appendChild(newExternalScript);
+}
+</script>
+<svg>
+</svg>
« no previous file with comments | « no previous file | LayoutTests/svg/dom/SVGScriptElement/script-external-no-multiple-load-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698