Commit Graph

335 Commits

Author SHA1 Message Date
Dão Gottwald
f7372f4e9d Bug 1758294 - Download panel context menu acts on the first item in the list instead of the one clicked on. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D142060
2022-03-25 19:04:04 +00:00
Butkovits Atila
24c012b6d1 Bug 1742678 - disable browser_download_spam_protection.js on Linux_64 for frequent failures. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D141927
2022-03-24 04:47:35 +00:00
Shane Hughes
b2e8360ad3 Bug 1755570 - Add download deleted state to UI. r=Gijs
Add a new property to downloads such that downloaded files deleted from within
Firefox (currently just by the context menu item) are marked "File deleted"
instead of "File moved or missing" (this adds a new translation). Also refactor
downloadsCmd_deleteFile and downloadsCmd_cancel to clean up some related issues.
Add a new download history metadata property so that Firefox can persist this
"File deleted" state between sessions.

This should resolve bug 1755570 as well as bug 1755728. Bug 1755729 is a
separate issue, more like an enhancement, because missing/moved downloads have
never allowed resume/retry. They couldn't be resumed as they were stopped, not
paused. They could conceivably be retried but this would be adding a whole lot
of new core download logic, since the target and saver are in a very different
state for a stopped download with a deleted file than what they'd be if the
download was merely canceled.

So, this patch won't give the user an opportunity to resume/retry deleted
downloads. Previously we had a problem where we made it look like you could
retry a download if you used the "delete file" command while the download was in
progress. This patch will make sure that using the "delete file" command
actually finalizes the download. So it will just fix the immediate problem where
some menuitems and buttons simply don't work in edge cases. A later patch can
implement a new affordance that will allow "retrying" downloads that were
already downloaded/interrupted and deleted, whether from within Firefox or not.

Differential Revision: https://phabricator.services.mozilla.com/D139356
2022-03-16 22:10:18 +00:00
Barret Rennie
4ab7722bee Bug 1753369 - Use sync PathUtils directory getters on mainthread in browser/components/downloads r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D140129
2022-03-10 15:16:38 +00:00
Dão Gottwald
9d5d922987 Bug 1756113 - Bring focus styling in the download panel in line with other panels. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D139323
2022-03-01 15:15:29 +00:00
Gijs Kruitbosch
24e6c0954c Bug 1753004, r=mhowell
Depends on D138641

Differential Revision: https://phabricator.services.mozilla.com/D138321
2022-02-15 17:08:09 +00:00
Gijs Kruitbosch
493547f63d Bug 1732129 - don't allow customize mode to permanently break the downloads button in a window, r=mhowell
Both for minimized windows and if there is no anchor, we bail out from showing the panel.
However, only one of those cases currently resets the internal state flag to 'hidden'.
This patch ensures both cases do so, and for good measure ensures that if openPopup
throws (which apparently it can?) we also reset the state in that case, rather than
leaving ourselves with a permanently broken state.

Differential Revision: https://phabricator.services.mozilla.com/D136809
2022-01-25 17:08:59 +00:00
Gijs Kruitbosch
b54592c0a1 Bug 1741076 - do not open the download panel if the window is not active, r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D135710
2022-01-25 09:40:11 +00:00
Shane Hughes
12d3b00abc Bug 1751076 - Fix downloads context menu delete file test. r=Gijs
The delete file menuitem in the downloads context menu no longer
removes the download list item on its own, so the test needs an
explicit cleanup callback to remove the download it creates.

Differential Revision: https://phabricator.services.mozilla.com/D136577
2022-01-21 19:07:16 +00:00
Shane Hughes
f003281461 Bug 1723712 - Disable downloads context menu items when inapplicable. r=Gijs
The "Go To Download Page" menuitem in the downloads panel context menu
currently is always visible, even if the download is missing referrer
info. A download source should ideally always have referrer info,
but it's worth having a fallback so user doesn't see failures.
This patch also adds hiding for the "Copy Location" menuitem in the
unlikely event that a download is lacking a source or the source is
somehow lacking a URL. It implements a test to confirm hiding works.
I checked other downloads panel context menu tests to make sure they
aren't broken by the menuitems potentially being hidden.
This shouldn't close Bug 1723712 since we should ensure all downloads
have referrer info. This is just a stopgap in the meantime.

