Closed
Bug 567821
Opened 14 years ago
Closed 14 years ago
Timeout in browser_privatebrowsing_downloadmonitor.js with bug 541739 landed
Categories
(Firefox :: Private Browsing, defect)
Tracking
()
RESOLVED
FIXED
Firefox 3.7a5
People
(Reporter: philor, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review |
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1274727181.1274727881.26342.gz
Linux mozilla-central opt test mochitest-other on 2010/05/24 11:53:01
s: mv-moz2-linux-ix-slave08
Running chrome://mochikit/content/browser/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadmonitor.js...
TEST-PASS | chrome://mochikit/content/browser/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadmonitor.js | The download panel should be successfully added initially
TEST-INFO | chrome://mochikit/content/browser/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadmonitor.js | Console message:
TEST-UNEXPECTED-FAIL | automation.py | application timed out after 330 seconds with no output
Assignee | ||
Comment 1•14 years ago
|
||
This is the same issue as bug 542928, only on a different test.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 2•14 years ago
|
||
Actually, it seems that this was caused by bug 541739.
Assignee | ||
Updated•14 years ago
|
Status: REOPENED → ASSIGNED
Summary: Intermittent timeout in browser_privatebrowsing_downloadmonitor.js → Timeout in browser_privatebrowsing_downloadmonitor.js with bug 541739 landed
Assignee | ||
Comment 3•14 years ago
|
||
This patch makes the test handle the dialog that is now correctly displayed, and adds the necessary cleanup code for the downloads, and makes sure that the downloads are non-resumable, so that we won't have to deal with them resuming after leaving the private browsing mode.
Attachment #447333 -
Flags: review?(gavin.sharp)
Comment 4•14 years ago
|
||
Comment on attachment 447333 [details] [diff] [review]
Patch (v1)
>diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadmonitor.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadmonitor.js
> setTimeout(function () {
> setTimeout(function () {
These should probably be changed to executeSoon().
> // cleanup
> let dls = dm.activeDownloads;
> while (dls.hasMoreElements()) {
> let dl = dls.getNext().QueryInterface(Ci.nsIDownload);
>+ dm.cancelDownload(dl.id);
> dm.removeDownload(dl.id);
> let file = dl.targetFile;
> if (file.exists())
> file.remove(false);
> }
>+ persist.cancel(0);
>+ persist2.cancel(0);
> if (file.exists())
> file.remove(false);
>+ if (file2.exists())
>+ file2.remove(false);
Hrm, is this just belts-and-braces? I would have thought the while() loop would be sufficient for cleaning up. (The nsICancelable documentation frowns on passing in success codes, so perhaps you should use Cr.NS_ERROR_FAILURE.)
Attachment #447333 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 5•14 years ago
|
||
(In reply to comment #4)
> (From update of attachment 447333 [details] [diff] [review])
> >diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadmonitor.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_downloadmonitor.js
>
> > setTimeout(function () {
>
> > setTimeout(function () {
>
> These should probably be changed to executeSoon().
Done.
> > // cleanup
> > let dls = dm.activeDownloads;
> > while (dls.hasMoreElements()) {
> > let dl = dls.getNext().QueryInterface(Ci.nsIDownload);
> >+ dm.cancelDownload(dl.id);
> > dm.removeDownload(dl.id);
> > let file = dl.targetFile;
> > if (file.exists())
> > file.remove(false);
> > }
> >+ persist.cancel(0);
> >+ persist2.cancel(0);
> > if (file.exists())
> > file.remove(false);
> >+ if (file2.exists())
> >+ file2.remove(false);
>
> Hrm, is this just belts-and-braces? I would have thought the while() loop would
> be sufficient for cleaning up. (The nsICancelable documentation frowns on
> passing in success codes, so perhaps you should use Cr.NS_ERROR_FAILURE.)
Heh, these were added in another incarnation of this patch, but they're no longer necessary. I removed them all.
Attachment #447333 -
Attachment is obsolete: true
Assignee | ||
Comment 6•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago → 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a5
You need to log in
before you can comment on or make changes to this bug.
Description
•