Commit Graph

1514 Commits

Author SHA1 Message Date
Kris Maglione
2250619ab1 Bug 1480244: Part 5 - Run most framescripts in shared scope. r=mconley
Creating non-shared scopes for frame scripts is fairly expensive. After these
changes it's even more expensive. However, many frame scripts have no use for
the shared scopes at all. Run-once scripts which execute in closures, for
instance, make no use of them. And after bug 1472491, neither do most of our
default frame scripts.

MozReview-Commit-ID: 9PK7bYdQ0yh
2018-08-10 13:58:18 -07:00
Kris Maglione
52f17a73a6 Bug 1480244: Part 3a - Fix non-strict-mode test code which expects this to be bound to its global. r=aswan
A lot of the ad-hoc frame scripts we execute for tests does not run in strict
mode, and therefore has its functions' `this` objects set to the global when
they are called without a target object.

At the moment, this gives them a MessageManager global. Once message managers
become non-global objects, however, it will give them the shared JSM global,
which is not what they expect.

This patches changes scripts which rely on this to explicitly capture or set
the appropriate `this` object for their calls.

MozReview-Commit-ID: DY8DDb0xE1K
2018-08-03 14:33:38 -07:00
Cosmin Sabou
30d3c4d9bd Backed out 2 changesets (bug 1482610) for mochitest failures on test_keycodes.xul. CLOSED TREE
Backed out changeset 79a59b25e535 (bug 1482610)
Backed out changeset f5873a719ec0 (bug 1482610)
2018-08-14 20:58:27 +03:00
Kris Maglione
cfa1c486ea Bug 1472491: Part 5p - Add ExtFindChild actor. r=mikedeboer f=felipe
MozReview-Commit-ID: 3zL8iYeYAPx
2018-07-29 21:44:48 -07:00
Kris Maglione
e344e6e9af Bug 1472491: Part 5k - Add NetErrorChild actor. r=johannh f=felipe
MozReview-Commit-ID: EclR3sogB4i
2018-07-29 21:00:29 -07:00
Paolo Amadini
8e0034e048 Bug 1482610 - Part 2 - Move the remaining attributes and remove the sidebar broadcasters. r=jaws,mixedpuppy
This also fixes unintended behavior for which clicking the selected item in the sidebar selector would hide the sidebar.

Differential Revision: https://phabricator.services.mozilla.com/D3145
2018-08-14 15:18:25 +01:00
Oriol Brufau
67b140d7db Bug 1474440 - Implement support for the 'onHighlighted' API for multiselect tabs r=mixedpuppy
MozReview-Commit-ID: 8aOmdj0AB3e
2018-07-28 13:15:55 +02:00
Oriol Brufau
9a4241ac47 Bug 1474440 - Rename browser_ext_tabs_onHighlighted.js to browser_ext_tabs_events_order.js r=mixedpuppy
Basically it tests in which order various tab events are dispatched, so the old name
didn't make sense, and it will be more suited for a new test specific to onHighlighted.

MozReview-Commit-ID: Kj8GZfHA0Ap
2018-08-05 22:08:34 +02:00
Peter Simonyi
fb4a5413d0 Bug 1469705: allow menus.refresh() without an onShown listener r=mixedpuppy
MozReview-Commit-ID: 3GbQEoSFTW8
2018-07-05 22:06:23 -04:00
Rob Wu
ff5525ac1e Bug 1481179 - Stop extensions from changing the icon in the top-level menu r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D3198
2018-08-13 13:25:50 +00:00
Bogdan Tara
d4df3ab412 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-11 06:46:31 +03:00
Bogdan Tara
15237e6fa1 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-08-11 01:01:18 +03:00
Rob Wu
ff23c04605 Bug 1325814 - Support shadow DOM in menus.getTargetElement + test r=mixedpuppy
MozReview-Commit-ID: JzVM8wVpaeP
2018-08-08 18:06:41 +02:00
Rob Wu
55e6fd5bb0 Bug 1325814 - Add tests for menus.getTargetElement API r=mixedpuppy
The tests are split in two files:

- browser_ext_menus_targetElement.js to test interaction with web pages
  via content scripts.

- browser_ext_menus_targetElement_extension.js to test interaction
  with menus in extension processes.

And browser_ext_menus_events.js was updated to recognize the new
property.

MozReview-Commit-ID: F0HEiNADRuM
2018-08-04 18:40:54 +02:00
Narcis Beleuzu
e0db69a205 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-10 19:06:15 +03:00
Rob Wu
d9120b6df6 Bug 1480993 - Remove unused extensions.sidebar-button.shown pref from tests r=mixedpuppy
This pref was removed in bug 1387081, when the sidebar-button started to
be shown by default. I have also removed the end of the test that
removed the button, since these were attempts to restore the default
state. At the inception of the tests, the default state is to not show
the button, but now the button is to be shown by default.