Differential Revision: https://phabricator.services.mozilla.com/D136457
2022-01-21 10:47:08 +00:00
Shane Hughes
ca18cbe0a0 Bug 1750484 - Option to make the "Delete" download menuitem not remove history. r=Gijs,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D136110
2022-01-19 18:45:09 +00:00
Barret Rennie
8a0620bc7b Bug 1747461 - Remove FileUtils.getFile from browser/components/downloads r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D134897
2022-01-19 18:37:25 +00:00
Shane Hughes
9f68e99f99 Bug 1750504 - Hide Open in System Viewer menuitem if file is missing. r=Gijs
Fix test file description.

Differential Revision: https://phabricator.services.mozilla.com/D136117
2022-01-17 16:09:13 +00:00
Sam Foster
756ed30259 Bug 1747422 - Rename the allDownloads list box. r=dao
* Having a different id for the container of download items in the download panel vs the all-downloads view (about:downloads and the library/places view) is one of the main reasons we need the %define item, to allow the same included stylesheet to apply to the different markup by virtue of the different selector produced when @item@ is expanded
* As these IDs aren't particularly descriptive, and the distinction isn't meaningful, having each list use the same id allows more direct stylesheet reuse in both places

Differential Revision: https://phabricator.services.mozilla.com/D135399
2022-01-16 10:54:32 +00:00
Gijs Kruitbosch
2c6b368a9c Bug 1749028, r=dveditz,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D135398
2022-01-13 00:01:14 +00:00
Cristian Tuns
3bd242b7ec Backed out changeset b1d00f32893d (bug 1749028) for causing mochitest failures on test_expandable.xhtml CLOSED TREE 2022-01-12 09:01:36 -05:00
Gijs Kruitbosch
860d33e346 Bug 1749028, r=dveditz,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D135398
2022-01-12 12:40:20 +00:00
Shane Hughes
148a7d5fa5 Bug 1745624 - Add "Delete" menuitem to downloads panel context menu. r=Gijs,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D135188
2022-01-12 11:07:44 +00:00
Neil Deakin
c491f343b3 Bug 1747478, move mouse pointer before starting test to fix intermittent failure on some macs, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D134781
2022-01-05 18:04:57 +00:00
Sebastian Hengst
343879329a Bug 1747478 - Temporarily disable browser_downloads_keynav.js on macOS 11. DONTBUILD
The test started to fail permanently on macOS 11 after the changes in
bug 1742530. Disable the testt until the issue can be resolved after the
holidays.

Differential Revision: https://phabricator.services.mozilla.com/D134687
2021-12-25 22:58:09 +00:00
Neil Deakin
2449372add Bug 1742530, support key and tab navigation within the downloads panel list, r=mak,desktop-theme-reviewers,dao
Cursor up and down navigate between items and the footer, and tab navigates between the list itself, the button for the selected item, and the footer

Differential Revision: https://phabricator.services.mozilla.com/D133433
2021-12-23 17:24:08 +00:00
Cristian Tuns
f85e32fa1c Bug 1743263 - disable browser_download_spam_protection.js on linux64 opt r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D134390
2021-12-23 06:15:08 +00:00
Katherine Patenio
ed0b6f975d Bug 1743226 - improve downloads user experience r=mhowell,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D133805
2021-12-21 16:58:35 +00:00
Anny Gakhokidze
4e73a84e63 Bug 1721217 - Part 3: Fix tests that try to open URIs for download, r=nika,preferences-reviewers
Previously, the tests were waiting for the load event, which was being emitted
for the initial about:blank. With the pref enabled, this event is no longer
propagated/fired to the content process. Instead of notifying the content
process that it needs to emit a load event for about:blank, we can instead make
the tests wait for a STATE_STOP event.

Differential Revision: https://phabricator.services.mozilla.com/D126843
2021-12-16 22:27:16 +00:00
Molly Howell
de8bdb4b40 Bug 1741441 - When the download panel is opened, focus the first item. r=Gijs
As suggested by :jamie, this patch causes focus to move to the item at the top of the list whenever the download panel is shown. In the event that the download panel is opened automatically because a new download has been started, this will have the effect of always bringing the new download directly to the attention of accessibility tools (because the panel itself also receives focus).

Differential Revision: https://phabricator.services.mozilla.com/D133160
2021-12-14 17:48:06 +00:00
Barret Rennie
63f941e34d Bug 1745349 - Remove OS getter from browser/components/downloads tests r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D133461
2021-12-10 13:23:54 +00:00
Bernard Igiri
5099419211 Bug 1733621 - Verify that user preferences are honored when improvements_to_download_panel is set r=Gijs
Added unit tests to verify that various file types and header configurations follow the mime preferredAction settings correctly when improvements_to_download_panel is set.

Differential Revision: https://phabricator.services.mozilla.com/D127759
2021-12-09 14:47:17 +00:00
Katherine Patenio
7e91fcdaf6 Bug 1740840 - use mimeinfo content type to fix downloads intermittent alwaysOpenSimilarFiles. r=Gijs,mtigley
Patch addresses intermittent issue with the context menu item alwaysOpenSimilarFiles for the Downloads Panel by using the content type provided by MimeService, rather than relying on download instance. Not only does this ensure that content type exists, but it happens to also have the benefit of making alwaysOpenSimilarFiles available to more file types that can be supported. browser_downloads_panel_context_menu.js was modified to register mimeInfo and add more test cases for visibility with application/octet-stream.

Differential Revision: https://phabricator.services.mozilla.com/D131881
2021-12-01 17:40:00 +00:00
Narcis Beleuzu
6e9d812757 Backed out 12 changesets (bug 1721217) for bc failures on browser_TopLevelNavigationDelegate.js
Backed out changeset 5fe3c617d521 (bug 1721217)
Backed out changeset c131e4a6d9d5 (bug 1721217)
Backed out changeset a59210a5b400 (bug 1721217)
Backed out changeset 74362b0c39c0 (bug 1721217)
Backed out changeset c8075b91d660 (bug 1721217)
Backed out changeset 46512deaf0e5 (bug 1721217)
Backed out changeset b38bc569d227 (bug 1721217)
Backed out changeset ee9bd012fda8 (bug 1721217)
Backed out changeset 7aa2726a0982 (bug 1721217)
Backed out changeset 885ced5f4bb4 (bug 1721217)
Backed out changeset 7d3f99ca3f44 (bug 1721217)
Backed out changeset 2f5a0164679a (bug 1721217)
2021-12-01 03:38:10 +02:00
Anny Gakhokidze
ca0f41d831 Bug 1721217 - Part 3: Fix tests that try to open URIs for download, r=nika,preferences-reviewers
Previously, the tests were waiting for the load event, which was being emitted
for the initial about:blank. With the pref enabled, this event is no longer
propagated/fired to the content process. Instead of notifying the content
process that it needs to emit a load event for about:blank, we can instead make
the tests wait for a STATE_STOP event.

Differential Revision: https://phabricator.services.mozilla.com/D126843
2021-11-30 16:31:35 +00:00
Micah Tigley
d3f7dd0517 Bug 1739145 - Create the DownloadSpamProtection module when needed. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D132178
2021-11-26 22:58:01 +00:00
Butkovits Atila
b29a00171e Backed out changeset 0b1c2e4169ab (bug 1739145) for causing failures at browser_download_spam_protection.js. CLOSED TREE 2021-11-26 19:10:38 +02:00
Micah Tigley
31a8b06dc7 Bug 1739145 - Create the DownloadSpamProtection module when needed. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D132178
2021-11-26 16:35:11 +00:00
Narcis Beleuzu
96c4882d22 Backed out 11 changesets (bug 1721217) for bc failures on browser_scrollPositions.js . CLOSED TREE
Backed out changeset 750f4a84b30e (bug 1721217)
Backed out changeset c4eb4ad769ad (bug 1721217)
Backed out changeset 81af11d67439 (bug 1721217)
Backed out changeset 548f2441b7c6 (bug 1721217)
Backed out changeset cd584129321a (bug 1721217)
Backed out changeset f5f5291d1da8 (bug 1721217)
Backed out changeset 9ad66ceec1e2 (bug 1721217)
Backed out changeset 10b53a21bb23 (bug 1721217)
Backed out changeset 3755cfbe22fe (bug 1721217)
Backed out changeset 71436dc6c4c4 (bug 1721217)
Backed out changeset ecf33b73ae60 (bug 1721217)
2021-11-26 01:51:03 +02:00
Anny Gakhokidze
e7c848eda4 Bug 1721217 - Part 3: Fix tests that try to open URIs for download, r=nika,preferences-reviewers
Previously, the tests were waiting for the load event, which was being emitted
for the initial about:blank. With the pref enabled, this event is no longer
propagated/fired to the content process. Instead of notifying the content
process that it needs to emit a load event for about:blank, we can instead make
the tests wait for a STATE_STOP event.

Differential Revision: https://phabricator.services.mozilla.com/D126843
2021-11-25 20:40:57 +00:00
Ava Katushka ava8katushka
69c0056122 Bug 1725354 - Download panel shows blocked download item. r=mtigley,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D123943
2021-11-23 17:13:39 +00:00
Molly Howell
a9d0247475 Bug 1738372 - Add a pref to control whether the downloads panel opens on every new download. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D130931
2021-11-17 00:17:40 +00:00
Marian-Vasile Laza
7a330a71ce Backed out changeset 50ad5f64e5ba (bug 1738372) for causing bc failures on browser_downloads_panel_opens.js. 2021-11-16 02:50:05 +02:00
Molly Howell
dae847d8b3 Bug 1738372 - Add a pref to control whether the downloads panel opens on every new download. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D130931
2021-11-16 00:03:27 +00:00
Narcis Beleuzu
b8863df7b0 Backed out changeset a9a15832f816 (bug 1725354) for bc failures on browser_download_privatebrowsing.js 2021-11-05 23:22:42 +02:00
Ava Katushka ava8katushka
cc523e31bb Bug 1725354 - Download panel shows blocked download item. r=mtigley,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D123943
2021-11-05 20:12:43 +00:00
raquelvargas
5fa50e2698 Bug 1738245 - Remove OS.File usage from various browser/ tests. r=Standard8,robwu
Differential Revision: https://phabricator.services.mozilla.com/D129972
2021-11-05 16:49:48 +00:00
Cristian Tuns
a4c3a9bab0 Backed out changeset b855af57f71a (bug 1725354) for causing mochitest failures on test_third_party_iframes.html CLOSED TREE 2021-11-03 12:45:48 -04:00
Ava Katushka ava8katushka
3ed44717ab Bug 1725354 - Download panel shows blocked download item. r=mtigley,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D123943
2021-11-03 15:31:13 +00:00
Marian-Vasile Laza
88c0f2b93d Backed out changeset a045ce98e572 (bug 1738245) for causing xpcshell failures on test_MigrationUtils_timedRetry.js. CLOSED TREE 2021-11-03 17:17:12 +02:00
raquelvargas
92388a5506 Bug 1738245 - Remove OS.File usage from various browser/ tests. r=Standard8,robwu
Differential Revision: https://phabricator.services.mozilla.com/D129972
2021-11-03 08:05:31 +00:00
Miriam Onuoha
b163f7bf3c Bug 1737306 - Remove osfile.jsm usage from browser/components/downloads/test/. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D129580
2021-10-27 18:53:14 +00:00
Katherine Patenio
78d2b57bcc Bug 1731086 - Add a new context menu item for setting the mimetype entry from about:preferences. r=mtigley,fluent-reviewers,jaws,flod
Differential Revision: https://phabricator.services.mozilla.com/D127592
2021-10-21 16:28:42 +00:00
Joel Maher
f72bcee13e Bug 1727943 - turn on mochitest* tests that were skipped on win10-ccov and now pass. r=MasterWayZ
Differential Revision: https://phabricator.services.mozilla.com/D128817
2021-10-19 20:01:29 +00:00
Michelle Goossens
575ccf89a0 Bug 1727943 - Part 2: Migrate mochitest, reftest and crashtest Windows 10 ccov suites from AWS to Azure r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D125350
2021-09-28 15:27:39 +00:00