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

Unified Diff: LayoutTests/svg/custom/loadevents-async.html

Issue 134263003: Followup fixes for bug 332066. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: setTimeout == race with load Created 6 years, 11 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 | Source/core/svg/SVGDocumentExtensions.cpp » ('j') | Source/core/svg/SVGUseElement.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/custom/loadevents-async.html
diff --git a/LayoutTests/svg/custom/loadevents-async.html b/LayoutTests/svg/custom/loadevents-async.html
index e624e902ca45a29871b0077bc84e1b73ee860701..f6c8fd966b4122b37a24d156690b575bef815563 100644
--- a/LayoutTests/svg/custom/loadevents-async.html
+++ b/LayoutTests/svg/custom/loadevents-async.html
@@ -14,17 +14,20 @@ var emptyDocument = document.implementation.createDocument("", "", null);
document.body.appendChild(spanElement);
divElement.appendChild(useElement);
-useElement.addEventListener("load", function () { emptyDocument.adoptNode(useElement); invoked = true; }, false);
+useElement.addEventListener("load", function () {
+ emptyDocument.adoptNode(useElement);
+ invoked = true;
+ shouldBeTrue("invoked");
Stephen Chennney 2014/01/13 17:24:17 This seems pointless. Is there some other sensible
Erik Dahlström (inactive) 2014/01/14 09:03:59 Done.
+ finishJSTest();
+ }, false);
spanElement.appendChild(divElement);
document.body.appendChild(useElement);
shouldBeFalse("invoked");
jsTestIsAsync = true;
-setTimeout(function() {
- shouldBeTrue("invoked");
- finishJSTest();
-}, 1);
+// need to reference an external file to get a load event
+useElement.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", "resources/rgb.svg#RGB");
</script>
<body>
</html>
« no previous file with comments | « no previous file | Source/core/svg/SVGDocumentExtensions.cpp » ('j') | Source/core/svg/SVGUseElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698