Граф коммитов

599 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez d36c96ab4c Bug 1612068 - Move zoom from the content viewer to the browsing context. r=nika
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
2020-04-22 19:32:52 +00:00
Emilio Cobos Álvarez da7a16ff9d Bug 1612068 - Rename and simplify nsIContentViewer.deviceFullZoom. r=nika
It's only needed for a single test, and definitely not used in print
preview.

Depends on D71967

Differential Revision: https://phabricator.services.mozilla.com/D71968
2020-04-22 18:05:44 +00:00
Tomislav Jovanovic 50139dfc2e Bug 1624235 - Simplify handling of persistent listeners for runtime messaging r=robwu
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
2020-04-22 20:03:28 +00:00
Kris Maglione 50bf330ef6 Bug 1614462: Part 2f - Remove browser-element mochitests. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D70747
2020-04-20 22:15:28 +00:00
Kris Maglione 4c89b71494 Bug 1614462: Part 2d - Fix tests that don't need to use mozbrowser. r=mccr8
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
2020-04-20 22:31:29 +00:00
Ciure Andrei a5ac2a8bbc Backed out 10 changesets (bug 1614462) for causing test_ipc_messagemanager_blob.js failures CLOSED TREE
Backed out changeset bf4f8253c708 (bug 1614462)
Backed out changeset c61b797d63e9 (bug 1614462)
Backed out changeset 284002de7137 (bug 1614462)
Backed out changeset 7f604ee5731c (bug 1614462)
Backed out changeset a73ef8167cd4 (bug 1614462)
Backed out changeset ecc3477ed34e (bug 1614462)
Backed out changeset 2106f3ccc4b5 (bug 1614462)
Backed out changeset e68c38a7741d (bug 1614462)
Backed out changeset 93b3bacdbb34 (bug 1614462)
Backed out changeset 0cf4898ae08d (bug 1614462)
2020-04-21 01:11:37 +03:00
Kris Maglione a9d8069037 Bug 1614462: Part 2f - Remove browser-element mochitests. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D70747
2020-04-20 20:11:48 +00:00
Kris Maglione d1639bbfcd Bug 1614462: Part 2d - Fix tests that don't need to use mozbrowser. r=mccr8
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
2020-04-20 20:11:43 +00:00
Ciure Andrei c15dcac93b Backed out 10 changesets (bug 1614462) for causing xpcshell failures CLOSED TREE
Backed out changeset 34d4a86530b4 (bug 1614462)
Backed out changeset dbc2e2556d08 (bug 1614462)
Backed out changeset 512bbab4730c (bug 1614462)
Backed out changeset cd6b8d630f4c (bug 1614462)
Backed out changeset e4ad5037658f (bug 1614462)
Backed out changeset 0ffed1dc4296 (bug 1614462)
Backed out changeset 90ed81cbfe34 (bug 1614462)
Backed out changeset 6d2137eb1d52 (bug 1614462)
Backed out changeset b4819c99e16e (bug 1614462)
Backed out changeset b7deaed376ed (bug 1614462)
2020-04-17 02:26:14 +03:00
Kris Maglione 3e6886a7b9 Bug 1614462: Part 2f - Remove browser-element mochitests. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D70747
2020-04-16 16:57:19 +00:00
Kris Maglione c45d02801c Bug 1614462: Part 2d - Fix tests that don't need to use mozbrowser. r=mccr8
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
2020-04-16 16:57:14 +00:00
Tom Schuster 5eb9932e47 Bug 1621813 - Remove nsIScriptError.exceptionFlag. r=mccr8
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
2020-03-19 21:31:44 +00:00
Ed Lee acb960676c Bug 1620556 - Automatic code fixes for Prettier 1.19.1 upgrade. r=Standard8,remote-protocol-reviewers,marionette-reviewers,webcompat-reviewers,perftest-reviewers,sparky,whimboo,denschub
Differential Revision: https://phabricator.services.mozilla.com/D66128

--HG--
extra : moz-landing-system : lando
2020-03-13 23:38:52 +00:00
Tom Schuster ff852cea9c Bug 1621817 - Remove nsIScriptError.strictFlag. r=remote-protocol-reviewers,mccr8,whimboo
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
2020-03-13 16:12:16 +00:00
Agi Sferro ae0d2a326d Bug 1616625 - Move TabDelegate to be per-WebExtension and per-GeckoSession. r=mixedpuppy,snorp,esawin
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
2020-03-04 02:13:36 +00:00
shindli e06f2a369b Backed out 3 changesets (bug 1616625) for causing xpcshell failures in xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_csp_custom_policies.js CLOSED TREE
Backed out changeset b43ca6507c9a (bug 1616625)
Backed out changeset c0e05f4f2db2 (bug 1616625)
Backed out changeset a1eb1e65a239 (bug 1616625)
2020-03-04 02:26:51 +02:00
Agi Sferro d0840b96b4 Bug 1616625 - Move TabDelegate to be per-WebExtension and per-GeckoSession. r=mixedpuppy,snorp,esawin
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
2020-03-03 23:19:03 +00:00
alwu 6f60b210f6 Bug 1611021 - part1 : add a method in special power to generate media control key events. r=bzbarsky
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
2020-01-23 03:26:39 +00:00
Kris Maglione ab5a99dd15 Bug 1602898: Rename Window.getWindowGlobalChild() to .windowGlobalChild. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D56609

--HG--
extra : moz-landing-system : lando
2020-01-21 21:32:28 +00:00
Mihai Alexandru Michis 745c94b1df Backed out changeset 006f4e50e8e5 (bug 1602898) for causing multiple failures.
CLOSED TREE
2020-01-21 22:55:37 +02:00
Kris Maglione aa0306477e Bug 1602898: Rename Window.getWindowGlobalChild() to .windowGlobalChild. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D56609

--HG--
extra : moz-landing-system : lando
2020-01-21 18:48:26 +00:00
Cosmin Sabou 9b6e5f8e66 Backed out changeset 4c303f6ec2e6 (bug 1602898) for browser chrome failures on browser_ssb_windowlocation. 2020-01-18 01:06:34 +02:00
Kris Maglione 036e960542 Bug 1602898: Rename Window.getWindowGlobalChild() to .windowGlobalChild. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D56609

--HG--
extra : moz-landing-system : lando
2020-01-17 21:36:10 +00:00
Geoff Lankow 048ed6e9de Bug 1605674 - Stop using window.setTimeout in MockFilePickerInstance. r=kmag
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
2020-01-14 21:32:56 +00:00
Masayuki Nakano 0bf0eeeaa0 Bug 970802 - part 1: Add `beforeinput` event tests into existing mochitests r=smaug
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
2020-01-14 07:14:50 +00:00
Razvan Maries 0df75c8122 Backed out 5 changesets (bug 970802) for xpcshell perma fails. CLOSED TREE
Backed out changeset 5511edd700f7 (bug 970802)
Backed out changeset 1fb9cf2264b6 (bug 970802)
Backed out changeset 6b185296c742 (bug 970802)
Backed out changeset ce6853e64ed6 (bug 970802)
Backed out changeset aa9bd45c09b1 (bug 970802)
2020-01-14 04:41:15 +02:00
Masayuki Nakano 583465bce4 Bug 970802 - part 1: Add `beforeinput` event tests into existing mochitests r=smaug
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
2020-01-08 09:22:50 +00:00
Masatoshi Kimura ef626b5951 Bug 1448967 - Remove enablePrivilege. r=mccr8,marionette-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D57243

