Closed
Bug 406857
Opened 17 years ago
Closed 16 years ago
Don't clear referrer when restarting downloads
Categories
(Toolkit :: Downloads API, defect)
Toolkit
Downloads API
Tracking
()
VERIFIED
FIXED
mozilla1.9beta4
People
(Reporter: Mardak, Assigned: Mardak)
References
Details
Attachments
(2 files, 3 obsolete files)
6.48 KB,
patch
|
Details | Diff | Splinter Review | |
2.18 KB,
patch
|
Details | Diff | Splinter Review |
If you cancel a download, you'll see the referrer's TLD in the display, but when you restart it then finish/cancel, it becomes the download location. Seems like we kill the referrer info when restarting.
Assignee | ||
Comment 1•17 years ago
|
||
Litmus would probably be start a download with a referrer like mozilla.com download firefox (make sure it's a mirror not from mozilla.com..), cancel the download, see it says mozilla.com; restart download and let download a bit; cancel; make sure it stil says mozilla.com; repeat once again for good justice. Shawn: Any ideas for a testcase somehow setting up the channel to not report a referrer a second time through.. or however NS_GetReferrerFromChannel does its business..
Flags: in-testsuite?
Flags: in-litmus?
Whiteboard: [has patch][needs review sdwilsh]
Assignee | ||
Comment 2•17 years ago
|
||
Save the old referrer and reuse it if the new one is null.
Comment 3•17 years ago
|
||
in-litmus+ https://litmus.mozilla.org/show_test.cgi?id=5016
Flags: in-litmus? → in-litmus+
Comment 4•17 years ago
|
||
Comment on attachment 291521 [details] [diff] [review] v1 r=sdwilsh I would like a unit test on this before it lands.
Attachment #291521 -
Flags: review?(comrade693+bmo) → review+
Updated•17 years ago
|
Whiteboard: [has patch][needs review sdwilsh] → [needs new patch Mardak][has review]
Comment 5•17 years ago
|
||
Any status change on this?
Assignee | ||
Comment 6•17 years ago
|
||
Any suggestions or you want to write the test? :) I suppose because we need to actually have a server response, we'll need to use the javascript http server. We could start a download in a canceled state with a referrer set and restart it.
Assignee | ||
Comment 7•16 years ago
|
||
Now with more testcase!
Attachment #291521 -
Attachment is obsolete: true
Attachment #304837 -
Flags: review+
Attachment #304837 -
Flags: approval1.9?
Comment 8•16 years ago
|
||
Comment on attachment 304837 [details] [diff] [review] v1.1 a=beltzner for 1.9
Attachment #304837 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 9•16 years ago
|
||
Checking in toolkit/components/downloads/src/nsDownloadManager.cpp; /cvsroot/mozilla/toolkit/components/downloads/src/nsDownloadManager.cpp,v <-- nsDownloadManager.cpp new revision: 1.164; previous revision: 1.163 done Checking in toolkit/mozapps/downloads/tests/browser/Makefile.in; /cvsroot/mozilla/toolkit/mozapps/downloads/tests/browser/Makefile.in,v <-- Makefile.in new revision: 1.11; previous revision: 1.10 done RCS file: /cvsroot/mozilla/toolkit/mozapps/downloads/tests/browser/browser_bug_406857.js,v done Checking in toolkit/mozapps/downloads/tests/browser/browser_bug_406857.js; /cvsroot/mozilla/toolkit/mozapps/downloads/tests/browser/browser_bug_406857.js,v <-- browser_bug_406857.js initial revision: 1.1 done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs new patch Mardak][has review]
Target Milestone: --- → Firefox 3 beta4
I backed this out because the test failed on win2k3 and no-one was around.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 11•16 years ago
|
||
Thanks roc. Shawn: Is it okay if I just use settimeout 100? It's probably timing out because I send the enter key too early before the list populates. I thought it was going to be a problem, but I tried it without a timeout on my machine and it worked okay. FAIL - Timed out - chrome://mochikit/content/browser/toolkit/mozapps/downloads/tests/browser/browser_bug_406857.js
Comment 12•16 years ago
|
||
talk to sayrer?
Assignee | ||
Comment 13•16 years ago
|
||
Thought of something during my waltz class ;)
Attachment #304837 -
Attachment is obsolete: true
Assignee | ||
Comment 14•16 years ago
|
||
Checking in toolkit/components/downloads/src/nsDownloadManager.cpp; /cvsroot/mozilla/toolkit/components/downloads/src/nsDownloadManager.cpp,v <-- nsDownloadManager.cpp new revision: 1.167; previous revision: 1.166 done Checking in toolkit/mozapps/downloads/tests/browser/Makefile.in; /cvsroot/mozilla/toolkit/mozapps/downloads/tests/browser/Makefile.in,v <-- Makefile.in new revision: 1.13; previous revision: 1.12 done Checking in toolkit/mozapps/downloads/tests/browser/browser_bug_406857.js; /cvsroot/mozilla/toolkit/mozapps/downloads/tests/browser/browser_bug_406857.js,v <-- browser_bug_406857.js new revision: 1.3; previous revision: 1.2 done
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 15•16 years ago
|
||
Relanding x3.. Checking in toolkit/components/downloads/src/nsDownloadManager.cpp; /cvsroot/mozilla/toolkit/components/downloads/src/nsDownloadManager.cpp,v <-- nsDownloadManager.cpp new revision: 1.169; previous revision: 1.168 done Checking in toolkit/mozapps/downloads/tests/browser/Makefile.in; /cvsroot/mozilla/toolkit/mozapps/downloads/tests/browser/Makefile.in,v <-- Makefile.in new revision: 1.15; previous revision: 1.14 done Checking in toolkit/mozapps/downloads/tests/browser/browser_bug_406857.js; /cvsroot/mozilla/toolkit/mozapps/downloads/tests/browser/browser_bug_406857.js,v <-- browser_bug_406857.js new revision: 1.5; previous revision: 1.4 done
Verified FIXED using: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b4pre) Gecko/2008022304 Minefield/3.0b4pre Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b4pre) Gecko/2008022308 Minefield/3.0b4pre Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b4pre) Gecko/2008022308 Minefield/3.0b4pre
Status: RESOLVED → VERIFIED
Cotton-pickin' VM :-) Last build ID should be: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b4pre) Gecko/2008022304 Minefield/3.0b4pre
Comment 18•16 years ago
|
||
Any idea why the unit tests for this would be passing, but then timing out? I'm seeing this on two win2k3 boxes I'm trying to get setup right now to improve our unit test coverage. Brief log at: http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTest/1207755300.1207755461.8150.gz I've watched it run, and the Downloads window just sits there and doesn't close with referrer.goes as the only entry after the test completes.
Assignee | ||
Comment 19•16 years ago
|
||
Uh.. very strange. Right after the "ok()" for PASS - Got referrer on finish, it calls finish(), so I don't see why it would time out..
Comment 20•16 years ago
|
||
If I comment out the "file.remove(false);" immediately before the finish() in the unit test, the test finishes without timing out. Thoughts on this? I'm not sure what file.remove(false) is doing, and I'll also note that this test works without change on other win2k3 boxes without the change.
Assignee | ||
Comment 21•16 years ago
|
||
Chris: Try this patch?
Assignee | ||
Comment 22•16 years ago
|
||
Oh duh. Windows has strange stuff with removing files, yeah try/catch it.
Assignee | ||
Comment 23•16 years ago
|
||
Checking in toolkit/mozapps/downloads/tests/browser/browser_bug_406857.js; /cvsroot/mozilla/toolkit/mozapps/downloads/tests/browser/browser_bug_406857.js,v <-- browser_bug_406857.js new revision: 1.7; previous revision: 1.6 done
Attachment #314633 -
Attachment is obsolete: true
Comment 24•16 years ago
|
||
That did the trick. Thanks!
Comment 25•16 years ago
|
||
This unit test should have been an xpcshell unit test instead of a browser test. Any reason why we went with a browser test instead?
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•