Differential Revision: https://phabricator.services.mozilla.com/D2954
2018-08-09 13:54:41 +00:00
Tom Schuster
215509ec96 Bug 1408129 - Treat webextension commands as user input. r=aswan 2018-08-09 23:15:19 +02:00
Noemi Erli
a96af2f0dd Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-10 00:35:58 +03:00
Brian Grinstead
1c86f46ecd Bug 1479125 - Migrate calls that expect an element to be returned to use element variation firstChild etc to firstElementChild etc;r=Paolo
This allows the JS to work in HTML documents, where whitespace is preserved. In XUL
documents, whitespace is ignored when parsing so text nodes are generally not returned.

The following changes were made, with manual cleanups as necessary (i.e. when firstChild actually
refers to a text node, or when firstChild is used in a loop to empty out an element):

  firstChild->firstElementChild
  lastChild->lastElementChild
  nextSibling->nextElementSibling
  previousSibling->previousElementSibling
  childNodes->children

MozReview-Commit-ID: 95NQ8syBhYw
2018-08-08 15:22:53 -07:00
Rob Wu
260e8dfda5 Bug 1280370 - Allow any scheme in targetUrlPatterns r=mixedpuppy
MozReview-Commit-ID: KupQIiAkz0h
2018-07-24 17:26:23 +02:00
Jonathan Kingston
d50c555bf6 Bug 1362034 - Tests for addTab() to provide the correct triggering principal. r=ckerschb r?=gijs
Summary: Depends on D2046

Reviewers: ckerschb!, Gijs!

Tags: #secure-revision

Bug #: 1362034

Differential Revision: https://phabricator.services.mozilla.com/D2047
2018-07-06 21:16:29 +01:00
Rob Wu
8582e3a340 Bug 1320462 - Support access keys in extension menus. r=mixedpuppy
MozReview-Commit-ID: GsLE3PwNeiC
2018-08-06 16:58:21 +02:00
Rob Wu
c6f15312e4 Bug 1416103 - Re-enable browser_ext_omnibox.js everywhere r=aswan
Likely fixed by the patch for bug 1417052

Ran the test with --repeat=50 on Linux and did not observe any failures.

MozReview-Commit-ID: FuMo8jdgJCn
2018-08-06 11:24:20 +02:00
ExE Boss
07170b3645 Bug 1371951 - Make browser-style checkboxes and radio buttons handle style themselves. r=mixedpuppy, bwinton
This removes the requirement for browser-style checkboxes and radio buttons
to be followed by a label since the reason why this was originally done
no longer applies because bug 418833 made it possible for checkboxes and radio
buttons to handle styling themselves rather than requiring a label::before
element.
2018-02-17 17:00:00 +01:00
Kris Maglione
dd232bebfc Bug 1357487: Enable OOP extensions by default on all platforms. r=aswan
MozReview-Commit-ID: L2Pm1frQbmo
2018-07-25 10:29:20 -07:00
Bogdan Tara
2562df3f03 Backed out changeset ef1550969466 (bug 1357487) caused perf regressions & author didn't justified them CLOSED TREE 2018-08-03 16:15:42 +03:00
Rob Wu
995949211f Bug 1398542 - Add test coverage for video/audio context menus r=mixedpuppy
MozReview-Commit-ID: 22VB0Jltj56
2018-08-01 18:20:17 +02:00
Noemi Erli
c053f6616b Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-02 12:03:09 +03:00
Noemi Erli
fda51f21fc Merge inbound to mozilla-central. a=merge 2018-08-02 11:54:46 +03:00
dvarga
7bfb34974d Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-08-02 01:26:29 +03:00
Rob Wu
72f81d1420 Bug 1446956 - Test that activeTab is not granted for bookmarks menu r=mixedpuppy
This ensures that the check that was introduced by bug 1370499 still
continues to work even though it was refactored by the previous commit.

MozReview-Commit-ID: GdbIPA6vxIB
2018-07-19 16:35:22 +02:00
Rob Wu
1ce2ab7936 Bug 1446956 - Grant access to the clicked tab in menus.onClicked r=mixedpuppy
MozReview-Commit-ID: 3mVWOEcZFYn
2018-07-18 22:04:58 +02:00
alwu
07697b68de Bug 1466926 - part3 : add test. r=kmag
MozReview-Commit-ID: 50Eo65ZFkhF
2018-07-10 14:29:22 -07:00
Rob Wu
2fa0c58b53 Bug 1417052 - Use unique keyword in browser_ext_omnibox.js r=aswan
Manually verified using the STR from
https://bugzilla.mozilla.org/show_bug.cgi?id=1417052#c47

I am not re-enabling the test by default because the same test file is
reported to have another intermittent (bug 1416103).

