Commit Graph

169 Commits

Author SHA1 Message Date
Sarah Clements
cf7801bb42 Bug 1789652 - Overwrite closedIDs when restoring sessions r=Gijs
* Add a helper in sessionstore to rewrite closedId's for all restored tabs
* Add test coverage

Differential Revision: https://phabricator.services.mozilla.com/D157235
2022-09-14 14:58:07 +00:00
Marian-Vasile Laza
d1e176e9a1 Backed out changeset d057e8cf08cf (bug 1789652) for causing bc failures on browser_closedId.js. 2022-09-14 17:02:14 +03:00
Sarah Clements
34758f53dc Bug 1789652 - Overwrite closedIDs when restoring sessions r=Gijs
* Add a helper in sessionstore to rewrite closedId's for all restored tabs
* Add test coverage

Differential Revision: https://phabricator.services.mozilla.com/D157235
2022-09-14 13:08:25 +00:00
Kagami Sascha Rosylight
4fb733cb3b Bug 1773740 - Part 4: Reapply mach -l eslint --fix with use-isInstance changes r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D148939
2022-06-27 20:31:34 +00:00
OnuohaOluebube
bb734d45c8 Bug 1738246 - Removed OS.File usage from various browser/components/sessionstore/ tests r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D129894
2021-11-11 18:21:21 +00:00
Dave Townsend
d076cc4a35 Bug 1733564: Send out SSWindowRestoring when starting to restore an entire window. r=mconley a=reland
Differential Revision: https://phabricator.services.mozilla.com/D127258
2021-10-03 06:27:05 +00:00
Iulian Moraru
3251753e21 Backed out changeset acab07e8dc6a (bug 1733564) for causing mochitest failures. 2021-10-03 12:15:36 +03:00
Dave Townsend
5bebb4583a Bug 1733564: Send out SSWindowRestoring when starting to restore an entire window. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D127258
2021-10-03 06:27:05 +00:00
Andreas Farre
6363db0f16 Bug 1713098 - Make modifySessionStorage use browsing context to get subframe. r=kashav
Differential Revision: https://phabricator.services.mozilla.com/D116102
2021-05-28 07:48:51 +00:00
Kashav Madan
20acb75b2d Bug 1702055 - Fix how the expected SSTabRestored count is calculated in waitForBrowserState, r=nika
SessionStore factors both prefs into the decision about if a tab is restored
lazily, but this helper only uses the `restore_tabs_lazily` pref.

Depends on D114001

Differential Revision: https://phabricator.services.mozilla.com/D114002
2021-05-03 18:16:42 +00:00
Anny Gakhokidze
780445a687 Bug 1698601 - Part 1: Extend existing session store test files with COOP document testing, r=smaug
Modify related test files to test documents with COOP headers enabled.

There are some tests that fail when run with new COOP configurations without
Fission enabled, prior to fixes that come in part 2. This means that some of
the COOP behaviour was already broken. Since fixing non-Fission COOP
behaviour prior to this patch is out of scope, I skipped calling `addCoopTask`
to test COOP documents in non Fission cases for such tests.

