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> |