MozReview-Commit-ID: 1xsyjMMby1H
2018-08-01 13:49:27 +02:00
Rob Wu
dd6a58d101 Bug 1477271 - Require "search" permission for search API r=aswan
And re-enable the test_ext_all_apis.html test to ensure that new APIs
are only available by default if the contributor really intents to.

MozReview-Commit-ID: FWIKybrk0EE
2018-07-31 20:14:03 +02:00
Rob Wu
d3152c0a68 Bug 1454627 - Fix timing issue in browser_ext_user_events.js r=mixedpuppy
The hard-coded wait exists to avoid a test failure caused by a
non-functional click event in an options browser. However, that
still does not get rid of the intermittent failure.

To really avoid the timing issue, check whether onclick was fired
after supposedly triggering a click, and if not, wait and retry.

MozReview-Commit-ID: 9eg6sz1s1e3
2018-07-31 16:58:41 +02:00
Rob Wu
62eed67e94 Bug 1454627 - Run "onclick" event of menu with user input r=mixedpuppy
MozReview-Commit-ID: r1URJfOKUB
2018-07-27 19:06:00 +02:00
Rob Wu
470988a79e Bug 1454627 - Re-enable browser_ext_user_events.js (bug 1381305) r=mixedpuppy
Re-enable the test that was disabled in bug 1381305 and fix the
underlying issue that caused th intermittent failure in the first place.

MozReview-Commit-ID: BL9wS2fogaf
2018-07-27 18:52:21 +02:00
Bogdan Tara
feafe17abc Backed out 3 changesets (bug 1454627) for test-oop-extensions/browser_ext_user_events.js failures
Backed out changeset 38d9cbe6e3d2 (bug 1454627)
Backed out changeset 44b38de7dc3d (bug 1454627)
Backed out changeset 22de883763ac (bug 1454627)
2018-08-01 00:36:28 +03:00
Bogdan Tara
6f081ed278 Backed out changeset 7e49d55f0240 (bug 1446956) for browser_ext_omnibox.js failures CLOSED TREE 2018-07-31 21:07:33 +03:00
Bogdan Tara
ea859bd8e9 Backed out changeset cc67a75b9160 (bug 1446956) for browser_ext_omnibox.js failures CLOSED TREE 2018-07-31 21:03:08 +03:00
Rob Wu
1d4c065e90 Bug 1454627 - Fix timing issue in browser_ext_user_events.js r=mixedpuppy
MozReview-Commit-ID: 9eg6sz1s1e3
2018-07-31 16:58:41 +02:00
Rob Wu
751fcead2b Bug 1454627 - Run "onclick" event of menu with user input r=mixedpuppy
MozReview-Commit-ID: r1URJfOKUB
2018-07-27 19:06:00 +02:00
Rob Wu
184ef513b1 Bug 1454627 - Re-enable browser_ext_user_events.js (bug 1381305) r=mixedpuppy
Re-enable the test that was disabled in bug 1381305 and fix the
underlying issue that caused th intermittent failure in the first place.

MozReview-Commit-ID: BL9wS2fogaf
2018-07-27 18:52:21 +02:00
Rob Wu
699523d556 Bug 1446956 - Test that activeTab is not granted for bookmarks menu r=mixedpuppy
This ensures that the check that was introduced by bug 1370499 still
continues to work even though it was refactored by the previous commit.

MozReview-Commit-ID: GdbIPA6vxIB
2018-07-19 16:35:22 +02:00
Rob Wu
1d79655b12 Bug 1446956 - Grant access to the clicked tab in menus.onClicked r=mixedpuppy
MozReview-Commit-ID: 3mVWOEcZFYn
2018-07-18 22:04:58 +02:00
Boris Zbarsky
df1e81934e Bug 1446940 part 2. Stop getting docshells from windows via getInterface in browser. r=gijs 2018-08-01 13:07:10 -04:00
Coroiu Cristina
d92d7acb5a Backed out 2 changesets (bug 1454627) for frequently failing browser-chrome at browser/components/extensions/test/browser/test-oop-extensions/browser_ext_user_events.js
Backed out changeset 3285f664c261 (bug 1454627)
Backed out changeset 9661870b7453 (bug 1454627)
2018-07-31 03:49:03 +03:00
Rob Wu
af9c99b63b Bug 1454627 - Run "onclick" event of menu with user input r=mixedpuppy
MozReview-Commit-ID: r1URJfOKUB
2018-07-27 19:06:00 +02:00
Rob Wu
173459ef69 Bug 1454627 - Re-enable browser_ext_user_events.js (bug 1381305) r=mixedpuppy
Re-enable the test that was disabled in bug 1381305 and fix the
underlying issue that caused th intermittent failure in the first place.

MozReview-Commit-ID: BL9wS2fogaf
2018-07-27 18:52:21 +02:00