Bug 570977: xpinstall tests get confused by multiple load events. r=robstring
authorDave Townsend <dtownsend@oxymoronical.com>
Thu, 10 Jun 2010 18:47:14 -0700
changeset 43490 cfa94c2a57e95823d47752144adb7655eed2d719
parent 43489 9ec599d9a1f0c6530cecbcfb6cd2bd924d1bcbb3
child 43491 0d404b63f71ba57ea633ebee489165fe7101c9ed
push id13734
push userdtownsend@mozilla.com
push dateFri, 11 Jun 2010 01:47:44 +0000
treeherdermozilla-central@63f5ac31b8c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrobstring
bugs570977
milestone1.9.3a6pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 570977: xpinstall tests get confused by multiple load events. r=robstring
toolkit/mozapps/extensions/test/xpinstall/head.js
--- a/toolkit/mozapps/extensions/test/xpinstall/head.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/head.js
@@ -179,16 +179,17 @@ var Harness = {
   onWindowTitleChange: function(window, title) {
   },
 
   onOpenWindow: function(window) {
     var domwindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                           .getInterface(Components.interfaces.nsIDOMWindowInternal);
     var self = this;
     domwindow.addEventListener("load", function() {
+      domwindow.removeEventListener("load", arguments.callee, false);
       self.windowLoad(domwindow);
     }, false);
   },
 
   onCloseWindow: function(window) {
   },
 
   // Addon Install Listener