Commit Graph

2668 Commits

Author SHA1 Message Date
Rob Wu
cb2c04da02 Bug 1748158 - Omit sender.frameId if sender.tab is unset r=rpl,geckoview-reviewers,jonalmeida
`sender.frameId` should be set iff `sender.tab` is set, as documented at
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/MessageSender
The removal of the `viewType == "tab"` condition broke this in
https://hg.mozilla.org/mozilla-central/rev/2dc4f1baccc8

This patch makes the presence of `frameId` conditional on `tab`, and
fixes several tests that relied on the incorrect behavior:

- Move the runtime.onConnect test from test_ext_contentscript_in_background.js
  to a new mochitest at test_ext_runtime_connect_iframe.html.

- Simplify test_ext_contentscript_in_background.js to continue to
  provide test coverage for contentScripts.register + allFrames.

- Replace runtime.onConnect with runtime.getFrameId in
  test_ext_contentscript_xorigin_frame.js, since sender.frameId is no
  longer available in xpcshell tests (because internals to support the
  tabs extension API are not available in xpcshell tests). The test
  cannot be moved to a mochitest because its purpose is to provide test
  coverage for process switching in a xpcshell test (bug 1580811).

Differential Revision: https://phabricator.services.mozilla.com/D135057
2022-01-06 14:15:47 +00:00
Alexandru Michis
8282e82b21 Backed out changeset 4ae7738694e1 (bug 1748158) for causing xpcshell failures in test_ext_native_messaging_permissions.js
CLOSED TREE
2022-01-06 02:55:58 +02:00
Rob Wu
5be369dc94 Bug 1748158 - Omit sender.frameId if sender.tab is unset r=rpl,geckoview-reviewers,jonalmeida
`sender.frameId` should be set iff `sender.tab` is set, as documented at
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/MessageSender
The removal of the `viewType == "tab"` condition broke this in
https://hg.mozilla.org/mozilla-central/rev/2dc4f1baccc8

This patch makes the presence of `frameId` conditional on `tab`, and
fixes several tests that relied on the incorrect behavior:

- Move the runtime.onConnect test from test_ext_contentscript_in_background.js
  to a new mochitest at test_ext_runtime_connect_iframe.html.

- Simplify test_ext_contentscript_in_background.js to continue to
  provide test coverage for contentScripts.register + allFrames.

- Replace runtime.onConnect with runtime.getFrameId in
  test_ext_contentscript_xorigin_frame.js, since sender.frameId is no
  longer available in xpcshell tests (because internals to support the
  tabs extension API are not available in xpcshell tests). The test
  cannot be moved to a mochitest because its purpose is to provide test
  coverage for process switching in a xpcshell test (bug 1580811).

Differential Revision: https://phabricator.services.mozilla.com/D135057
2022-01-05 20:41:07 +00:00
Marian-Vasile Laza
d4d55e1595 Backed out changeset 0bf0fa6d8a5a (bug 1748158) for causing xpcshell failures on test_ext_native_messaging_permissions.js. CLOSED TREE 2022-01-05 04:05:14 +02:00
Rob Wu
c686f79b28 Bug 1748158 - Omit sender.frameId if sender.tab is unset r=rpl
`sender.frameId` should be set iff `sender.tab` is set, as documented at
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/MessageSender
The removal of the `viewType == "tab"` condition broke this in
https://hg.mozilla.org/mozilla-central/rev/2dc4f1baccc8

This patch makes the presence of `frameId` conditional on `tab`, and
fixes several tests that relied on the incorrect behavior:

- Move the runtime.onConnect test from test_ext_contentscript_in_background.js
  to a new mochitest at test_ext_runtime_connect_iframe.html.

- Simplify test_ext_contentscript_in_background.js to continue to
  provide test coverage for contentScripts.register + allFrames.

- Replace runtime.onConnect with runtime.getFrameId in
  test_ext_contentscript_xorigin_frame.js, since sender.frameId is no
  longer available in xpcshell tests (because internals to support the
  tabs extension API are not available in xpcshell tests). The test
  cannot be moved to a mochitest because its purpose is to provide test
  coverage for process switching in a xpcshell test (bug 1580811).

Differential Revision: https://phabricator.services.mozilla.com/D135057
2022-01-04 23:07:16 +00:00
Mathew Hodson
25adf33c38 Bug 1746709 - Use ChromeUtils.import with one parameter in test_GMPInstallManager.js. r=robwu
Export new `ProductAddonCheckerTestUtils` for methods only used by
tests.

Differential Revision: https://phabricator.services.mozilla.com/D134217
2022-01-04 17:36:49 +00:00
Rob Wu
61ab2f283b Bug 1746494 - Account for invalid linkUrls in context menus r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D134918
2022-01-03 13:10:23 +00:00
Emilio Cobos Álvarez
327f1b06be Bug 1746310 - Make panels and menupopups not have their children in the flat tree if not initialized. r=Gijs
This is almost a revert of bug 1741089 (just with the relevant test fix
and so on). With the previous patch, for something like:

  <menupopup>
    <menuitem />
  </menupopup>

We would still generate the frames for the menuitem. That causes various
a11y tests to fail and starts loading images used by the menuitem which
was caught by browser_startup_images.js.

Make the children completely invisible to layout by keeping them
unslotted. This makes getComputedStyle on them return an empty style,
but only one test was depending on that.

Depends on D134331

Differential Revision: https://phabricator.services.mozilla.com/D134606
2021-12-23 12:55:34 +00:00
Luca Greco
3d6c558360 Bug 1746841 - Add a test case to verify that css cached for moz-extension urls are not used after the addon is updated. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D134438
2021-12-22 11:47:00 +00:00
Gijs Kruitbosch
5c07ced6c2 Bug 1747065 - remove plugin.load_flash_only setters which are no-ops r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D134398
2021-12-21 14:34:48 +00:00
Dana Keeler
c80332b1ff Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,glandium,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Depends on D130820

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-18 01:30:24 +00:00
Anny Gakhokidze
16a415a10f Bug 1721217 - Part 9: Write tests for making sure that parent initiated network requests get cancelled after we remove the tab or cancel the load, r=nika,robwu,zombie
Differential Revision: https://phabricator.services.mozilla.com/D130197
2021-12-16 22:27:18 +00:00
Emilio Cobos Álvarez
56e23db6d4 Bug 1744749 - Use windowUtils.canvasBackgroundColor to get the web extension background. r=extension-reviewers,robwu
Make popup browsers non-transparent so that we can get a meaningful
canvas background-color from layout. I don't think it matters since
popups are not meaningfully transparent since bug 1449933.

Depends on D133772

Differential Revision: https://phabricator.services.mozilla.com/D133773
2021-12-16 14:56:33 +00:00
Cosmin Sabou
cda3042731 Backed out 2 changesets (bug 1712837) for causing an increase in crashes (bug 1735798). a=backout
Backed out changeset 51773d1ab7b5 (bug 1712837)
Backed out changeset 97b0a77e4ce7 (bug 1712837)
2021-12-15 12:24:03 +02:00
Luca Greco
0d8fc19cd9 Bug 1735899 - Cover the browserAction popup preload with a smoketest. r=mixedpuppy
This patch includes a new test file to cover a scenario similar to the one
fixed in Bug 1735899, and possibly some other similar ones that may slip
through unnoticed.

This test triggers the issue consistently on a build where the fix
is not included and pass consistently in build including the fix,
but even if it doesn't include any arbitrary timeouts to trigger the
issue there is still a chance that the test may start to fail
intermittently for some other reasons.

Keeping it as a separate test file will make it easier to disable it
as a temporary measure if turns out to be necessary.

Differential Revision: https://phabricator.services.mozilla.com/D132267
2021-12-14 19:15:15 +00:00
Dana Keeler
a03ae7ed1f Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-13 23:59:08 +00:00
Jonathan Watt
bb0276ec0f Bug 1745322 - Only test the new UI in browser/components/extensions/test/browser/browser_ext_tabs_printPreview.js. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D133447
2021-12-10 16:05:50 +00:00
Cristian Tuns
401fef52eb Backed out changeset 5396b58ddae7 (bug 1712837) for causing Android ARMv7 build bustages. a=backout 2021-12-10 09:35:39 -05:00
Dana Keeler
aa200d9a1e Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-10 00:24:49 +00:00
Richa Sharma
f690bb5cd5 Bug 1730931 - Supporting an array of cookieStoreId in the tabs.query API. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D125868
2021-12-07 13:46:53 +00:00
Andreea Pavel
58063719cd Backed out 2 changesets (bug 1712837) for win build bustages on a CLOSED TREE
Backed out changeset e754af875d57 (bug 1712837)
Backed out changeset 020eaab241a8 (bug 1712837)
2021-12-07 02:21:09 +02:00
Dana Keeler
8aceb5730c Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-06 23:43:32 +00:00
Joel Maher
c812f92bf7 Bug 1743907 - Remove webrender annotation from manifestparser manifests. r=ahal,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D132682
2021-12-03 16:04:29 +00:00
Csoregi Natalia
2ea031c8ba Backed out 2 changesets (bug 1712837) for causing RemoteProcessMonitor failures. CLOSED TREE
Backed out changeset e3ed61b61357 (bug 1712837)
Backed out changeset 19b9dfd60749 (bug 1712837)
2021-12-01 22:36:35 +02:00
Dana Keeler
a13bccff29 Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-01 18:10:34 +00:00
Butkovits Atila
d8a40645d2 Bug 1722607 - disable browser_ext_tabs_discard_reversed.js on Mac_64 for frequent failures. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D131998
2021-12-01 12:32:21 +00:00
Narcis Beleuzu
6e9d812757 Backed out 12 changesets (bug 1721217) for bc failures on browser_TopLevelNavigationDelegate.js
Backed out changeset 5fe3c617d521 (bug 1721217)
Backed out changeset c131e4a6d9d5 (bug 1721217)
Backed out changeset a59210a5b400 (bug 1721217)
Backed out changeset 74362b0c39c0 (bug 1721217)
Backed out changeset c8075b91d660 (bug 1721217)
Backed out changeset 46512deaf0e5 (bug 1721217)
Backed out changeset b38bc569d227 (bug 1721217)
Backed out changeset ee9bd012fda8 (bug 1721217)
Backed out changeset 7aa2726a0982 (bug 1721217)
Backed out changeset 885ced5f4bb4 (bug 1721217)
Backed out changeset 7d3f99ca3f44 (bug 1721217)
Backed out changeset 2f5a0164679a (bug 1721217)
2021-12-01 03:38:10 +02:00
Anny Gakhokidze
05c0899220 Bug 1721217 - Part 9: Write tests for making sure that parent initiated network requests get cancelled after we remove the tab or cancel the load, r=nika,robwu,zombie
Differential Revision: https://phabricator.services.mozilla.com/D130197
2021-11-30 16:31:37 +00:00
Emilio Cobos Álvarez
cedd537861 Bug 1743010 - Prefer toolbar background to toolbar text to determine color-scheme, when available and opaque. r=desktop-theme-reviewers,dao
As that can't be obscured by an image.

Differential Revision: https://phabricator.services.mozilla.com/D132172
2021-11-26 09:34:35 +00:00
Narcis Beleuzu
96c4882d22 Backed out 11 changesets (bug 1721217) for bc failures on browser_scrollPositions.js . CLOSED TREE
Backed out changeset 750f4a84b30e (bug 1721217)
Backed out changeset c4eb4ad769ad (bug 1721217)
Backed out changeset 81af11d67439 (bug 1721217)
Backed out changeset 548f2441b7c6 (bug 1721217)
Backed out changeset cd584129321a (bug 1721217)
Backed out changeset f5f5291d1da8 (bug 1721217)
Backed out changeset 9ad66ceec1e2 (bug 1721217)
Backed out changeset 10b53a21bb23 (bug 1721217)
Backed out changeset 3755cfbe22fe (bug 1721217)
Backed out changeset 71436dc6c4c4 (bug 1721217)
Backed out changeset ecf33b73ae60 (bug 1721217)
2021-11-26 01:51:03 +02:00
Anny Gakhokidze
b74c716d24 Bug 1721217 - Part 9: Write tests for making sure that parent initiated network requests get cancelled after we remove the tab or cancel the load, r=nika,robwu,zombie
Differential Revision: https://phabricator.services.mozilla.com/D130197
2021-11-25 20:41:00 +00:00
Rob Wu
dd5538c3e4 Bug 1742368 - Add http cases in browser_ext_tabs_create.js with https-first r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D131951
2021-11-23 18:35:25 +00:00
Christoph Kerschbaumer
c78a87d7c0 Bug 1742351: Update more browser/ tests to be compliant with https-first mode r=extension-reviewers,Gijs,robwu
Differential Revision: https://phabricator.services.mozilla.com/D131773
2021-11-22 14:26:32 +00:00
Iulian Moraru
43773e005d Backed out changeset 7d9cd61d95ce (bug 1742351) for causing bc failures on browser_paste_event_at_middle_click_on_link.js. CLOSED TREE 2021-11-22 14:14:16 +02:00
Christoph Kerschbaumer
5c4ef2e2bd Bug 1742351: Update more browser/ tests to be compliant with https-first mode r=extension-reviewers,Gijs,robwu
Differential Revision: https://phabricator.services.mozilla.com/D131773
2021-11-22 10:49:45 +00:00
Dão Gottwald
8e2dd34f81 Bug 1734835 - Remove the arrow and arrowbox elements from "arrow" panels. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D131616
2021-11-19 19:58:50 +00:00
Emilio Cobos Álvarez
2f647509b0 Bug 1741931 - Use text color rather than background color to determine theme color scheme. r=harry,dao
It's easy for themes that have image backgrounds to have bogus
background colors.

Text color should give a better indication of the color-scheme since
it's always used, even with image backgrounds.

Differential Revision: https://phabricator.services.mozilla.com/D131522
2021-11-19 14:03:06 +00:00
Emilio Cobos Álvarez
ba5a5f860b Bug 1740089 - Fall back to frame (accentcolor) to determine toolbar theme. r=desktop-theme-reviewers,harry
Depends on D130669

Differential Revision: https://phabricator.services.mozilla.com/D130670
2021-11-17 18:05:19 +00:00
William Durand
db8bf03e26 Bug 1740601 - Initial implementation of scripting.executeScript(). r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D128339
2021-11-17 15:11:00 +00:00
Julian Descottes
62d7925d62 Bug 1741369 - [devtools] Update paths to loader files outside devtools/ r=perftest-reviewers,preferences-reviewers,sparky,Gijs
Depends on D131217

Differential Revision: https://phabricator.services.mozilla.com/D131218
2021-11-17 12:43:27 +00:00
Norisz Fay
6e984d9ba0 Backed out changeset 69dee748c290 (bug 1740601) for causing mochitest plain leaks CLOSED TREE 2021-11-16 20:58:39 +02:00
William Durand
f516726cab Bug 1740601 - Initial implementation of scripting.executeScript(). r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D128339
2021-11-16 17:29:16 +00:00
Emilio Cobos Álvarez
3923930d3b Bug 1737131 - Make sure to show the overflow menu in browser_ext_browserAction_theme_icons.js. r=extension-reviewers,zombie
I dug into the test failures above and this is because we return wrong
styles, because the overflow panel was never opened and thus the styles
we were querying are disconnected from the document.

Bug 1483798 covers not returning a style for these elements (patch there
incoming).

Differential Revision: https://phabricator.services.mozilla.com/D131075
2021-11-14 12:40:43 +00:00
Emilio Cobos Álvarez
bf87703670 Bug 1737131 - Enable more async stacks in webextension tests. r=extension-reviewers,zombie
This made debugging this a bit more tractable.

Differential Revision: https://phabricator.services.mozilla.com/D131076
2021-11-14 12:34:35 +00:00
Marian-Vasile Laza
fcac4f0656 Backed out 2 changesets (bug 1712837) for causing mochitest and marionette test failures. CLOSED TREE
Backed out changeset ecfd23a7ef69 (bug 1712837)
Backed out changeset 51529cb4682e (bug 1712837)
2021-11-11 01:52:57 +02:00
Dana Keeler
48d475aa56 Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-11-10 21:48:47 +00:00
Andreea Pavel
c0a0697295 Bug 1730374 - disable browser_ext_tabs_move_window.js on win10 fission debug r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D130546
2021-11-09 15:53:46 +00:00
Iulian Moraru
4739d10c05 Backed out 3 changesets (bug 1740089) for causing bc failures on browser_ext_browserAction_theme_icons.js. CLOSED TREE
Backed out changeset a4546a4b8991 (bug 1740089)
Backed out changeset ac810bf14fd5 (bug 1740089)
Backed out changeset 9c9f35164a4f (bug 1740089)
2021-11-09 07:18:44 +02:00
Emilio Cobos Álvarez
1afe04e622 Bug 1740089 - Fall back to frame (accentcolor) to determine toolbar theme. r=desktop-theme-reviewers,harry
Depends on D130669

Differential Revision: https://phabricator.services.mozilla.com/D130670
2021-11-09 03:58:02 +00:00
raquelvargas
5fa50e2698 Bug 1738245 - Remove OS.File usage from various browser/ tests. r=Standard8,robwu
Differential Revision: https://phabricator.services.mozilla.com/D129972
2021-11-05 16:49:48 +00:00