Closed
Bug 1139914
Opened 10 years ago
Closed 9 years ago
Downloads with blocked data should be persisted across sessions
Categories
(Toolkit :: Downloads API, defect, P1)
Toolkit
Downloads API
Tracking
()
Tracking | Status | |
---|---|---|
firefox48 | --- | verified |
People
(Reporter: Paolo, Assigned: Paolo)
References
(Blocks 4 open bugs)
Details
(Whiteboard: [fxprivacy])
Attachments
(1 file)
While testing bug 1137909 it seemed to me that downloads with blocked data aren't persisted across sessions, leaving untracked ".part" files around.
Assignee | ||
Updated•10 years ago
|
Flags: firefox-backlog+
Updated•9 years ago
|
Flags: firefox-backlog+ → qe-verify?
Whiteboard: [fxprivacy]
Assignee | ||
Updated•9 years ago
|
Flags: qe-verify? → qe-verify+
Updated•9 years ago
|
Priority: -- → P3
Updated•9 years ago
|
Priority: P3 → P2
Updated•9 years ago
|
Priority: P2 → P1
Comment 1•9 years ago
|
||
Temporary reduction in priority to keep team in scope for release.
Priority: P1 → P2
Assignee | ||
Comment 2•9 years ago
|
||
I confirm that downloads are not persisted and the part file is forgotten after a browser restart. At a minimum, we'll need to persist the download in "downloads.json" until the blocked data is removed or the download is unblocked, keeping the information about the verdict that will be added in bug 1254100.
Since in the current design we don't persist the verdict indication once a decision is made to unblock the download, we don't need to store this additional information in the browser history if the download is unblocked. However, if the block is confirmed, we might have to display a different icon based on the verdict type, so we might still need to store the information to handle this case, or use the same icon for all downloads blocked in the past.
Depends on: 1254100
Updated•9 years ago
|
Priority: P2 → P1
Updated•9 years ago
|
QA Contact: paul.silaghi
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → paolo.mozmail
Iteration: --- → 48.1 - Mar 21
Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/40461/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/40461/
Attachment #8731245 -
Flags: review?(mak77)
Assignee | ||
Comment 4•9 years ago
|
||
Note that this change requires manual testing, we don't have regression tests across restarts.
Comment 5•9 years ago
|
||
(In reply to :Paolo Amadini from comment #4)
> Note that this change requires manual testing, we don't have regression
> tests across restarts.
well, ideally now we have marionette.
Comment 6•9 years ago
|
||
(In reply to Marco Bonardo [::mak] from comment #5)
> (In reply to :Paolo Amadini from comment #4)
> > Note that this change requires manual testing, we don't have regression
> > tests across restarts.
>
> well, ideally now we have marionette.
To be clear, make a list of things that should be tested across restarts, and send it to :whimboo. Since now firefox UI tests (able to restart the browser) are in-tree, we can start collecting things we should be testing in those paths, and figure out if we can improve the process of adding new "ui" tests.
Comment 7•9 years ago
|
||
Comment on attachment 8731245 [details]
MozReview Request: Bug 1139914 - Downloads with blocked data should be persisted across sessions. r=mak
https://reviewboard.mozilla.org/r/40461/#review37283
off-hand, you may write a test without a real restart. Just simulate a download (so that metadata is stored) clear the session data, at that point the history downloads view should load from the stored metadata.
::: browser/components/downloads/content/allDownloadsViewOverlay.js:83
(Diff revision 1)
> ? { becauseBlockedByParentalControls: true }
> : metaData.state == nsIDM.DOWNLOAD_DIRTY
> - ? { becauseBlockedByReputationCheck: true }
> + ? { becauseBlockedByReputationCheck: true,
> + reputationCheckVerdict:
> + metaData.reputationCheckVerdict || "" }
> : null;
sorry, this starts being unreadable...
What about a plain if/else if/else?
I think we also have a (currently disabled) eslint rule to avoid nesting conditional operators
Attachment #8731245 -
Flags: review?(mak77) → review+
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to Marco Bonardo [::mak] from comment #6)
> To be clear, make a list of things that should be tested across restarts,
> and send it to :whimboo. Since now firefox UI tests (able to restart the
> browser) are in-tree, we can start collecting things we should be testing in
> those paths, and figure out if we can improve the process of adding new "ui"
> tests.
It would be good to share the code that sets up the fake download sources and use it during the automated tests, whether they test the actual UI or the JSON storage.
Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8731245 [details]
MozReview Request: Bug 1139914 - Downloads with blocked data should be persisted across sessions. r=mak
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/40461/diff/1-2/
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Marco Bonardo [::mak] from comment #6)
> To be clear, make a list of things that should be tested across restarts,
> and send it to :whimboo.
I filed bug 1258194 for these end-to-end tests, but I don't see this happening very soon given the complexity of such tests. I filed bug 1258195 about doing something simpler without a real restart like you suggested.
Something even simpler can be done in bug 1258192 as unit tests checking the DownloadStore and DownloadIntegration behavior, although this would only deal with downloads stored in "downloads.json", such as blocked downloads that can be unblocked, and would not apply to anything in the Places database.
Comment 12•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Comment 13•9 years ago
|
||
I'm not sure how to test this.
All I see is that if before the fix, "unblock" option for a blocked download was gone after a browser restart, now it persists.
Flags: needinfo?(paolo.mozmail)
Assignee | ||
Comment 14•9 years ago
|
||
(In reply to Paul Silaghi, QA [:pauly] from comment #13)
> I'm not sure how to test this.
> All I see is that if before the fix, "unblock" option for a blocked download
> was gone after a browser restart, now it persists.
Yes, this is what we need to test for now.
When we'll add new types of blocked downloads, we should ensure that their state also persists across restarts.
Flags: needinfo?(paolo.mozmail)
Comment 15•9 years ago
|
||
Is it expected that blocked downloads are still listed in the downloads panel after restart?
Flags: needinfo?(paolo.mozmail)
Assignee | ||
Comment 16•9 years ago
|
||
(In reply to Paul Silaghi, QA [:pauly] from comment #15)
> Is it expected that blocked downloads are still listed in the downloads
> panel after restart?
Yes. Actually, we should probably expire them and delete the temporary file on disk after some time automatically, which we currently don't.
Flags: needinfo?(paolo.mozmail)
Comment 17•9 years ago
|
||
One more observation: the selection rectangle is not displayed in the downloads panel for the blocked downloads - let me know if this is not expected.
Verified fixed using http://testsafebrowsing.appspot.com/ on FX 48.0a1 (2016-04-07) Win7, Ubuntu 14.04, OS X 10.10.5.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•