Closed Bug 701540 Opened 13 years ago Closed 13 years ago

stop test_multi_select.xul hanging on Windows

Categories

(SeaMonkey :: Download & File Handling, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.8

People

(Reporter: InvisibleSmiley, Assigned: InvisibleSmiley)

Details

Attachments

(1 file)

While running the Download Manager chrome mochitests for bug 701051 I found that test_multi_select.xul reproducibly hung for me on Windows (Win7 x64, if that matters), even with the patch from bug 701051 applied.

I compared our version with the one from Toolkit and only ported what was needed to fix it for me. With my patch, all DM chrome tests pass for me on both Windows and Linux.

The -w version comes down to:

   var testObs = {
     observe: function(aSubject, aTopic, aData) {
       if (aTopic != DLMGR_UI_DONE)
         return;

-      var win = aSubject;
+      SimpleTest.waitForFocus(function () { continueTest(aSubject) }, aSubject);
+    }
+  };
+
+  function continueTest(win) {
       var downloadView = win.document.getElementById("downloadTree").view;

       // Default test/check for invocations
       var invokeCount = 0;
       var counter = function() invokeCount++;

       // Accessors for returning a value for various properties
       var getItems = function() downloadView.rowCount;
@@ -217,17 +221,16 @@ function test()
         }
       }

       // We're done!
       win.close();
       obs.removeObserver(testObs, DLMGR_UI_DONE);
       SimpleTest.finish();
     }
-  };
   obs.addObserver(testObs, DLMGR_UI_DONE, false);
Attachment #573648 - Flags: review?(neil)
Comment on attachment 573648 [details] [diff] [review]
patch [Checkin: comment 2]

Seems reasonable based on -w diff.
Attachment #573648 - Flags: review?(neil) → review+
Comment on attachment 573648 [details] [diff] [review]
patch [Checkin: comment 2]

http://hg.mozilla.org/comm-central/rev/64edaf61ed76
Attachment #573648 - Attachment description: patch → patch [Checkin: comment 2]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: