- 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
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
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
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
- 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
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
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
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
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
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
Now that the interfaces are all async, we can simply replace all
the sync IO in the Chrome migrator with the equivalent async IO.
Other browsers will be addressed in separate patches.
MozReview-Commit-ID: FyGRRKY57Gm
--HG--
extra : rebase_source : 0228b9b72c7217e3f6e607256cb3828bf5819189
migration.js is a special case where we generally need blocking
calls in order for the wizard to work correctly. Accordingly we
block waiting for the new async interfaces. With automigration
and potential new UIs that are in the works for migration, the
asynchronicity of these interfaces will be more relevant, but
here it's not really important enough to make big changes to the
way the UI is implemented.
MozReview-Commit-ID: LkfwBVfpCJO
--HG--
extra : rebase_source : 1f9f2c7e2fa20b883840e091dbee366a161eaaf7
In order to clean up sync IO within our profile migrators, we
need to have async interfaces for those parts which are currently
doing sync IO. This converts the sync interfaces and adjusts most
of the call sites (migration.js call site changes are addressed
in a separate patch to break it out a bit).
MozReview-Commit-ID: 2Kcrxco4iYr
--HG--
extra : rebase_source : 53d123c435e43622a999a7e849dddbe1919061e0
In preferences tests, all calls to waitForEvent function defined in
browser/components/preferences/in-content/tests/head.js has been replaced with
calls to BrowserTestUtils.waitForEvent.
Since we are no longer using the waitForEvent function defined in the
aforementioned head.js file, that definition has been removed.
MozReview-Commit-ID: IrtGJFtWPPj
--HG--
extra : rebase_source : 9d2fbb6194fa9127a9d559d98371dd60503c5e9e
This feature is currently disabled behind a pref, but this pref will be removed when we're green to release it.
MozReview-Commit-ID: 3ZH2UJVdtC0
--HG--
rename : browser/components/newtab/tests/browser/.eslintrc.js => browser/components/enterprisepolicies/tests/browser/.eslintrc.js
Rather then trying to guess options from the parent or the root node, make query nodes directly
inherit some options from their parent.
MozReview-Commit-ID: 1YgDjrrMqGY
--HG--
extra : rebase_source : 5714e6243b0080c977cf6ab454c3f624990414dd