Commit Graph

3253 Commits

Author SHA1 Message Date
CanadaHonk
de0de3489c 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
Mark Banner
8551cb9af4 Bug 1823763 - Convert toolkit/components/reader to ES modules. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D173183
2023-03-23 12:11:43 +00:00
Gijs Kruitbosch
5e7d1aeb25 Bug 1823706 - rename addMultipleTabs and batchInsertingTabs parameter for clarity, r=dao
Differential Revision: https://phabricator.services.mozilla.com/D173271
2023-03-23 10:00:35 +00:00
Gijs Kruitbosch
209acd760d 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
Gijs Kruitbosch
5a7f5e02ed Bug 1822854 - ensure session store doesn't assume _tPos is set and has good stub info for recently restored tabs so we don't break manual session restore, r=dao
Either of these changes (ie dropping the setTabState call for batch restored
tabs, or ensuring the restoreTabs code correctly fills its array with dummy
entries) is sufficient here. I chose to do both because I think in both cases
the brokenness is not limited to this scenario or the issues at hand.

Specifically, the setTabState call was added in bug 1521346 to deal with
moved lazy tabs, but is now being invoked for session restore because of
the batchInsertingTabs optimization work. It doesn't actually need to be,
as far as I can tell, and the lacking _tPos in this case (because we don't
insert the tab into the tabstrip a few lines above) is what breaks things
inside _ensureNoNullsInTabDataList. Note that this _already_ was breaking
things in restoreTab(), which would assign into tabs[undefined] on the
window state object, so just dropping the call seemed better than wallpapering
the absence of _tPos.

The restoreTabs code, pre-patch, calls _ensureNoNullsInTabDataList but that
will never do anything, because right before calling it we change the array
length, so maxPos was always smaller than the size of the list. This meant
we still had empty slots in the array, which was also causing confusion down
the line.

I added the explicit exception for the broken _tPos in restoreTab so that we
notice any future issues with this more quickly. Doing so without any of the
other fixes broke the pre-existing browser_586068-apptabs.js test, so
hopefully that will catch any future changes that break the code's assumptions.

Differential Revision: https://phabricator.services.mozilla.com/D173070
2023-03-21 16:29:06 +00:00
anayo
f7b10909f6 Bug 1814427 - Replace linkMoreTroubleshooting xul anchor with moz-support-link r=tgiles
Differential Revision: https://phabricator.services.mozilla.com/D172221
2023-03-15 22:06:28 +00:00
Abhishek Tiwari
44d69b39a6 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
809af7350c 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
babfe209e9 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
85339f07c4 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
86eed67fa6 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
Gijs Kruitbosch
3df1817aaa Bug 1763279 - fix session store tab data sanity checks to not be terrible for performance, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D170755
2023-02-28 08:01:34 +00:00
Kelly Cochrane
3d928092de 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
6df2b51cf5 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
417438b9cf 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
57f2b058ba 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
Gijs Kruitbosch
bc748bee0c Bug 1810141 - switch consumers where there isn't an obvious URI object to use to fixupAndLoadURIString, r=mossop,geckoview-reviewers,extension-reviewers,settings-reviewers,mconley,owlish
This also updates layoutdebug.js, which in some ways pretends to be like a browser window but
is its own special snowflake. I kept the method naming conventions similar to the main
browser window.

Depends on D168394

Differential Revision: https://phabricator.services.mozilla.com/D168395
2023-02-13 23:50:40 +00:00
Gijs Kruitbosch
a396f8a867 Bug 1810141 - fix loadURI callers that already have an nsIURI reference or where creating one is clearly safe, r=mossop,geckoview-reviewers,extension-reviewers,settings-reviewers,mconley,m_kato
There are 3 types of changes in this commit:

- from `loadURI(foo.spec)` to `loadURI(foo)`, as there's already a URI
- from `loadURI("string")` to `loadURI(Services.io.newURI("string"))` as the URL is hardcoded
- one or two where there is perhaps an intermediate variable but the patch
  context should still make it trivial to ascertain the change is correct.

Depends on D168393

Differential Revision: https://phabricator.services.mozilla.com/D168394
2023-02-13 23:50:40 +00:00
Gijs Kruitbosch
2683112303 Bug 1810141 - update consumers of CanonicalBrowsingContext.loadURI to use fixup or pass a URI object if they have it, r=mak,webdriver-reviewers,whimboo
Depends on D168389