Even with COOP headers disabled, some tests fail when the document they load
is served over httpS and not http. For a single test where this behaviour was
occuring prior to fixes in part 2, I skipped testing an HTTPS non-COOP
document and filed 1703351 to fix such behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D110993
2021-04-09 17:46:52 +00:00
Anny Gakhokidze
7d238c3c4a Bug 1630908 - Part 2: Test that we include OriginAttributes in remoteType with Fission enabled, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D101074
2021-01-19 23:00:01 +00:00
Nika Layzell
5456e84b77 Bug 1675334 - Part 3: Remove InChild suffix from promiseOnHistoryReplaceEntry, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D96615
2020-11-16 14:13:27 +00:00
Nika Layzell
0ed640c654 Bug 1675334 - Part 2: Remove SSHistoryReplaceEntry, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D96614
2020-11-16 14:13:20 +00:00
Olli Pettay
517a59e62b Bug 1667449 - Hide fission.sessionHistoryInParent pref getter behind a function r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D91462
2020-09-28 12:01:12 +00:00
Andreas Farre
7ce88283cd Bug 1662410 - Part 2: Fix test infrastructure usage of legacySHistory. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D89711
2020-09-16 14:51:03 +00:00
Kris Maglione
9bddbcfdd1 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
Neil Deakin
edd53edeef Bug 1640221, remove content-forms.js frame script from session store tests. Replace with SpecialPowers.spawn, r=mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D76515
2020-05-26 16:11:09 +00:00
Neil Deakin
f415bd9a6c Bug 1640221, remove content.js frame script from session store tests. Replace with BrowserTestUtils functions and SpecialPowers.spawn, r=mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D76514
2020-05-26 16:10:36 +00:00
Alphan Chen
fbf3532114 Bug 1507287 - Make sessionRestore work with session history living in the parent process. r=peterv,mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D46281
2020-03-19 14:31:52 +00:00
Noemi Erli
24dfe6678b Backed out changeset 4c6b9209306d (bug 1507287) for causing geckoview failures CLOSED TREE 2020-03-16 23:23:09 +02:00
Alphan Chen
afa243f82c Bug 1507287 - Make sessionRestore work with session history living in the parent process. r=peterv,mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D46281
2020-03-16 18:33:32 +00:00
Daniel Varga
1f76c49b49 Backed out changeset e51b4e883adc (bug 1507287) for not having proper review 2020-03-03 18:23:07 +02:00
Alphan Chen
4a2e26cab8 Bug 1507287 - Make sessionRestore work with session history living in the parent process. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D46281
2020-03-03 16:16:03 +00:00
Kris Maglione
7b2657b231 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741
2019-12-13 20:36:24 +00:00
Kris Maglione
8c0d38f33d Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740
2019-12-13 20:36:16 +00:00
shindli
0aa47af90e Backed out 9 changesets (bug 1596918) for causing mochitest permafailures in toolkit/content/tests/chrome/test_findbar_events.xhtml CLOSED TREE
Backed out changeset 45a1c42118f2 (bug 1596918)
Backed out changeset db09910ffa56 (bug 1596918)
Backed out changeset 5c9d9f141c10 (bug 1596918)
Backed out changeset 6a135670d603 (bug 1596918)
Backed out changeset 3a0184e0df72 (bug 1596918)
Backed out changeset 2f0036486823 (bug 1596918)
Backed out changeset a770c6d08d52 (bug 1596918)
Backed out changeset ef062eb7a6ee (bug 1596918)
Backed out changeset a6ea596e98db (bug 1596918)
2019-12-11 03:09:26 +02:00
Kris Maglione
eb68f8b548 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741
2019-12-10 23:07:21 +00:00
Kris Maglione
ad3537fc50 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740
2019-12-10 23:07:13 +00:00
Noemi Erli
21eec8658f Backed out 9 changesets (bug 1596918) for causing multiple browser-chrome failures
Backed out changeset 415007efd8c9 (bug 1596918)
Backed out changeset 011eb5ce927b (bug 1596918)
Backed out changeset e5fd3ee22ea1 (bug 1596918)
Backed out changeset 0bca4de31d40 (bug 1596918)
Backed out changeset 11ec4393f23d (bug 1596918)
Backed out changeset c5404a7c286d (bug 1596918)
Backed out changeset 7e9304405a46 (bug 1596918)
Backed out changeset fa0f0aeabf99 (bug 1596918)
Backed out changeset de196b077000 (bug 1596918)
2019-12-07 22:26:43 +02:00
Kris Maglione
6fb2c35351 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741
2019-12-07 18:44:34 +00:00
Kris Maglione
88fbf261f8 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740
2019-12-07 19:11:58 +00:00
Daniel Varga
85f263a4c2 Backed out 17 changesets (bug 1596918) for multiple browser-chrome and dev-tools failures. On a CLOSED TREE
Backed out changeset ab87d2c1afae (bug 1596918)
Backed out changeset 775f3b06a687 (bug 1596918)
Backed out changeset 67cc63ef5d7f (bug 1596918)
Backed out changeset 7d290bcd2067 (bug 1596918)
Backed out changeset 048db9f4db7c (bug 1596918)
Backed out changeset 96a79d2ba614 (bug 1596918)
Backed out changeset be770d112dd8 (bug 1596918)
Backed out changeset 302c8ab8391c (bug 1596918)
Backed out changeset 44ef8f20732e (bug 1596918)
Backed out changeset 38c11ebfb8ff (bug 1596918)
Backed out changeset b586fc081374 (bug 1596918)
Backed out changeset 12283166716f (bug 1596918)
Backed out changeset 99b0421015d8 (bug 1596918)
Backed out changeset 97ec49dbbbf3 (bug 1596918)
Backed out changeset ec79478f58f1 (bug 1596918)
Backed out changeset c6d356833bb8 (bug 1596918)
Backed out changeset 5ef6026806c8 (bug 1596918)
2019-12-07 03:12:07 +02:00
Kris Maglione
487c4fe9c7 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741
2019-12-06 22:14:22 +00:00
Kris Maglione
e59706f08a Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740
2019-12-06 22:14:14 +00:00
Boris Zbarsky
5c7393e484 Bug 1568278. Remove various unnecessary QIs to nsIDOMWindow. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D39065
2019-07-24 01:26:07 +00:00
Victor Porof
8eb72fd3fc Bug 1561435 - Format browser/components/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36042
2019-07-05 09:53:32 +02:00
Dão Gottwald
e3da7c9ef3 Backed out changeset 3bd9591627ce (bug 1442694) 2019-03-07 11:31:48 +01:00
Doug Thayer
c372c1eb9f Bug 1442694 - Add tests for preopened pinned tabs r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D19463
2019-03-01 18:29:00 +00:00
shindli
641b0ef885 Backed out 2 changesets (bug 1442694) for breaking session restores on update a=backout
Backed out changeset f100f8631f78 (bug 1442694)
Backed out changeset 7a20c79a0e12 (bug 1442694)
2019-02-26 18:32:20 +02:00
Doug Thayer
3a32bb9e80 Bug 1442694 - Add tests for preopened pinned tabs r=Gijs
Depends on D18742

