We need it to live in BrowsingContext instead of WindowContext, because
we need to preserve the zoom level across same-origin navigation.
It'd be nice if it only lived in the top BC, but that's not possible at
the moment because a lot of tests rely on zooming only iframes. Some of
them can be adjusted for scaling the top instead, but not sure it's
worth it's worth fixing them and moving the zoom to be top-only, as it'd
be a bunch of effort, and the complexity and overhead of propagating the
zoom is not so big.
The print-preview-specific code in nsContentViewer is from before we did
the document cloning setup, and it seems useless. I've tested print
preview scaling before and after my patch and both behave the same.
The rest is just various test changes to use the SpecialPowers APIs or
BrowsingContext as needed instead of directly poking at the content
viewer.
I named the pres context hook RecomputeBrowsingContextDependentData, as
more stuff should move there like overrideDPPX and other media emulation
shenanigans.
I also have some ideas to simplify or even remove ZoomChild and such,
but that's followup work.
Differential Revision: https://phabricator.services.mozilla.com/D71969
Persistent listeners for onMessage and onConnect are special because they
don't have parent EventManagers, so we have a lot of custom code just to keep
track of which extensions have registered them during previous runs.
In this patch, I simplify all that logic to always assume that any extension
which sends messages from content scripts has those listeners setup properly.
The only observable difference is that some poorly written extensions which
were previously broken by delayed startup will now "work" by being started
earlier if a message from a content script arrives during browser startup.
Additionally, unconfuse two different meanings of the "startup" event.
Bonus, avoid some logspam during tests.
Differential Revision: https://phabricator.services.mozilla.com/D70955
These tests used <iframe mozbrowser> for convenience, mostly forcing
themselves to only run in non-e10s mode in the process, but none of them
really have any need to.
Differential Revision: https://phabricator.services.mozilla.com/D70745
These tests used <iframe mozbrowser> for convenience, mostly forcing
themselves to only run in non-e10s mode in the process, but none of them
really have any need to.
Differential Revision: https://phabricator.services.mozilla.com/D70745
These tests used <iframe mozbrowser> for convenience, mostly forcing
themselves to only run in non-e10s mode in the process, but none of them
really have any need to.
Differential Revision: https://phabricator.services.mozilla.com/D70745
I made some changes in preparation for removing nsIScriptError.flags in favor
of nsIConsoleMessage.logLevel.
Differential Revision: https://phabricator.services.mozilla.com/D66878
--HG--
extra : moz-landing-system : lando
I am not sure if you are okay with reviewing all those test changes.
Sadly it's not that easy to search through our huge JavaScript code
base for some generic name like 'isStrict'.
Differential Revision: https://phabricator.services.mozilla.com/D66573
--HG--
extra : moz-landing-system : lando
Before this patch, the TabDelegate was "special" as in it had just one global
delegate that receives events for all extensions and sessions. This was done to
allow mochitests to call tabs.create and tabs.remove.
This hack is no longer needed as now we can notify the embedding layer that a
new extension has been installed and we have a way to list currently installed
extensions.
This patch makes TabDelegate behave the same as the other delegates
(ActionDelegate and MessageDelegate) and will allow further simplications of
the WebExtension Delegate code.
Differential Revision: https://phabricator.services.mozilla.com/D64799
--HG--
extra : moz-landing-system : lando
Before this patch, the TabDelegate was "special" as in it had just one global
delegate that receives events for all extensions and sessions. This was done to
allow mochitests to call tabs.create and tabs.remove.
This hack is no longer needed as now we can notify the embedding layer that a
new extension has been installed and we have a way to list currently installed
extensions.
This patch makes TabDelegate behave the same as the other delegates
(ActionDelegate and MessageDelegate) and will allow further simplications of
the WebExtension Delegate code.
Differential Revision: https://phabricator.services.mozilla.com/D64799
--HG--
extra : moz-landing-system : lando
It allows us to simulate media control key events in non-privileged context, such as a mochitest running in content process.
Differential Revision: https://phabricator.services.mozilla.com/D60783
--HG--
extra : moz-landing-system : lando
Using window.setTimeout is causing a Thunderbird test to stall for not entirely clear reasons. Use dispatchToMainThread instead.
Differential Revision: https://phabricator.services.mozilla.com/D59276
--HG--
extra : moz-landing-system : lando
This patch adds a lot of `beforeinput` event tests into existing mochitests
which test `input` events. But this does not add tests of canceling
`beforeinput` event because it requires really complicated path until
implementing `beforeinput` actually.
Note that `beforeinput` event is not fired with `Document.execCommand()`.
Therefore, this patch does not add WPT for testing `beforeinput` event.
And unfortunately, WPT cannot test most cases of the new tests.
Differential Revision: https://phabricator.services.mozilla.com/D58123
--HG--
extra : moz-landing-system : lando
This patch adds a lot of `beforeinput` event tests into existing mochitests
which test `input` events. But this does not add tests of canceling
`beforeinput` event because it requires really complicated path until
implementing `beforeinput` actually.
Note that `beforeinput` event is not fired with `Document.execCommand()`.
Therefore, this patch does not add WPT for testing `beforeinput` event.
And unfortunately, WPT cannot test most cases of the new tests.
Differential Revision: https://phabricator.services.mozilla.com/D58123
--HG--
extra : moz-landing-system : lando
This patch updates the existing ContentTask.spawn rule to do similar things
for SpecialPowers.spawn calls, only with a slightly different set of globals.
Differential Revision: https://phabricator.services.mozilla.com/D53739
--HG--
extra : moz-landing-system : lando
A number of additional globals are available to ContentTask.spawn tasks
compared to SpecialPowers.spawn tasks. Most of these are available by
accident, as a side-effect of running in a shared frame script global, or
being evaled in the context of the content-task.js frame script, but several
of them are pretty broadly useful, or difficult to obtain from a Sandbox
environment without reaching into arbitrary nearby globals.
This patch adds some of the more useful ones to the default task environment.
Differential Revision: https://phabricator.services.mozilla.com/D53736
--HG--
extra : moz-landing-system : lando
Some tests currently use an initial `ContentTask.spawn` call to import certain
modules into the frame script global that subsequent tasks will run in. Since
each `SpecialPowers.spawn` task runs in its own sandbox, this method doesn't
work for them.
This patch adds a helper, `SpecialPowers.addTaskImport`, which allows similar
functionality by automatically importing the given module for any task spawned
by the `SpecialPowers` instance it was called on.
Differential Revision: https://phabricator.services.mozilla.com/D53735
--HG--
extra : moz-landing-system : lando
ContentTask.spawn supports some common global mochitest assertion methods as
aliases for corresponding Assert methods, along with espected-fail `todo`
variants, and the `info` method for logging messages without triggering
assertions. The easiest way to mass-convert existing callers is to just add
support for these to SpecialPowers.spawn, which this patch does.
Differential Revision: https://phabricator.services.mozilla.com/D53734
--HG--
extra : moz-landing-system : lando
This patch updates the existing ContentTask.spawn rule to do similar things
for SpecialPowers.spawn calls, only with a slightly different set of globals.
Differential Revision: https://phabricator.services.mozilla.com/D53739
--HG--
extra : moz-landing-system : lando
A number of additional globals are available to ContentTask.spawn tasks
compared to SpecialPowers.spawn tasks. Most of these are available by
accident, as a side-effect of running in a shared frame script global, or
being evaled in the context of the content-task.js frame script, but several
of them are pretty broadly useful, or difficult to obtain from a Sandbox
environment without reaching into arbitrary nearby globals.
This patch adds some of the more useful ones to the default task environment.
Differential Revision: https://phabricator.services.mozilla.com/D53736
--HG--
extra : moz-landing-system : lando
Some tests currently use an initial `ContentTask.spawn` call to import certain
modules into the frame script global that subsequent tasks will run in. Since
each `SpecialPowers.spawn` task runs in its own sandbox, this method doesn't
work for them.
This patch adds a helper, `SpecialPowers.addTaskImport`, which allows similar
functionality by automatically importing the given module for any task spawned
by the `SpecialPowers` instance it was called on.
Differential Revision: https://phabricator.services.mozilla.com/D53735
--HG--
extra : moz-landing-system : lando
ContentTask.spawn supports some common global mochitest assertion methods as
aliases for corresponding Assert methods, along with espected-fail `todo`
variants, and the `info` method for logging messages without triggering
assertions. The easiest way to mass-convert existing callers is to just add
support for these to SpecialPowers.spawn, which this patch does.
Differential Revision: https://phabricator.services.mozilla.com/D53734
--HG--
extra : moz-landing-system : lando
This patch adds a new field to the `plugin-crashed` event that holds the list
of additional minidumps associated with a crash report. The test
infrastructure is modified to use it which also fixes a race when processing
the .extra file. The reftest machinery has also been modified to take the new
field into account.
Differential Revision: https://phabricator.services.mozilla.com/D54107
--HG--
extra : moz-landing-system : lando
This patch rolls up all the required changes for this purpose. Since the
whole crash reporting flow must understand the new format it's not possible
to land this as separate patches as individually they would be broken. This
patch includes the following changes:
* Changes to the crash reporting machinery to write out annotations as JSON,
these includes changes to the DLL blocklist code that must be run at crash
time.
* Modifications to the crash reporter client so that it can read and
submit the new format; this includes platform-specific changes to the
Breakpad libraries it uses for submitting crashes.
* Modifications to the minidump-analyzer to understand and process the new
format correctly.
* Modifications to the crash manager to understand and process the new format
correctly.
* Modifications to GeckoView's crash handler to understand and submit the
new format correctly.
* Added new tests to cover the new format and modified existing ones to
accomodate the new one.
Differential Revision: https://phabricator.services.mozilla.com/D46848
--HG--
extra : moz-landing-system : lando