Commit graph

1739 commits

Author SHA1 Message Date
Sam Foster
7075d4e4c8 Bug 1845836 - Include closed tabs from closed windows in fxview-next's recently closed tabs list. r=kcochrane,dao,fxview-reviewers,sessionstore-reviewers,sclements
* Add a browser.sessionstore.closedTabsFromClosedWindows pref and consult it when building recently-closed tab lists in firefoxview-next
* Add a _resolveClosedDataSource to SessionStore which allows us to find the window state and _closedTabs given a DOMWindow, a window closedId, or a window session store Id.
* Carry window closedId and source window Id into tab items when building recently-closed tab lists in firefoxview-next. This gives us the necessary context when we need to undoClose or forget a tab item in the list.
* Add a getClosed TabCount and TabData for Closed Windows method to SessionStore
* Modify undoCloseTab and forgetClosedTab to accept source params we can resolve to window state data using _resolveClosedDataSource

Differential Revision: https://phabricator.services.mozilla.com/D185108
2023-08-22 20:42:57 +00:00
Cosmin Sabou
edca52235d Bug 1838996 - Disable browser_restoreLastClosedTabOrWindowOrSession.js on mac !debug for frequent failures. r=intermittent-reviewers,sclements,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D185856
2023-08-12 05:07:58 +00:00
Sam Foster
165bfa3ba4 Bug 1847617 - Add about:home to the list of URLs we filter out when deciding if a closing window has state that should be saved. r=dao,sessionstore-reviewers
* And fix the urlbar test that breaks now that about:home tabs with no history aren't saved when closed.

Differential Revision: https://phabricator.services.mozilla.com/D185605
2023-08-11 19:14:51 +00:00
Cristian Tuns
dcf50463d3 Backed out changeset 4ab6eb349233 (bug 1847617) for causing bc failures in /browser_aboutHomeLoading.js CLOSED TREE 2023-08-08 23:57:39 -04:00
Sam Foster
df35ca0918 Bug 1847617 - Add about:home to the list of URLs we filter out when deciding if a closing window has state that should be saved. r=dao,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185605
2023-08-08 23:05:51 +00:00
Sam Foster
6e8f34b18c Bug 1842610 - Add SessionStore.forgetClosedWindowById and forgetClosedTabById and update RecentlyClosedTabsInView to use the new forget and aggregated getClosedTabData methods. r=kcochrane,fxview-reviewers,sessionstore-reviewers,dao,sclements
* We already make use of the closedId in RecentlyClosedTabsInView to re-open the tab via SS.undoCloseById so it made sense to do the same for forgetting a closed tab
* In the test setup, one of tabs is opened and closed in a different window. This gives us coverage both for the closed tab list rendering, as well as re-opening and forgeting tabs with different source windows
* Both the forget-by-closed-id methods match undoClosedById's behavior and throw if the closedId doesnt match a closed window or tab

Differential Revision: https://phabricator.services.mozilla.com/D184192
2023-07-31 18:54:43 +00:00
Sarah Clements
60b9182aac Bug 1845521 - Refactor browser_restoreLastClosedTabOrWindowOrSession test file r=sessionstore-reviewers,dao
* Split test_undo_last_action_correct_order into separate file

Differential Revision: https://phabricator.services.mozilla.com/D184813
2023-07-28 16:22:22 +00:00
Sarah Clements
5dd382714c Bug 1845067 - Add test case to browser_restoreLastClosedTabOrWindowOrSession.js r=sfoster,sessionstore-reviewers
* tests that the _lastClosedActions list is truncated correctly in _addClosedAction

Differential Revision: https://phabricator.services.mozilla.com/D184368
2023-07-25 11:17:11 +00:00
Tooru Fujisawa
cdebb55709 Bug 1766765 - Update the comment that mentions ContentLinkHandler.jsm to point FaviconLoader.sys.mjs instead. r=Gijs DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D183641
2023-07-18 19:59:26 +00:00
Sarah Clements
7e6847ff4f Bug 1820660 - Persist recently closed tabs between sessions r=dao,sfoster,extension-reviewers,sessionstore-reviewers,robwu
* For cases where a user does not have automatic session restore enabled, recently closed
tabs will persist between sessions and previously open tabs will be added to the recently closed tabs
list; upon manual session restore, the previously open tabs will reopen and be removed from the closed tabs list

* Add marionette test and fix test bustages due to these changes.

Differential Revision: https://phabricator.services.mozilla.com/D178521
2023-07-18 10:40:00 +00:00
Sam Foster
224b568ae4 Bug 1819675 - Introduce a feature pref to toggle the recently-closed tabs from all windows behavior.r=sclements,dao,extension-reviewers,fxview-reviewers,robwu,sessionstore-reviewers
* Add a default-true pref to provide an escape hatch allowing us to revert to previous behavior
* in which recently-closed tabs are per-window,
* and undoing closed tabs restores them to the window they were closed from.
* Ensure we set the pref for tests which depend on its value
* Add some spot-checks in tests with the pref off

Differential Revision: https://phabricator.services.mozilla.com/D179574
2023-07-06 22:49:52 +00:00
Sam Foster
a24c7b1d6b Bug 1819675 - Include tabs from all windows in all views of recently-closed tabs and re-open them into the current window. r=dao,sclements,fxview-reviewers,fluent-reviewers,flod,robwu,sessionstore-reviewers,tabbrowser-reviewers
* Menu Bar History menu recently-closed tab items includes closed tabs from all currently-open windows
* Toolbar/Appmenu history menu recently-closed tabs list includes closed tabs from all currently-open windows
* Firefox view recently-closed tab list includes closed tabs from all currently-open windows
* All recently-closed tab menu/items re-open in the current window
* Re-open all tabs menu item re-opens all tabs into the current window

* Ensure we filter out tabs without any useful state in firefox-view
* Add a target window argument to undoCloseTab and undoCloseById
* undoCloseTab will remove the tab data from the source window collection and re-open the tab into the target window
* Add an options argument to SessionStore.getWindows to get all private or non-private windows
* Add a getWindowForTabClosedId method on SessionStore, allowing look-up of the window associated with a closed tab
* Ensure recently-closed tab lists only include tabs from non-private windows when attached (i.e. opened from) a non-private window. And vice-versa.
* Update the sessionstore closed tab tests to assert on the new behavior

* Update the browser.sessions.restore implementation to always find and pass the source window when restoring a closed tab
* sessions.restore should always restore closed tabs to the source window as there's no implicit top or current window in the API context

Differential Revision: https://phabricator.services.mozilla.com/D174501
2023-07-06 22:49:52 +00:00
Cosmin Sabou
f16c094fd9 Backed out 2 changesets (bug 1819675) for causing a spike in wpt and browser-chrome failures.
Backed out changeset aa4368bfb81a (bug 1819675)
Backed out changeset e5be8edfd9cf (bug 1819675)
2023-07-08 13:44:40 +03:00
Sam Foster
a4876c8eb5 Bug 1819675 - Introduce a feature pref to toggle the recently-closed tabs from all windows behavior.r=sclements,dao,extension-reviewers,fxview-reviewers,robwu,sessionstore-reviewers
* Add a default-true pref to provide an escape hatch allowing us to revert to previous behavior
* in which recently-closed tabs are per-window,
* and undoing closed tabs restores them to the window they were closed from.
* Ensure we set the pref for tests which depend on its value
* Add some spot-checks in tests with the pref off

Differential Revision: https://phabricator.services.mozilla.com/D179574
2023-07-06 22:49:52 +00:00
Sam Foster
39d8ed9ddf Bug 1819675 - Include tabs from all windows in all views of recently-closed tabs and re-open them into the current window. r=dao,sclements,fxview-reviewers,fluent-reviewers,flod,robwu,sessionstore-reviewers,tabbrowser-reviewers
* Menu Bar History menu recently-closed tab items includes closed tabs from all currently-open windows
* Toolbar/Appmenu history menu recently-closed tabs list includes closed tabs from all currently-open windows
* Firefox view recently-closed tab list includes closed tabs from all currently-open windows
* All recently-closed tab menu/items re-open in the current window
* Re-open all tabs menu item re-opens all tabs into the current window

* Ensure we filter out tabs without any useful state in firefox-view
* Add a target window argument to undoCloseTab and undoCloseById
* undoCloseTab will remove the tab data from the source window collection and re-open the tab into the target window
* Add an options argument to SessionStore.getWindows to get all private or non-private windows
* Add a getWindowForTabClosedId method on SessionStore, allowing look-up of the window associated with a closed tab
* Ensure recently-closed tab lists only include tabs from non-private windows when attached (i.e. opened from) a non-private window. And vice-versa.
* Update the sessionstore closed tab tests to assert on the new behavior

* Update the browser.sessions.restore implementation to always find and pass the source window when restoring a closed tab
* sessions.restore should always restore closed tabs to the source window as there's no implicit top or current window in the API context

Differential Revision: https://phabricator.services.mozilla.com/D174501
2023-07-06 22:49:52 +00:00
Adam Vandolder
e0fc545cbc Bug 1556358 - Part 3: Restore FACE state in SessionStore. r=edgar,farre
Depends on D174115

Differential Revision: https://phabricator.services.mozilla.com/D179278
2023-06-28 16:28:27 +00:00
Mike Conley
c276d2c608 Bug 1838871 - Fallback to previous behaviour of Ctrl-Shift-T if the in-memory undo actions list is empty. r=dao,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D181273
2023-06-16 20:22:46 +00:00
Butkovits Atila
4bf8c41fca Backed out changeset b8fcfbd2c5e9 (bug 1838871) for causing failures at browser_restoreLastClosedTabOrWindowOrSession.js. CLOSED TREE 2023-06-16 22:05:16 +03:00
Mike Conley
f0269d26fb Bug 1838871 - Fallback to previous behaviour of Ctrl-Shift-T if the in-memory undo actions list is empty. r=dao,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D181273
2023-06-16 17:57:23 +00:00
Stanca Serban
cb33cee97e Backed out 3 changesets (bug 1556358) for causing Bb build bustages in ElementInternals.cpp. CLOSED TREE
Backed out changeset f7e94ea82252 (bug 1556358)
Backed out changeset c80f29a9cefc (bug 1556358)
Backed out changeset 413225d91666 (bug 1556358)
2023-06-16 19:46:02 +03:00
Adam Vandolder
61ab1463b6 Bug 1556358 - Part 3: Restore FACE state in SessionStore. r=edgar,farre
Depends on D174115

Differential Revision: https://phabricator.services.mozilla.com/D179278
2023-06-16 15:02:11 +00:00
Sarah Clements
eb795dabb9 Bug 1833416 - modify undoClosedTab keyboard shortcut r=mconley,sfoster,sessionstore-reviewers,dao
* This patch expands this keyboard shortcut to support whichever of the three
last actions were taken - last tab closed, last window closed or session restore.
* Existing test file was renamed and additional cases added.

Differential Revision: https://phabricator.services.mozilla.com/D178965
2023-06-15 13:28:26 +00:00
Noemi Erli
c9a78e6659 Backed out 3 changesets (bug 1556358) for causing bustages in ElementInternals.cpp CLOSED TREE
Backed out changeset 0ebda393786b (bug 1556358)
Backed out changeset c41794eef66a (bug 1556358)
Backed out changeset a07e3e226569 (bug 1556358)
2023-06-15 01:32:38 +03:00
Adam Vandolder
8149717b64 Bug 1556358 - Part 3: Restore FACE state in SessionStore. r=edgar,farre
Depends on D174115

Differential Revision: https://phabricator.services.mozilla.com/D179278
2023-06-14 20:59:29 +00:00
Cosmin Sabou
c884b4c9ec Backed out changeset 0e2af922ec2a (bug 1820660) for causing webdriver failures on add_cookie/user_prompts.py. CLOSED TREE 2023-06-13 13:52:12 +03:00
Sarah Clements
46eac9314d Bug 1820660 - Persist recently closed tabs between sessions r=dao,sfoster,extension-reviewers,sessionstore-reviewers,robwu
* For cases where a user does not have automatic session restore enabled, recently closed
tabs will persist between sessions and previously open tabs will be added to the recently closed tabs
list; upon manual session restore, the previously open tabs will reopen and be removed from the closed tabs list

* Add marionette test and fix test bustages due to these changes.

Differential Revision: https://phabricator.services.mozilla.com/D178521
2023-06-13 08:58:17 +00:00
Mark Banner
6725448902 Bug 1834176 - Convert consumers of NetUtil.jsm to import the ES module directly. r=arai,webdriver-reviewers,perftest-reviewers,valentin,extension-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,robwu,afinder,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D178589
2023-06-07 08:42:36 +00:00
Malte Juergens
f94e772e2c Bug 1835983: Update browser/components/sessionstore/test/browser_userTyped_restored_after_discard.js to work with https-first enabled r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D179524
2023-05-31 09:53:17 +00:00
Sam Foster
a3004a21be Bug 1819675 - rename SessionStore.getClosedTabCount and getClosedTabData to getClosedTabCountForWindow and getClosedTabDataForWindow. r=dao,fxview-reviewers,kcochrane
- As closed tabs will change to mean closed tabs from all windows, rename these functions to make
  changes in later patches clearer when we mean closed tabs from this window specifically, or closed
  tabs for all private/non-private windows

Differential Revision: https://phabricator.services.mozilla.com/D177849
2023-05-30 18:54:12 +00:00
Sam Foster
2a2e7b7d39 Bug 1819675 - Add some basic tests for SessionStore's closed tab functions with multiple open windows r=dao
* Verify the main recently-closed tabs functions of SessionStore as applied to different windows

Differential Revision: https://phabricator.services.mozilla.com/D178361
2023-05-30 18:54:12 +00:00
Marco Bonardo
b5d4c2d0ad Bug 1834989 - Clean up UrlbarTestUtils use. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D179056
2023-05-26 14:56:55 +00:00
Natalia Csoregi
e87ecf485e Backed out 3 changesets (bug 1834222, bug 1834176) for causing RemoteProcessMonitor failures. CLOSED TREE
Backed out changeset 346d3a1568dd (bug 1834222)
Backed out changeset ea1d8b634bfc (bug 1834176)
Backed out changeset 74d1880272d3 (bug 1834176)
2023-05-24 04:29:45 +03:00
Mark Banner
fbc15bdb60 Bug 1834176 - Convert NetUtil.jsm to be an ES system module. r=arai,webdriver-reviewers,perftest-reviewers,valentin,extension-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,robwu,afinder,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D178589
2023-05-23 19:09:29 +00:00
Noemi Erli
aa2f146d78 Backed out 2 changesets (bug 1834176) for causing xpc failures in test_unload.js CLOSED TREE
Backed out changeset 57876d77a652 (bug 1834176)
Backed out changeset ae2f0837b528 (bug 1834176)
2023-05-23 12:14:37 +03:00
Mark Banner
e3e9a991b8 Bug 1834176 - Convert NetUtil.jsm to be an ES system module. r=arai,webdriver-reviewers,perftest-reviewers,valentin,extension-reviewers,devtools-reviewers,sync-reviewers,cookie-reviewers,robwu,afinder,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D178589
2023-05-23 08:13:08 +00:00
Mark Banner
130a655906 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner
8219a5c503 Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Mark Banner
c2dd8e3266 Bug 1829618 - Enable Prettier on json files (automatic fixes). r=perftest-reviewers,webcompat-reviewers,extension-reviewers,andi,desktop-theme-reviewers,pip-reviewers,devtools-reviewers,sync-reviewers,mossop,denschub,dao,sparky,robwu,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D176336
2023-05-09 16:14:51 +00:00
Daisuke Akatsuka
73dc3820cc Bug 1824040: Make the loading URL opened in _blank target to be the target of Session Restore r=mak,smaug,farre,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D173790
2023-04-14 01:59:44 +00:00
CanadaHonk
91709586ba Bug 1801379 - Migrate Sinon.jsm to an ES module r=extension-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,fxview-reviewers,devtools-reviewers,Standard8,nchevobbe,sclements,dimi,mconley,bytesized,robwu
Migrated `testing/modules/Sinon.sys.mjs` to an ES module.

`testing` should now be 100% ESM 🎉

Differential Revision: https://phabricator.services.mozilla.com/D173643
2023-03-29 07:34:10 +00:00
Gijs Kruitbosch
61b42d9caa Bug 1822854 - add marionette test for manual session restore while a pinned tab is present, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D173071
2023-03-21 16:29:06 +00:00
Abhishek Tiwari
3a7bf0c2e8 Bug 1821620 - Convert toolkit/components/forgetaboutsite to ES modules r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D172230
2023-03-14 21:36:38 +00:00
Siya
d3d2c2d1b5 Bug 1821305 - Convert toolkit/components/crashmonitor/ to ES modules. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D172357
2023-03-13 14:18:06 +00:00
Brad Werth
73c097499a Bug 1631735 Part 4: Make tests that minimize windows wait for size mode change events. r=mstange
Depends on D170841

Differential Revision: https://phabricator.services.mozilla.com/D171626
2023-03-06 19:38:12 +00:00
Mike Conley
dcfcab1e86 Bug 1820207 - await BrowserTestUtils.crashFrame cleaning up crashes in browser_pinned_tabs.js. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D171722
2023-03-06 16:02:17 +00:00
Mike Conley
a8027d5fb7 Bug 1423125 - Restore previous session if undoCloseTab is called with no more tabs to restore. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D171377
2023-03-03 14:06:43 +00:00
Kelly Cochrane
976c5c450b Bug 1801204 - Update recently-closed-tabs.mjs to be template-driven r=sfoster,mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D169010
2023-02-24 21:32:25 +00:00
Peter Van der Beken
d6fe05cdfd Bug 1816697 - Change test annotations for tests that fail/only succeed with session-history-in-parent. r=smaug
Some of the tests that fail (or only succeed) with SHIP are currently marked for
Fission. This makes them fail once we turn on SHIP without Fission.

Differential Revision: https://phabricator.services.mozilla.com/D169824
2023-02-21 14:58:35 +00:00
Joel Maher
a62ef05cdb Bug 1816191 - Skip tests in order to keep win7 running @ azure. r=gbrown,necko-reviewers,settings-reviewers,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,nalexander,sgalich,alwu
Differential Revision: https://phabricator.services.mozilla.com/D169523
2023-02-14 23:44:12 +00:00
Gijs Kruitbosch
387cf24ca0 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 23:50:41 +00:00