Commit graph

1301 commits

Author SHA1 Message Date
Rob Wu
2cf5e43401 Bug 1215376 - fix linting and test issues from rebase r=mixedpuppy
- Work-around in browser_ext_menus_events.js for bug 1428213
- Fix indentation issues (eslint)
- Hide the "pageUrl" property for bookmark menu events
  (fixes test failure in test_bookmark_contextmenu).

MozReview-Commit-ID: 4YHJci0J7Rh

--HG--
extra : rebase_source : 3879e843bd2826fcd34dbd41708d570024e681e8
2018-01-05 01:13:04 +01:00
Rob Wu
31f0051ebc Bug 1215376 - Test menu event order: onShown, onClicked, onHidden r=mixedpuppy
This test ensures that the menu events will always be fired in the
natural event order.

Two menus are tested:
- A context menu in the page.
- The tools menu.

MozReview-Commit-ID: 4sLyvgMYMtE

--HG--
extra : rebase_source : 9837661f034530b63c9cbbbb3104fb6367f513a8
2017-09-26 19:25:22 +02:00
Rob Wu
ea69a1a9b5 Bug 1215376 - Fire menus.onShown for every menu r=mixedpuppy
This commit lifts the restriction that onShown is only fired for
extensions with a visible menu item.

MozReview-Commit-ID: Ao4MgBoRWLR

--HG--
extra : rebase_source : c1acd1bcbfdcc6ef4bfaf199f3f016dde71ad2e5
2017-09-14 18:28:36 +02:00
Rob Wu
c9ac969282 Bug 1215376 - refactor: re-use onShown event generator for onClicked r=mixedpuppy
The logic in onClicked had some flaws:
- editable can be undefined instead of a boolean.
- linkText, linkUrl is set in non-link contexts.
- srcUrl is set even in non-media contexts.

This change does not add new tests, because test coverage for the
event data generator is provided by:
browser/components/extensions/test/browser/browser_ext_menus_events.js

There is one observable change here.
Previously, linkUrl and linkText would also be set for non-link context
if the selected text contained a URL. When this happens, then
nsContextMenu.js sets onPlainTextLink=true.
With this refactor, linkText and linkUrl are only set if the context is
"link" (onLink=true).

MozReview-Commit-ID: 2xf1F41bn0U

--HG--
extra : rebase_source : 698e0b9a2eb10f58d02e062f930753752aff9a54
2017-09-14 16:41:14 +02:00
Rob Wu
fc7e2d4ea9 Bug 1215376 - Add more contextual information to onShown r=mixedpuppy
- Adds most of the OnClickData properties to the onShown event parameter
  (except for menu-specific properties such as parentMenuId / checked).
- Add tests to verify the values of these properties.

MozReview-Commit-ID: 7705sJyAOIJ

--HG--
extra : rebase_source : 8948ea20129cfd1c34653a3cbe9b36cebd6fa00d
2017-09-14 16:37:57 +02:00
Rob Wu
582474fa51 Bug 1215376 - Always use old contextData upon refresh r=mixedpuppy
MozReview-Commit-ID: K1wfFCYpMqB

--HG--
extra : rebase_source : c82f9d01631e3d4160de0c49657dd7d8ca8c7a6a
2017-09-14 02:11:29 +02:00
Rob Wu
e86d6006f0 Bug 1215376 - Add menus.refresh to update menus r=mixedpuppy
Together with the previous patches that introduced menus.onShown,
this enabled extensions to update/remove menu items after a menu
has been shown.

At this point, it is not yet possible to add a menu item if an
extension has not shown a menu item before; this can be added later.

MozReview-Commit-ID: E0JrE9gd4gS

--HG--
extra : rebase_source : 0d21c369eb17b3a819603f27af8d9f9fccf5b783
2017-09-13 03:14:00 +02:00
Rob Wu
13cdced616 Bug 1215376 - Refactor gMenuBuilder.build r=mixedpuppy
Splot gMenuBuilder.build in three separate functions because the
individual functionality is needed later.

This is just moving some code around, nothing interesting to see.

MozReview-Commit-ID: Lo6QmLQBtO5