Differential Revision: https://phabricator.services.mozilla.com/D19463
2019-02-25 19:19:30 +00:00
Jonathan Kingston
540181c731 Bug 1521549 - Move (de)serializePrincipal from sessionstore Utils to E10SUtils. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D17261
2019-02-19 02:34:09 +00:00
Kris Maglione
856fa07b17 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750
2019-01-17 10:18:31 -08:00
Mike Conley
01d26b6b56 Bug 1480951 - Regression test. r=mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D5067
2018-09-05 14:35:43 -04:00
Mark Banner
462116b7f9 Bug 1486739 - Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/. r=mossop
Automatic changes by ESLint, except for manual corrections for .xml files.

Differential Revision: https://phabricator.services.mozilla.com/D4439
2018-08-31 05:59:17 +00:00
Kris Maglione
f6a4413b4c Bug 1484496: Part 5a - Convert browser/ nsISimpleEnumerator users to use JS iteration. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D3729
2018-08-18 19:27:33 -07:00
Brian Grinstead
3097f96e03 Bug 1476333 - Refer to AppConstants.BROWSER_CHROME_URL to get the browser URL from the frontend;r=Gijs
Before this change, we accessed the browser URL in the following ways:

- "chrome://browser/content/browser.xul"
- "chrome://browser/content/" (which redirects to chrome://browser/content/browser.xul)
- Services.prefs.getCharPref("browser.chromeURL") which returns "chrome://browser/content/"
- getBrowserURL() from utilityOverlay.js

MozReview-Commit-ID: I5vtRke1x9t
2018-07-24 08:12:50 -07:00
Mike de Boer
84755893e0 Bug 1034036 - Part 6: Tests that use ss.setBrowserState() or ss.setWindowState() should wait until the window is restored to continue. r=dao
MozReview-Commit-ID: 5d1E5TjKnIR
2018-04-11 12:06:12 +02:00
Mike de Boer
28713f6c1d Bug 1034036 - Part 4: move away from keeping state on the living objects, like windows, tabs and browsers, but keep it truly privately stored in WeakMaps. r=dao
NOTE: The '__SSi' and '__SS_lastSessionWindowID' properties on windows are kept,
      because they are expected to stick around longer during application shutdown.

The benefits is are:
1. Cleaner code - Sessionstore implementation details are not leaked outside its
   module.
2. Observing the lifetime of objects becomes unnecessary, because the WeakMaps are
   cleaned up when objects are GC'd, making leakage of their references impossible
   and Sessionstore can't hold objects hostage anymore.
3. Simplification - all state is now maintained in SessionStore.jsm, which allows
   for additional refactoring later on to simplify the implementation further.

MozReview-Commit-ID: C1II8qHkQ6F
2018-04-11 12:06:06 +02:00
Dão Gottwald
81e69d1b32 Bug 1450559 - Remove nsISessionStore in favor of SessionStore.jsm. r=mikedeboer
MozReview-Commit-ID: 8spvIOus9ai
2018-04-05 16:30:48 +02:00