--HG--
rename : testing/firefox-ui/resources/security/enable_privilege.html => js/xpconnect/tests/mochitest/test_enable_privilege.html
extra : moz-landing-system : lando
2020-01-08 23:14:48 +00:00
Kris Maglione 64dd29e2b8 Bug 1596918: Part 2 - Add ESLint support for SpecialPowers.spawn globals. r=Standard8
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
2019-12-07 18:44:33 +00:00
Kris Maglione 4e0f1f1f23 Bug 1596918: Part 1c - Make some more globals available to SpecialPowers.spawn tasks. r=mccr8
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
2019-12-07 18:44:32 +00:00
Kris Maglione d22440c671 Bug 1596918: Part 1b - Allow callers to automatically import JSMs for all SpecialPowers.spawn calls. r=mccr8
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
2019-12-07 18:44:32 +00:00
Kris Maglione e95b795e86 Bug 1596918: Part 1a - Add support for more assertion/info methods to SpecialPowers.spawn. r=mccr8
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
2019-12-07 18:44:32 +00:00
Daniel Varga 84a601a6d4 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 37df64fb9f Bug 1596918: Part 2 - Add ESLint support for SpecialPowers.spawn globals. r=Standard8
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
2019-12-06 22:13:59 +00:00
Kris Maglione a4d92243c6 Bug 1596918: Part 1c - Make some more globals available to SpecialPowers.spawn tasks. r=mccr8
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
2019-12-06 22:13:48 +00:00
Kris Maglione 78e7bc3363 Bug 1596918: Part 1b - Allow callers to automatically import JSMs for all SpecialPowers.spawn calls. r=mccr8
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
2019-12-06 22:13:41 +00:00
Kris Maglione 92946a07a2 Bug 1596918: Part 1a - Add support for more assertion/info methods to SpecialPowers.spawn. r=mccr8
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
2019-12-06 22:13:38 +00:00
Brad Werth b724f12298 Bug 1599304: Make SpecialPowers.Focus check for availability of this.manager.rootFrameLoader before dereferencing it. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D54648

--HG--
extra : moz-landing-system : lando
2019-11-26 22:31:20 +00:00
Gabriele Svelto 9283d5f034 Bug 1598258 - Add a list of additional minidumps to the event delivered when a plug-in crashes r=froydnj
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
2019-11-22 07:30:23 +00:00
Gabriele Svelto 3233e4e9ef Bug 1598005 - Remove the useless browserDumpID field from the plug-in crash events r=froydnj,baku
Differential Revision: https://phabricator.services.mozilla.com/D53977

--HG--
extra : moz-landing-system : lando
2019-11-21 12:29:58 +00:00
Razvan Maries b90bde90fc Backed out changeset 1603f5abc56e (bug 1420363) for perma fails on test_busy_hang.xul. CLOSED TREE
--HG--
extra : rebase_source : 02c0d2f9f92f0a01ef57e4f9b38a008f6bc0eb50
2019-11-16 13:00:43 +02:00
Gabriele Svelto fb2b45f492 Bug 1420363 - Write crash annotations as JSON r=froydnj,agi
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
2019-11-16 08:29:07 +00:00
Christoph Kerschbaumer e8e2dc31b7 Bug 1584998: Make x-frame-options work with fission enabled. r=jkt,farre,johannh,flod
Differential Revision: https://phabricator.services.mozilla.com/D50588

--HG--
extra : moz-landing-system : lando
2019-10-31 08:28:35 +00:00
Razvan Maries dc147d06b0 Backed out changeset 5f185a11889b (bug 1584998) for perma fails on browser_bug593387.js. CLOSED TREE 2019-10-30 23:26:01 +02:00
Christoph Kerschbaumer 36376205fb Bug 1584998: Make x-frame-options work with fission enabled. r=jkt,farre,johannh
Differential Revision: https://phabricator.services.mozilla.com/D50588

--HG--
extra : moz-landing-system : lando
2019-10-30 17:54:36 +00:00
Daniel Varga 617d42c7ed Backed out changeset ac8f6632f7e0 (bug 1584998) on request by dev. On a CLOSED TREE 2019-10-30 19:33:29 +02:00
Christoph Kerschbaumer 9c55479432 Bug 1584998: Make x-frame-options work with fission enabled. r=jkt,farre,johannh
Differential Revision: https://phabricator.services.mozilla.com/D50588

--HG--
extra : moz-landing-system : lando
2019-10-30 14:47:19 +00:00
Rob Wu 20949d82c8 Bug 1591102 - Let SpecialPowers.pushPermissions wait until the permissions have been applied r=jdm
Differential Revision: https://phabricator.services.mozilla.com/D50486

--HG--
extra : moz-landing-system : lando
2019-10-25 03:25:39 +00:00
Christoph Kerschbaumer 61c17da3e9 Bug 1584993: Make CSP frame-ancestors work with fission enabled. r=jkt,farre,valentin
Differential Revision: https://phabricator.services.mozilla.com/D49147

--HG--
extra : moz-landing-system : lando
2019-10-22 10:57:43 +00:00
Bogdan Tara e1b6bc2222 Backed out changeset 8705284b50d4 (bug 1584993) for test_report_uri_missing_in_report_only_header.html failures CLOSED TREE 2019-10-22 13:25:49 +03:00