--HG--
extra : rebase_source : 6476a8834c378d6fa059fab1a5f2323f82688658
2017-09-12 02:34:41 +02:00
Rob Wu
a495a0b1c0 Bug 1215376 - Ensure that menu elements have a unique ID r=mixedpuppy
Previously, there was no guarantee for the uniqueness of the ID.
Now the ID is unique, and always set.

See https://bugzil.la/1358213#c6 and #c7 for examples of collisions.

MozReview-Commit-ID: 7CHP6tWFDUg

--HG--
extra : rebase_source : a585dcfd3a83eb590de9b69a02dba8b4bb1b0a0c
2017-09-11 01:01:41 +02:00
Rob Wu
e9a64ba705 Bug 1215376 - Add onShown and onHidden to contextMenus/menus API r=mixedpuppy
This commit adds the bare minimum to support the onShown and onHidden
methods in the contextMenus and menus API (plus tests).

The onShown event data may be extended in a separate commit, to make it
easier to see how the additional properties are reflected in the tests.

MozReview-Commit-ID: 20VJS2YLhTN

--HG--
extra : rebase_source : 1fe9985b2e5daa1be455e07ccf58e36e6d9fe508
2017-09-10 01:38:45 +02:00
Rob Wu
5926434b44 Bug 1215376 - allow itemToSelect to be null in menu closing test utility r=mixedpuppy
Most close*Menu methods in browser tests allow itemToSelect to be null.
Some did not.
Now they do (after this commit)

MozReview-Commit-ID: 2jSGAi2R3ZD

--HG--
extra : rebase_source : 897d4a66f5b1da8027180f85c5f5f5284734e860
2017-09-09 19:41:56 +02:00
dw-dev
9d2e97a23a Bug 1415507 - changes to tabs.saveAsPDF(); r=mixedpuppy
There are three changes:

1. Adds a print progress listener to tabs.saveAsPDF() in ext-tabs.js so that the
  'saved' or 'replaced' status is not returned until the PDF file has been saved.

2. Adds four more "edge" properties to the  pageSettings object to allow positioning
   of the page headers and footers.

3. Adds automated tests for tabs.saveAsPDF() in browser_ext_tabs_saveAsPDF.js that
   cover all returned statuses: saved, replaced, canceled, not_saved, not_replaced.

MozReview-Commit-ID: iljvT8wp11

--HG--
extra : rebase_source : 081f8b6ed56ecaa5f5f5414a11f57b143c0fd19e
2018-01-19 14:13:33 +00:00
Jan Odvarko
c59f2d5676 Bug 1311177 - Implement the devtools.network.getHAR API method; r=jdescottes,rickychien,rpl
MozReview-Commit-ID: gUtGjbr0FQ

--HG--
extra : rebase_source : 78f837101f83d5ad455fc7e2d1f53db054cec4cc
2018-01-22 18:30:46 +01:00
Tooru Fujisawa
f3708770fd Bug 1431961 - Wait for the extension startup code before starting tests in browser/components/extensions/test/browser/browser_ext_user_events.js r=kmag 2018-01-21 14:29:42 +09:00
Oriol Brufau
2259549f9d Bug 1424538 - Allow pageAction and sidebarAction set* methods to accept a null value (desktop). r=mixedpuppy
MozReview-Commit-ID: FqcRrFDYqWp

--HG--
extra : rebase_source : 0ae2cfb1db75f3abbdc9b0e57c56848dadd3a431
2017-12-18 20:41:10 +01:00
Margareta Eliza Balazs
9ba236fd80 Backed out changeset 32daec7fd5b6 (bug 1311177) for bc5 failures in browser/components/extensions/test/browser/test-oop-extensions/browser_ext_devtools_network.js on a CLOSED TREE 2018-01-19 11:54:43 +02:00
Noemi Erli
9f768aa4e8 Backed out changeset 9687e3d987be (bug 1415507) for bc failures in browser/components/extensions/test/browser/browser_ext_tabs_saveAsPDF.js on a CLOSED TREE 2018-01-19 10:22:14 +02:00
Jan Odvarko
e1114707d4 Bug 1311177 - Implement the devtools.network.getHAR API method; r=jdescottes,rickychien,rpl
MozReview-Commit-ID: I9F4tGSwBrt

