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

Unified Diff: LayoutTests/fast/events/message-channel-gc.html

Issue 174271: test Base URL: http://svn.webkit.org/repository/webkit/trunk/
Patch Set: Created 11 years, 4 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 | « LayoutTests/ChangeLog ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/message-channel-gc.html
===================================================================
--- LayoutTests/fast/events/message-channel-gc.html (revision 46558)
+++ LayoutTests/fast/events/message-channel-gc.html (working copy)
@@ -17,6 +17,20 @@ function log(message)
document.getElementById("log").innerHTML += message + "<br>";
}
+function done()
+{
+ channel.port1.close();
+ channel.port2.close();
+
+ gc();
+
+ setTimeout(function() {
+ log("DONE");
+ if (window.layoutTestController)
+ layoutTestController.notifyDone()
+ }, 0);
+}
+
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
@@ -29,23 +43,13 @@ gc();
log("Should be 'bar': " + channel.port1.foo);
channel.port1.onmessage = function() { log("onmessage"); }
-channel.port1.addEventListener("message", function() { log("message listener"); }, false);
+channel.port1.addEventListener("message", function() { log("message listener"); done(); }, false);
gc();
channel.port1.start();
channel.port2.postMessage("msg");
gc();
-channel.port1.close();
-channel.port2.close();
-
-gc();
-
-setTimeout(function() {
- log("DONE");
- if (window.layoutTestController)
- layoutTestController.notifyDone()
-}, 0);
</script>
</body>
« no previous file with comments | « LayoutTests/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698