Differential Revision: https://phabricator.services.mozilla.com/D168390
2023-02-13 23:50:38 +00:00
Cristina Horotan
f062495d94 Backed out 9 changesets (bug 1810141) for several test failures on a CLOSED TREE
Backed out changeset 8781a0d1254d (bug 1810141)
Backed out changeset 131037295784 (bug 1810141)
Backed out changeset 3852fbe290f4 (bug 1810141)
Backed out changeset 118f131a524a (bug 1810141)
Backed out changeset ab5d76846e10 (bug 1810141)
Backed out changeset dce3aa683445 (bug 1810141)
Backed out changeset 4dc41d90dbb3 (bug 1810141)
Backed out changeset 50b57ba1a061 (bug 1810141)
Backed out changeset 569de94781e4 (bug 1810141)
2023-02-13 16:05:30 +02:00
Gijs Kruitbosch
c235e8167f 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 12:55:26 +00:00
Gijs Kruitbosch
2e04015e9c Bug 1810141 - switch consumers where there isn't an obvious URI object to use to fixupAndLoadURIString, r=mossop,geckoview-reviewers,extension-reviewers,settings-reviewers,mconley,owlish
This also updates layoutdebug.js, which in some ways pretends to be like a browser window but
is its own special snowflake. I kept the method naming conventions similar to the main
browser window.

Depends on D168394

Differential Revision: https://phabricator.services.mozilla.com/D168395
2023-02-13 12:55:25 +00:00
Gijs Kruitbosch
6122444136 Bug 1810141 - fix loadURI callers that already have an nsIURI reference or where creating one is clearly safe, r=mossop,geckoview-reviewers,extension-reviewers,settings-reviewers,mconley,m_kato
There are 3 types of changes in this commit:

- from `loadURI(foo.spec)` to `loadURI(foo)`, as there's already a URI
- from `loadURI("string")` to `loadURI(Services.io.newURI("string"))` as the URL is hardcoded
- one or two where there is perhaps an intermediate variable but the patch
  context should still make it trivial to ascertain the change is correct.

Depends on D168393

Differential Revision: https://phabricator.services.mozilla.com/D168394
2023-02-13 12:55:24 +00:00
Gijs Kruitbosch
608c7cef07 Bug 1810141 - update consumers of CanonicalBrowsingContext.loadURI to use fixup or pass a URI object if they have it, r=mak,webdriver-reviewers,whimboo
Depends on D168389

Differential Revision: https://phabricator.services.mozilla.com/D168390
2023-02-13 12:55:22 +00:00
Stanca Serban
9d20ea803f Bug 1775608 - disable browser_sessionHistory.js on linux and mac10.15 debug. r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D169178
2023-02-08 14:36:01 +00:00
Cosmin Sabou
8bf07d5fb3 Bug 1775616 - disable browser_async_window_flushing.js due to frequent failures. r=intermittent-reviewers,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D168489
2023-02-03 06:09:38 +00:00
Gijs Kruitbosch
b965c4660a Bug 1795255 - autofix duplicate imports in tests under browser/, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D166179
2023-01-31 11:48:41 +00:00
Mark Banner
2bd093b567 Bug 1811334 - Automatically replace Cu.reportError with console.error (most of browser/components). r=settings-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D167297
2023-01-20 17:49:21 +00:00
Gijs Kruitbosch
5a903703c5 Bug 1810995 - update BrowserTestUtils.loadURI consumers to use loadURIString (automated) - browser - r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D167153
2023-01-19 20:16:42 +00:00
Andreas Farre
027c6ceda3 Bug 1810704 - Collect telemetry for session history collection time. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D167033
2023-01-19 06:45:55 +00:00
Florian Quèze
a73b864d0a Bug 1808729 - Limit session store writes to once per hour when the user is idle, r=dao.
Differential Revision: https://phabricator.services.mozilla.com/D166099
2023-01-16 14:55:22 +00:00
Sarah Clements
8f954f3b82 Bug 1804064 - Firefox View window should not be saved r=Gijs,kcochrane
* If Firefox view tab is the last selected tab when a window is closed it
should not be saved; the first tab should be used instead. This patch updates a test,
updates the title that is saved and the selected index

Differential Revision: https://phabricator.services.mozilla.com/D166362
2023-01-11 11:59:19 +00:00
Stanca Serban
87d12b6bcd Backed out changeset c6ec3664e1f5 (bug 1808729) for causing mochitests failures in browser_privatebrowsing_history_shift_click.js. CLOSED TREE 2023-01-10 12:31:26 +02:00
Florian Quèze
0e43dbbe17 Bug 1808729 - Limit session store writes to once per hour when the user is idle, r=dao.
Differential Revision: https://phabricator.services.mozilla.com/D166099
2023-01-10 08:26:07 +00:00
Sandor Molnar
2704668f7b Backed out changeset 1a38da4f6de9 (bug 1808729) for causing bc failures in browser/components/sessionstore/test/browser_not_collect_when_idle.js CLOSED TREE 2023-01-09 16:28:29 +02:00
Florian Quèze
0574310850 Bug 1808729 - Limit session store writes to once per hour when the user is idle, r=dao.
Differential Revision: https://phabricator.services.mozilla.com/D166099
2023-01-09 11:31:28 +00:00
Marco Castelluccio
ba39d286d5 Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165395
2022-12-23 22:45:46 +00:00
Mark Banner
df47c60747 Bug 1806359 - Convert telemetry imports to direct ES imports. r=necko-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,janerik,mconley,sgalich,bytesized,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165002
2022-12-23 12:37:07 +00:00
Mark Banner
2b069eb017 Bug 1806306 - Convert AsyncShutdown imports to direct ES imports. r=mak,webdriver-reviewers,application-update-reviewers,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D164981
2022-12-23 12:37:06 +00:00
Gijs Kruitbosch
ba3f869758 Bug 1803391 - update comments / text references to session store modules as 'jsm's, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D164127
2022-12-12 10:08:03 +00:00
Gijs Kruitbosch
50a6973e00 Bug 1803158 - convert session restore JSMs to sys.mjs ESMs, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D163349
2022-12-06 16:02:02 +00:00
Joel Maher
e101d5b991 Bug 1803187 - re-enable sessionstore tests accidentally disabled. r=bxbrenden
Differential Revision: https://phabricator.services.mozilla.com/D163748
2022-12-05 23:37:41 +00:00
Norisz Fay
8e2d7ea378 Backed out changeset 83906cd6a218 (bug 1803187) for causing mochitest failures on browser_524745.js CLOSED TREE 2022-12-01 18:59:14 +02:00
Nika Layzell
8f70dbbc45 Bug 1803187 - Re-enable sessionrestore tests on linux, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D163367
2022-12-01 15:55:32 +00:00
Itiel
3afdffae32 Bug 1801061 - Consolidate some logic between about:sessionrestore and about:welcomeback r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D162488
2022-11-30 18:41:59 +00:00
Gijs Kruitbosch
3fd7180951 Bug 1789043 - use existing NOTIFY_BROWSER_SHUTDOWN_FLUSH on firefox view to be told about closing tabs, r=sclements
Differential Revision: https://phabricator.services.mozilla.com/D163216
2022-11-30 14:13:41 +00:00
Nika Layzell
d715baa761 Bug 1538028 - Part 3: Validate loads by TriggeringRemoteType, r=smaug,ckerschb
The previous part introduced a new mechanism to track the triggering remote
type for a specific load in a reliable way. This adds some basic checks based
on the triggering remote type to the nsContentSecurityManager, while also
providing the potential infrastructure to expand these checks in the future.

As these checks are performed before some other content security checks (to
ensure that they are performed before InitialSecurityCheckDone() is checked),
they may reject a load which would otherwise have been rejected by a later
check. For this reason, the diagnostic assertions added in this part are only
fired if the check appears as though it would otherwise have succeeded. This
check is not fully accurate, however, so may miss some cases.

This is important, as we have some tests, such as service worker navigation
tests, which will try to load file:/// URIs in content processes, and only fail
in the later content security checks.

For now, no checks are performed for non-document loads, though that may change
in the future.

Differential Revision: https://phabricator.services.mozilla.com/D161199
2022-11-29 20:41:45 +00:00
Iulian Moraru
5085e5074f Backed out changeset 1da39fdc61ed (bug 1801061) for causing bc failures on browser_aboutSessionRestore.js. CLOSED TREE 2022-11-29 21:10:38 +02:00
Itiel
1a8efc52fe Bug 1801061 - Consolidate some logic between about:sessionrestore and about:welcomeback r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D162488
2022-11-29 18:17:43 +00:00
Csoregi Natalia
f8d2a3739e Backed out changeset 5998b7a73bd9 (bug 1801061) for failures on browser_aboutSessionRestore.js. CLOSED TREE 2022-11-26 22:22:30 +02:00