--HG--
extra : rebase_source : ce3adb6ce47e62302b29651a05276d13621679cb
2018-01-17 13:32:42 +01:00
dw-dev
0af31f6b53 Bug 1415507 - changes to tabs.saveAsPDF(); r=mixedpuppy
There are three changes:

1. Adds a print progress listener to tabs.saveAsPDF() in ext-tabs.js so that the
  'saved' or 'replaced' status is not returned until the PDF file has been saved.

2. Adds four more "edge" properties to the  pageSettings object to allow positioning
   of the page headers and footers.

3. Adds automated tests for tabs.saveAsPDF() in browser_ext_tabs_saveAsPDF.js that
   cover all returned statuses: saved, replaced, canceled, not_saved, not_replaced.

MozReview-Commit-ID: LMTjKDjBwY3

--HG--
extra : rebase_source : 3fc661c737ee5800d9d40e51ecafc11a946e8780
2018-01-18 10:15:36 +00:00
Shane Caraveo
636a2a5a8f Bug 1423725 add show/hide tabs api, r=rpl
MozReview-Commit-ID: 4z73ZTRE7kN

--HG--
extra : rebase_source : 7683973921b07818c7a63ab8387e4ebe65705499
2018-01-18 16:37:18 -07:00
Shane Caraveo
d78ea2931e Bug 1423725 add event, query and details for hidden status, r=Gijs,rpl
MozReview-Commit-ID: AMcmbh4m8lK

--HG--
extra : rebase_source : 6e8c246cbe69e4d298de031361e10276ddbf7551
2018-01-18 16:37:11 -07:00
Oriol Brufau
ac5db38313 Bug 1427107 - Reject setBadgeBackgroundColor promise for invalid string colors r=mixedpuppy
MozReview-Commit-ID: 1XXiQCDe7Tu

--HG--
extra : rebase_source : df1ab14e9473d1fab42016ea31823274838bffdd
2018-01-11 18:56:18 +01:00
Mark Striemer
5ee733c0c6 Bug 1424259 - Fix alignment of extension sidebar action icons r=mixedpuppy
MozReview-Commit-ID: 4RQv30imV3B

--HG--
extra : rebase_source : 03a60c98f7d64a4143c4ea76378bc95f35d3106c
2018-01-11 22:53:02 -06:00
Oriol Brufau
52b205414a Bug 1427431 - Add methods to check if browser/page/sidebar actions are enabled/shown/open r=mixedpuppy
MozReview-Commit-ID: DPbg8SwKVQL

--HG--
extra : rebase_source : 9364415cfed7ed47083d2b67782930ed99d9a021
2018-01-11 18:19:02 +01:00
Tim Nguyen
40b755ffc4 Bug 1427463 - Implement tabs.captureTab(tabId). r=mixedpuppy
MozReview-Commit-ID: 5sr3I1A1b8A

--HG--
rename : browser/components/extensions/test/browser/browser_ext_tabs_captureVisibleTab.js => browser/components/extensions/test/browser/browser_ext_tabs_captureTab.js
extra : rebase_source : 3bcadd40eb506bbaef53f0cafcbcd4347e5cf58b
2018-01-10 14:51:43 +00:00
Ciure Andrei
f7400ad72e Merge inbound to mozilla-central r=merge a=merge 2018-01-11 11:54:56 +02:00
Cameron McCormack
664c1757c0 Bug 1427419 - Part 12: Move inIDOMUtils.colorToRGBA to InspectorUtils. r=bz
MozReview-Commit-ID: 9EAdNibvZ4
2018-01-11 12:38:00 +08:00
Doug Thayer
b3eef35a05 Bug 1421703 - replace onVisit with onVisits r=mak
There's a heavy enough overhead to going through XPConnect for
every observer for every visit on the nsINavHistoryObserver
interface, so this patch reduces that by replacing the single-
visit notification with one which accepts an array of visits.

