Closed Bug 441716 Opened 16 years ago Closed 16 years ago

test_retention_is_0_closes.xul is flakey on linux

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1a1

People

(Reporter: sdwilsh, Assigned: sdwilsh)

References

Details

Attachments

(1 file, 1 obsolete file)

There's a timer involved that I can probably make a bit better.  Hopefully it'll help with the random orangeness on linux.
Attached patch v1.0 (obsolete) — Splinter Review
This was "fun"
Attachment #326968 - Flags: review?(edilee)
Whiteboard: [has patch][needs review Mardak]
Comment on attachment 326968 [details] [diff] [review]
v1.0

actually, I don't think Edward is reading bugmail...
Attachment #326968 - Flags: review?(edilee) → review?(gavin.sharp)
Whiteboard: [has patch][needs review Mardak] → [has patch][needs review gavin]
Comment on attachment 326968 [details] [diff] [review]
v1.0

>diff --git a/toolkit/mozapps/downloads/tests/chrome/test_retention_is_0_closes.xul b/toolkit/mozapps/downloads/tests/chrome/test_retention_is_0_closes.xul

>+function setPref(aDoTest)

>+  // If we're testing, set retention to auto-remove and auto-close
>+  prefs.setIntPref("browser.download.manager.retention", aDoTest ? 0 : 2);
>+  prefs.setBoolPref("browser.download.manager.closeWhenDone", aDoTest);

(Not related to this bug, but the intention is that this resets prefs to default if aDoTest is false, right? If so, do that explicitly with clearUserPref? Protects against weirdness should the defaults ever change.)

>-      ww.unregisterNotification(this);

shouldn't you move this to the domwindowclosed handler?
Attachment #326968 - Flags: review?(gavin.sharp) → review+
(In reply to comment #3)
> (From update of attachment 326968 [details] [diff] [review])
> (Not related to this bug, but the intention is that this resets prefs to
> default if aDoTest is false, right? If so, do that explicitly with
> clearUserPref? Protects against weirdness should the defaults ever change.)
I didn't even know about that.  Filed bug 442099 to fix this in all our tests.

> >-      ww.unregisterNotification(this);
> 
> shouldn't you move this to the domwindowclosed handler?
Er, yes, and I though I had.  Interesting that it didn't end up causing a leak either...
Whiteboard: [has patch][needs review gavin] → [has patch][has review]
Attached patch v1.1Splinter Review
addresses review comments
Attachment #326968 - Attachment is obsolete: true
Whiteboard: [has patch][has review] → [has patch][has review][can land]
Pushed to mozilla-central:
http://hg.mozilla.org/mozilla-central/index.cgi/rev/42cafa4b181f
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][has review][can land]
Target Milestone: --- → Firefox 3.1a1
Product: Firefox → Toolkit
Depends on: 483200
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: