Commit Graph

1514 Commits

Author SHA1 Message Date
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
Rob Wu
97aef02048 Bug 1520047 - Fix memory leak in places trees r=mak
The places-tree destructor lacks a `result.removeObserver(this.view);`
call before the assignment to `result.root.containerOpen`, which is
causing a memory leak.

This patch fixes the leak by removing the `result.root.containerOpen`
assignment, since the correct logic already exists in the `setTree`
method of `PlacesTreeView`, which is called upon `this.view = null;`
(XULTreeElement::SetView -> nsTreeBodyFrame::SetView -> setTree).

Differential Revision: https://phabricator.services.mozilla.com/D17241
2019-01-23 09:54:36 +00:00
Rob Wu
4b28cecd93 Bug 1518598 - Return early if popup has already been closed r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D16033
2019-01-15 18:50:49 +00:00
Rob Wu
894579b30f Bug 1515810 - Fix intermittent issue in bookmark menu tests r=mixedpuppy
Depends on D16414

Differential Revision: https://phabricator.services.mozilla.com/D16425
2019-01-17 09:53:07 +00:00
Peter Simonyi
2c64c09be9 Bug 1419195: Show items from WebExtensions in Places Library context menu r=mixedpuppy
Depends on D16413

Differential Revision: https://phabricator.services.mozilla.com/D16414
2019-01-17 09:49:38 +00:00
Peter Simonyi
23fe08f5d6 Bug 1419195: Show items from WebExtensions in bookmarks sidebar context menu r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D16413
2019-01-17 09:49:36 +00:00
Gurzau Raul
5eba4bbdf4 Backed out 3 changesets (bug 1515810, bug 1419195) for failing at /browser/browser_ext_contextMenus.js on a CLOSED TREE
Backed out changeset 437003de9fff (bug 1515810)
Backed out changeset c04c2376a213 (bug 1419195)
Backed out changeset d9a81de35ac3 (bug 1419195)
2019-01-15 17:07:06 +02:00
Rob Wu
4b982099df Bug 1515810 - Fix intermittent issue in bookmark menu tests r=mixedpuppy
Depends on D16414

Differential Revision: https://phabricator.services.mozilla.com/D16425
2019-01-15 14:05:31 +00:00
Peter Simonyi
50669f34c3 Bug 1419195: Show items from WebExtensions in Places Library context menu r=mixedpuppy
Depends on D16413

Differential Revision: https://phabricator.services.mozilla.com/D16414
2019-01-15 14:05:44 +00:00
Peter Simonyi
9bc416544f Bug 1419195: Show items from WebExtensions in bookmarks sidebar context menu r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D16413
2019-01-15 14:06:03 +00:00
Noemi Erli
75a1557802 Backed out changeset ee53bdc5b1d4 (bug 1419195) for failing in browser_ext_contextMenus.js 2019-01-14 18:59:02 +02:00
Noemi Erli
bfb157f169 Backed out changeset 732184f122e3 (bug 1419195) for failing in browser_ext_contextMenus.js 2019-01-14 18:58:48 +02:00
Noemi Erli
f57fe15abf Backed out changeset 5f9ccc7b6039 (bug 1515810) for failing in browser_ext_contextMenus.js 2019-01-14 18:58:15 +02:00
Rob Wu
e8f1fc4c12 Bug 1515810 - Fix intermittent issue in bookmark menu tests r=mixedpuppy
Depends on D16414

Differential Revision: https://phabricator.services.mozilla.com/D16425
2019-01-14 15:44:32 +00:00
Peter Simonyi
969563efc3 Bug 1419195: Show items from WebExtensions in Places Library context menu r=mixedpuppy
Depends on D16413

Differential Revision: https://phabricator.services.mozilla.com/D16414
2019-01-14 15:43:29 +00:00
Peter Simonyi
5b36f866d3 Bug 1419195: Show items from WebExtensions in bookmarks sidebar context menu r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D16413
2019-01-14 15:41:27 +00:00
Mark Striemer
ad5438e36c Bug 1303384 - Part 4: Localize command descriptions r=aswan
Differential Revision: https://phabricator.services.mozilla.com/D6346
2019-01-12 02:25:23 +00:00
Mark Striemer
04c2dcb929 Bug 1303384 - Part 2: Move some extension shortcut utils to ShortcutUtils r=aswan
Differential Revision: https://phabricator.services.mozilla.com/D4506
2019-01-11 22:32:39 +00:00
Luca Greco
0919414229 Bug 1518883 - Fix browser_ext_optionsPage_popups.js high intermittency on linux32-debug. r=mixedpuppy
This patch applies the following small change to the openContextMenuInOptionsPage test helper:

Instead of using BrowserTestUtils.synthesizeMouseAtCenter, the new version of the test helper
triggers a contextmenu event directly on the target element, to prevent intermittent failures
on debug builds (especially linux32-debug).

The intermittent failures seem to be originated by an unexpected behavior of DOMWindowUtils's
sendMouseEvent method, which is randomly triggering mouse events targeting the entire HTML document
instead of the intended DOMElement (despites the EventUtils.js "synthesizeMouseAtPoint" method is
computing the same `left` and `top` position in both the cases).

It seems that there could be some timing reasons behind the issue, because the intermittency
is reduced by adding an arbitrary long delay before triggering the mouse event.

Differential Revision: https://phabricator.services.mozilla.com/D16345
2019-01-14 11:48:52 +00:00
Luca Greco
d99ddb5c46 Bug 1519121 - Fix browser_ext_optionsPage_popups.js test failure on 66 Beta due to userContext feature disabled. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D16219
2019-01-10 19:12:41 +00:00
Luca Greco
781ae42557 Bug 1468460 - Fix and test extension menus and menus.overrideContext on options_ui pages. r=mixedpuppy,robwu
Depends on D9920

Differential Revision: https://phabricator.services.mozilla.com/D15225
2019-01-08 22:23:00 +00:00
Luca Greco
bb30a553fe Bug 1468460 - Support context menu in WebExtensions options pages embedded inside an about:addons tab. r=mixedpuppy,robwu
Differential Revision: https://phabricator.services.mozilla.com/D9920
2019-01-07 20:53:13 +00:00
alwu
0e8e7456d0 Bug 1513039 - part11 : remove pref 'media.autoplay.ask-permission'. r=cpearce
Depends on D14335

Differential Revision: https://phabricator.services.mozilla.com/D14336
2019-01-07 18:41:58 +00:00
Timothy Guan-tin Chien
c7843797af Bug 1512048 - Convert tabmodalprompt binding to JSM module r=Gijs
This converts the tabmodalprompt binding to a class, to be constructed along side with the element
by TabModalPromptBox.

TabModalPromptBox will keep the instances in a map and pass it to the callers, instead of the element.
The tests and callers can access the class instance by passing the element reference to the map.

Differential Revision: https://phabricator.services.mozilla.com/D15505
2019-01-04 19:29:34 +00:00
Cosmin Sabou
a511cb5fb6 Bug 1433892 - Disable browser_ext_menus_events.js on Linux for frequent failures. r=jmaher 2018-12-26 17:39:00 +02:00
Raul Gurzau
a984089540 Bug 1483701 - Disable browser_ext_browserAction_popup_resize.js on Windows, Linux and Mac, debug and verify. r=jmaher 2018-12-23 14:23:00 +02:00
Cosmin Sabou
e34d56f37f Bug 1504096 - disabled browser_ext_browserAction_context.js on linux debug r=jmaher 2018-12-22 21:13:09 +02:00
Shane Caraveo
f62a66bc95 Bug 1514673 allow WINDOW_ID_NONE in focus listener, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D14881
2018-12-19 16:06:35 +00:00
Shane Caraveo
344ce1e93d Bug 1513717 fix browser_ext_tabs_events intermittent failure, r=rpl
The test failed if onHighlighted was received late, since it has an array of IDs.  This change should address any case where we need to get the tab from id.

Differential Revision: https://phabricator.services.mozilla.com/D14860
2018-12-19 15:54:53 +00:00
Andrew Swan
e71342c281 Bug 1498027 Defer window/browser creation for extension pages r=kmag
Also, use a single hidden window to hold <browser> elements
for multiple extensions.

Differential Revision: https://phabricator.services.mozilla.com/D14163
2018-12-14 03:36:14 +00:00
Shane Caraveo
3b69c6bb01 Bug 1506653 support disabling page action for private windows, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D11805
2018-11-20 18:24:38 +00:00
Shane Caraveo
a23b989875 Bug 1345474 - support showInPrivateBrowsing in browserAction, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D11670
2018-12-10 21:32:04 +00:00
Shane Caraveo
71a0ac5c62 Bug 1345474 - Check incognito access for windows api r=rpl
Depends on D4111

Differential Revision: https://phabricator.services.mozilla.com/D4112
2018-12-10 21:30:05 +00:00
Shane Caraveo
0134e7bd62 Bug 1345474 - Check incognito access for tabs api r=rpl
Depends on D4110

Differential Revision: https://phabricator.services.mozilla.com/D4111
2018-12-12 13:54:55 +00:00
Shane Caraveo
02afbc4262 Bug 1345474 - protect access to base window and tab classes r=rpl
Depends on D4109

Differential Revision: https://phabricator.services.mozilla.com/D4110
2018-12-10 21:28:33 +00:00
Shane Caraveo
631fa5854e Bug 1345474 - Check incognito access for content scripts r=rpl
Depends on D4100

Differential Revision: https://phabricator.services.mozilla.com/D4109
2018-12-10 21:27:45 +00:00
Noemi Erli
a1cde633f5 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-12-08 00:18:17 +02:00
Emilio Cobos Álvarez
5953210d7d Bug 1511138 - Fix / update tests. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D13550
2018-12-07 14:23:31 -05:00
arthur.iakab
dcacac4412 Backed out 5 changesets (bug 1511138) for causing eslint failure on SelectChild.jsm CLOSED TREE
Backed out changeset daee82295b3c (bug 1511138)
Backed out changeset d23c9c3e1566 (bug 1511138)
Backed out changeset a99600391704 (bug 1511138)
Backed out changeset 4ef293b90887 (bug 1511138)
Backed out changeset 4df286b234b3 (bug 1511138)
2018-12-07 20:55:24 +02:00
Emilio Cobos Álvarez
628a008748 Bug 1511138 - Fix / update tests. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D13550
2018-12-07 13:01:01 -05:00
Luca Greco
62d0d158a0 Bug 1512421 - contextMenus documentUrlPatterns should allow unrestricted schemes on privileged mozilla addons. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D13907
2018-12-07 16:46:32 +00:00
Luca Greco
9b876195e5 Bug 1511483 - pageAction show_matches/hide_matches should allow unrestricted schemes on privileged mozilla addons. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D13582
2018-11-30 22:30:39 +00:00
Razvan Maries
40f7cb25fe Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-11-29 23:46:52 +02:00
Luca Greco
73d353340b Bug 1472740 - Avoid LWT aliases in theme API tests that are not specifically about LWT aliases. r=ntim,jaws
This patch replace the LWT aliases with their related non-deprecated alias in all the theme API tests
that don't seem to be specifically testing the LWT aliases (e.g. browser_ext_themes_lwtsupport.js is
leaved unmodified for this reason).

The main reason to replace them in the "not stricly LWT-related" tests before their final removal
(currently planned for Firefox 69) is that the deprecation warnings will make these tests more
noisy (and so they may be making harder to investigate failures, without any actual gain in terms
of coverage).

Depends on D12297

Differential Revision: https://phabricator.services.mozilla.com/D12783
2018-11-26 16:10:36 +00:00
Coroiu Cristina
a51054ec4e Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-11-28 23:56:03 +02:00
Coroiu Cristina
0a1e903bf3 Merge inbound to mozilla-central a=merge 2018-11-28 23:49:09 +02:00
hawaiianchimp
b425db810c Bug 1500320 - Updating the omnibox keyword regex to allow trailing slashes r=robwu,aswan
Previously the omnibox keyword would not allow trailing slashes, such as go/
Chrome allows this keyword, and Firefox should allow this too.

Differential Revision: https://phabricator.services.mozilla.com/D12242
2018-11-26 23:16:22 +00:00
Ryan Hendrickson
f5db121ba7 Bug 1500479 - Part 2: expose tab successors in browser.tabs; r=mixedpuppy,rpl
1. Add successorTabId to the Tab type, so that it will be returned in, e.g.,
   browser.tabs.get calls

2. Extend or create the following methods on the browser.tabs API:
  - update: add successorTabId as an optional property on the provided
    updateProperties object
  - moveInSuccession: new method that manipulates tab successors in bulk

Differential Revision: https://phabricator.services.mozilla.com/D9272
2018-11-26 04:17:00 +00:00
Ryan Hendrickson
803e559f4f Bug 1500479 - Part 1: browser.tabs.onActivated; r=mixedpuppy,rpl,JanH
Add an optional previousTabId property to the onActivated event,
which is present if the previously activated tab is still open.

Differential Revision: https://phabricator.services.mozilla.com/D9271
2018-11-26 04:16:30 +00:00
Andrea Marchesini
ce10a141d2 Bug 1503681 - rel=noopener implicit for target=_blank in anchor and area elements when no rel attribute is set - fix tests, r=me 2018-11-28 08:22:06 +01:00