Some notes: To avoid problems with the orderings of the various
ways in which we notify about visits, we have to send our bulk
onVisits notification before doing any of the others. This does
mean it technically behaves slightly different than the prior
approach of interleaving the notifications, but I can't find any
way in which this has any consequences to the end result, and it
doesn't break any tests.

MozReview-Commit-ID: GdeooH8mCkg

--HG--
extra : rebase_source : 48b5f886c4650a756e70f4657cb9d62c8ce40f74
2017-12-20 14:27:24 -08:00
Luca Greco
fdcbd7477c Bug 1380855 - Fix intermittency and speed up devtools panel webextension test. r=mixedpuppy
MozReview-Commit-ID: 27DFuD9hYUa

--HG--
extra : rebase_source : e2fb1576ae60f150630613f5c2e5d5d137651fb7
2018-01-05 19:16:53 +01:00
Tooru Fujisawa
75c3fdab9c Bug 1426599 - Wait for the next event tick after onLocationChange, in browser/components/extensions/test/browser/browser_ext_url_overrides_newtab.js. r=Gijs 2018-01-06 16:24:43 +09:00
Luca Greco
d9b0711c09 Bug 1425224 - Use manifest.ExtensionURL in devtools.panels.create API schema. r=mixedpuppy
MozReview-Commit-ID: AR6j1fC0PmJ
2017-12-14 18:20:59 +01:00
Lukas Jung
21f7b5704f Bug 1370228 - "Context menu title with placeholder always shows ellipsis" [r=mixedpuppy]
--HG--
extra : rebase_source : aaf2763c9f28d196376e5d543978b7e6b788b704
2017-12-21 08:33:00 +02:00
Andrew Swan
e66f92191d Bug 1426259: Revamp processing of manifest.json for themes r=kmag
MozReview-Commit-ID: 6dWy8wwrobY

--HG--
extra : rebase_source : f742c50f06a358b30f20eabf1cd81713dbfaa86f
2017-12-20 16:06:50 -08:00
Florian Quèze
0f55cd45be Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +01:00
Tim Nguyen
fd655b880c Bug 1425868 - Consolidate arrow panel styling. r=dao
Original patch by Jared Wein [:jaws]

MozReview-Commit-ID: D8GxCjJ8Si3

--HG--
extra : rebase_source : 3f877d5b69e3ab86ad7d8b769e6b5459cea3b5bf
2017-12-19 08:00:00 -06:00
Dorel Luca
525a28839c Backed out changeset 4f6ed26bdb9b (bug 1425868) for build bustages on OS X and Windows r=backout on a CLOSED TREE 2017-12-19 15:43:13 +02:00
Tim Nguyen
d93d23734a Bug 1425868 - Consolidate arrow panel styling. r=dao
Original patch by Jared Wein [:jaws]

MozReview-Commit-ID: RAGeRpgoJF

--HG--
extra : rebase_source : 1ae76e2f510bda16d72e1947e92d8d882bf7a01a
2017-12-19 07:00:24 -06:00
Andrew Swan
b71f9b4b1a Bug 1423425 Stop reading the Extension.jsm module object in specialpowers r=kmag
The return value from Cu.import() does not include lexically scoped
symbols so stop using it here.  Also stop using Extension.generate()
while we're here.

MozReview-Commit-ID: HnX3RGgDHbR

--HG--
extra : rebase_source : b4e238f2a5f1c9dce838b4dd70447edd9f401c10
2017-12-18 10:32:23 -08:00
Mark Striemer
02fae21b7d Bug 1414018 - Go to new New Tab page after disabling add-on in New Tab doorhanger r=aswan
MozReview-Commit-ID: 7ZXehNEC6ml

--HG--
extra : rebase_source : b1b78fe53e1049df326649a76be5a39259ebc919
2017-11-29 17:14:54 -06:00
Masatoshi Kimura
295faed3f9 Bug 1418914 - Move E10SUtils.jsm into toolkit/. r=mossop
MozReview-Commit-ID: EgDzEEKAeh1

--HG--
rename : browser/modules/E10SUtils.jsm => toolkit/modules/E10SUtils.jsm
extra : rebase_source : 0920ce818773af797a0daf3cf4ae90af41d71d2a
2017-12-12 21:35:16 +09:00
Andreea Pavel
5ba2665757 Merge inbound to mozilla-central r=merge a=merge 2017-12-09 22:21:17 +02:00
Kris Maglione
4a4c4fdfd4 Bug 1421459: Update to ESLint 4 "indent" rule. r=aswan
MozReview-Commit-ID: LxLDWlsIlSk

--HG--
extra : rebase_source : 5762bdf08ff6c09c1b29f87366bddb552e4c74b2
extra : amend_source : 922a0c03722bd5a81daace7f0289ec3228191cfb
2017-11-28 14:13:59 -08:00
Bill McCloskey
9f4d083047 Bug 1412456 - Test changes to no longer use interposition (r=felipe,bgrins,mrbkap)
MozReview-Commit-ID: 2nQPOSGTr1s
2017-12-07 12:55:24 -08:00
Oriol Brufau
a9a6960797 Bug 1419940 - Allow browserAction set* methods to accept a null value. r=aswan
MozReview-Commit-ID: H2UfUITBEMm

--HG--
extra : rebase_source : 470bcb87dc3389430068bd374084192a375aa1fd
2017-11-29 05:50:00 +01:00
Andreea Pavel
89531e8dc3 Backed out 9 changesets (bug 1412456) for crashing talos g2 and unexpected network connections in browser-chrome's browser_searchEngine_behaviors.js r=backout a=backout on a CLOSED TREE
Backed out changeset 0c01a98f4fd5 (bug 1412456)
Backed out changeset 27077db47231 (bug 1412456)
Backed out changeset f35ec2a884f8 (bug 1412456)
Backed out changeset 602b30ac3c69 (bug 1412456)
Backed out changeset b1ff1050c589 (bug 1412456)
Backed out changeset f100d953f9eb (bug 1412456)
Backed out changeset d85af60fe259 (bug 1412456)
Backed out changeset 736f38486832 (bug 1412456)
Backed out changeset 13a637602dc2 (bug 1412456)
2017-12-07 12:20:21 +02:00
Bill McCloskey
bef7c122df Bug 1412456 - Test changes to no longer use interposition (r=felipe,bgrins,mrbkap)
MozReview-Commit-ID: 2nQPOSGTr1s
2017-12-06 21:17:05 -08:00
Dorel Luca
eb65c24c7b Backed out 8 changesets (bug 1412456) for ESlint failure on browser_urlbarKeepStateAcrossTabSwitches.js:13:49 r=backout on a CLOSED TREE
Backed out changeset 0e88de036c55 (bug 1412456)
Backed out changeset 49b93f807db0 (bug 1412456)
Backed out changeset 039e980b7dc6 (bug 1412456)
Backed out changeset c7698410ddbd (bug 1412456)
Backed out changeset e56a1ba26b7c (bug 1412456)
Backed out changeset 0c4506e124ac (bug 1412456)
Backed out changeset a7aec2ce903b (bug 1412456)
Backed out changeset 3e9fb71f1e8e (bug 1412456)
2017-12-07 07:09:33 +02:00
Bill McCloskey
be77cf4a01 Bug 1412456 - Test changes to no longer use interposition (r=felipe,bgrins,mrbkap)
MozReview-Commit-ID: 2nQPOSGTr1s
2017-12-06 20:46:58 -08:00
Ryan VanderMeulen
d945b2a059 Bug 1423667 - Disable some tests that fail on Windows Code Coverage builds with clang-cl r317840. rs=marco
--HG--
extra : histedit_source : d2f4b4d59301469c4cabb7198f0f98c5247eab84
2017-12-06 20:40:46 -05:00
Shane Caraveo
f27fb376d0 Bug 1419842 support pattern matching to show/hide pageActions, r=aswan
MozReview-Commit-ID: bYcR08xX8r

--HG--
extra : rebase_source : cdd22772e6b319dc3fb2c8895503bf22f872f745
2017-12-05 14:41:21 -08:00