Commit Graph

586 Commits

Author SHA1 Message Date
Ryan VanderMeulen
0cd9c69a12 Merge m-c to autoland. a=merge 2016-10-07 23:22:46 -04:00
Kris Maglione
843c84b50c Bug 1289273: Resolve URLs passed to windows.create relative to the caller. r=aswan a=al
MozReview-Commit-ID: 3TUIK6EvO3q
2016-10-05 20:27:06 +01:00
Tomislav Jovanovic
3dba50915d bug 1278685 - test contextMenus.removeAll with two extensions, r=aswan
MozReview-Commit-ID: AoEw1Jo7m4R
2016-10-07 02:11:05 +02:00
Tomislav Jovanovic
d2118d8126 bug 1301227 - add allowScriptsToClose option to windows.create(), r=kmag
MozReview-Commit-ID: 4p8A1y2FALX
2016-09-23 23:40:24 +02:00
Kris Maglione
6641bc1d39 Bug 1299891: Make pageAction panels tab-specific. r=jaws
MozReview-Commit-ID: D0ZIJzWnUF6
2016-09-29 23:56:58 +01:00
Kris Maglione
0e8fb15468 Bug 1306037: Support options_ui in embedded WebExtensions. r=aswan
MozReview-Commit-ID: KZVPz52qrTS
2016-09-28 23:11:35 +01:00
Rob Wu
ce9c6d652e Bug 1296900 - Hide commands API if manifest key is missing r=kmag
MozReview-Commit-ID: 7vld6MgSlqG
2016-08-20 23:01:43 -07:00
Rob Wu
f70a6dfc83 Bug 1296900 - Add test for availability of default WebExtension APIs r=kmag
MozReview-Commit-ID: LIr5Nsv51I3
2016-08-20 22:21:45 -07:00
Wes Kocher
8174fa8630 Backed out 2 changesets (bug 1296900) for mochitest failures in test_ext_all_apis.html a=backout
Backed out changeset c37cf3cfd39c (bug 1296900)
Backed out changeset 998ed8336288 (bug 1296900)
2016-09-23 16:15:05 -07:00
Rob Wu
08e4735360 Bug 1296900 - Hide commands API if manifest key is missing r=kmag
MozReview-Commit-ID: 7vld6MgSlqG
2016-08-20 23:01:43 -07:00
Rob Wu
b90356b171 Bug 1296900 - Add test for availability of default WebExtension APIs r=kmag
MozReview-Commit-ID: LIr5Nsv51I3
2016-08-20 22:21:45 -07:00
Tomislav Jovanovic
1dbc50dbf9 bug 1274809 - Add missing properties to OnClicked data, r=aswan
MozReview-Commit-ID: 4BodpIuKCz2
2016-09-21 02:12:11 +02:00
Phil Ringnalda
ca89254357 Backed out 2 changesets (bug 1296900) for est_ext_all_apis.html | failures
Backed out changeset fa509c880990 (bug 1296900)
Backed out changeset 06ee8b3640af (bug 1296900)
2016-09-21 18:59:22 -07:00
Rob Wu
36055ef9cc Bug 1296900 - Hide commands API if manifest key is missing r=kmag
MozReview-Commit-ID: 7vld6MgSlqG
2016-08-20 23:01:43 -07:00
Rob Wu
7536f44a24 Bug 1296900 - Add test for availability of default WebExtension APIs r=kmag
MozReview-Commit-ID: LIr5Nsv51I3
2016-08-20 22:21:45 -07:00
Matthew Wein
8a5b1d5dfa Bug 1245346 - Add test for onUpdated while lacking tab permissions. r=kmag
MozReview-Commit-ID: EZysUdjnSJK
2016-04-19 20:13:08 -04:00
Tomislav Jovanovic
1a9e69a168 bug 1288263 - tabs.detectLanguage() returns "und" for undetermined, r=kmag
MozReview-Commit-ID: 72ltWdufHiu
2016-09-10 23:05:02 +02:00
Rob Wu
0734f28b64 Bug 1241719 - Fix intermittent browser_ext_tabs_onUpdated.js r=kmag
MozReview-Commit-ID: LhHS6F0YFUJ
2016-09-10 03:16:39 -07:00
Rob Wu
41872d2a0a Bug 1298979 - Fix LegacyExtensionContext r=aswan
LegacyExtensionContext should inherit from BaseContext instead of
ExtensionContext, because the latter is moving to a separate process.

Remove the optional `url` parameter because the context is not a frame.
`url` is assigned to `sender.url`, which should only be set for frames.
The sender is only used in extension messaging when `runtime.connect` or
`runtime.sendMessage` are used (where `sender.url` is visible at the
receiver). Since legacy extensions don't send messages, there is no
point at all in setting the `url` value.

MozReview-Commit-ID: FJboNC2SZh0
2016-09-06 01:48:58 -07:00
Rob Wu
e966600a6c Bug 1300883 - Use changeInfo.status instead of tab.status in browser_ext_tabs_events.js r=kmag
the tabs.onUpdated event can fire for many reasons.
I observed a test failure because a faviconUrl change triggered the
onUpdated event, which caused on-updated-dims to be sent too early.

MozReview-Commit-ID: 8YT8hSXnIoo
2016-09-06 13:22:11 -07:00
Bob Silverberg
5311746971 Bug 1272676 - Remove HistoryTime and use Date type instead, r=aswan
MozReview-Commit-ID: IqH2eLJwn5d
2016-09-06 12:56:56 -04:00
Luca Greco
ead728d5ad Bug 1252215 - [webext] LegacyExtensionsUtils JSM module and LegacyExtensionContext helper. r=aswan,kmag
- this new module contains helpers to be able to receive connections
  originated from a webextension context from a legacy extension context
  (implemented by the `LegacyExtensionContext` class exported from
  this new jsm module)

- two new test files (an xpcshell-test and a mochitest-browser) ensures that the LegacyExtensionContext can receive a Port
  object and exchange messages with a background page and a content script (the content script test
  is in a different test file because it doesn't currently work on android, because it needs
  the browser.tabs API and the TabManager internal helper)

MozReview-Commit-ID: DS1NTXk0fB6
2016-08-24 18:31:36 +02:00
Wes Kocher
e13f8b0cdf Merge m-c to inbound, a=merge 2016-08-25 17:14:17 -07:00
Kris Maglione
c6c89fc38c Bug 1293287: Close extension popups on extension shutdown. r=aswan
MozReview-Commit-ID: 5lpIk6XrdOM
2016-08-24 16:26:35 -07:00
Rob Wu
a430263825 Bug 1287010 - Use sandbox instead of JSM for global separation r=billm
MozReview-Commit-ID: GSqmh0xC2hW
2016-08-23 16:19:33 -07:00
Rob Wu
a68fdede92 Bug 1287010 - Use minimal global scope for ext-*.js scripts r=billm
Currently there is a tight coupling between registered APIs because they
share the same global scope, and the dependencies between the modules
that use these globals are not explicit. Consequently, it would be
possible for APIs to break when the registered APIs run in separate
processes, because then there are separate global scopes.
To mitigate this issue, this patch isolates the global namespaces of
API registrations in different environments, starting with the "chrome"
process. Content and addon processes will follow later.

A new JSM is introduced to avoid hidden dependencies between ext-*.js
and the script loader. ExtensionUtils.jsm would be a natural choice for
this shared utility method, but cannot be used because its local
`EventEmitter` implementation conflicts with the `EventEmitter` import
in ext-tabs.js.

So, this patch provides isolation of global variables declared through
`globals.XXX = ...`, but does not provide isolation for `Cu.import`-ed
logic. Ideally `Cu.import` should always use its second argument to
prevent inadvertent namespace pollution.

MozReview-Commit-ID: 1DTZaKOaeSE
2016-08-17 20:28:19 -07:00
Kris Maglione
dbe2425b27 Bug 1293548: Split browser_ext_pageAction_context into two files. r=me
MozReview-Commit-ID: 1Zj36K0xkX4
2016-08-23 18:18:27 -07:00
Kris Maglione
b0b7864ffc Bug 1271374: Cache-bust page URL. r=me
MozReview-Commit-ID: FAdxwoxRLMA
2016-08-23 18:00:58 -07:00
Shane Caraveo
16d9f3dd57 Bug 1289549 bump slop in jpg color test, r=maglione
MozReview-Commit-ID: GGNze65Lpkl
2016-08-23 15:24:07 -07:00
Hector Zhao
538abb2038 Bug 1295894 - Show localized strings for browserAction/pageAction title. r=kmag
MozReview-Commit-ID: 1SMd3cnUOH4
2016-08-17 14:39:33 +08:00
Ryan VanderMeulen
0c6be0762e Merge inbound to m-c. a=merge 2016-08-22 09:40:41 -04:00
Rob Wu
47e975c1fb Bug 1286712 - Validate runtime.sendMessage parameters r=billm
The main motive for this patch is to remove the use of the GlobalManager
global (which was used to see if an extension ID is valid, which was
specifically added in order to create thebrowser_ext_lastError.js test).
To preserve test coverage I implemented a full validation of the
runtime.sendMessage method.

Now the error for a non-existent extension is identical in both the
content script and background pages. Note that this also fixes a
minor privacy leak: Previously extensions could see whether another
extension is installed by sending a message to the specified extension
and using the different responses to see whether another extension is
installed.

MozReview-Commit-ID: 82R97Ei25Xr
2016-08-16 21:36:42 -07:00
Kris Maglione
6470e45452 Bug 1296888: Add "webextensions" tag to WebExtension tests. r=aswan
MozReview-Commit-ID: 3QYXtpdznrP
2016-08-20 15:41:31 -07:00
Kris Maglione
007774bc99 Bug 1259093: Follow-up: Fix another test race. r=me
MozReview-Commit-ID: 3DsTcQli8Ga
2016-08-20 14:00:37 -07:00
Kris Maglione
b5af7f0b99 Bug 1259093: Follow-up: Fix some test races. r=me
MozReview-Commit-ID: riVGF5q3xV
2016-08-19 17:20:22 -07:00
Kris Maglione
bfd63ddac8 Bug 1259093: Part 3 - Preload browserAction popups to prevent flicker during opening. r=Gijs r=jaws r=bwinton f=mattw
MozReview-Commit-ID: EpAKLV8VPTn
2016-08-19 12:29:11 -07:00
Bob Silverberg
7a854b5bd7 Bug 1295301 - history.onVisitRemoved argument is wrong after a call to history.deleteAll, r=aswan
MozReview-Commit-ID: 9b9PKAwcNDA
2016-08-16 09:35:37 -04:00
Wes Kocher
bb9e0744e6 Merge inbound to central, a=merge
a=release to get around the webidl hook for a comment-only change
2016-08-16 17:05:30 -07:00
Rob Wu
c7fc69c140 Bug 1294920 - Fix test expectation on high-density screens in browser_ext_browserAction_pageAction_icon_permissions r=billm
MozReview-Commit-ID: 8iQXNEmsMJ5
2016-08-12 19:15:28 -07:00
Rob Wu
8472b153c7 Bug 1290157 - Always pass an array to tabs.executeScript on success r=kmag
MozReview-Commit-ID: Ctw8RUtfEZC
2016-08-09 00:28:47 -07:00
Phil Ringnalda
6bc09b7861 Backed out 3 changesets (bug 1246034) for Win e10s timeouts in browser_ext_commands_execute_browser_action.js
Backed out changeset f1f24546c26c (bug 1246034)
Backed out changeset 2c396099a21d (bug 1246034)
Backed out changeset 8cce25ece209 (bug 1246034)
2016-08-15 21:36:34 -07:00
Wes Kocher
aec3bff611 Bug 1246034 - ESLint followup a=me CLOSED TREE 2016-08-15 15:20:40 -07:00
Wes Kocher
5b870e1886 Merge m-c to inbound, a=merge 2016-08-15 14:53:49 -07:00
Wes Kocher
924bec4dbe Merge inbound to central, a=merge 2016-08-15 14:20:38 -07:00
Kris Maglione
b3640156d8 Bug 1225215: Follow-up: ESLint fix. r=me
MozReview-Commit-ID: WP5idmrVE6
2016-08-14 20:05:07 -07:00
Sebastian Hengst
82a124132f merge mozilla-central to autoland. r=merge a=merge 2016-08-13 13:54:41 +02:00
Sebastian Hengst
10c1305bca Backed out changeset 0c4f81bc2b52 (bug 1252224) for permafailing in browser_ext_browserAction_popup_resize.js on Linux after merge to mozilla-central. r=backout a=backout
MozReview-Commit-ID: KUARkl7QxB7
2016-08-13 13:27:15 +02:00
Wes Kocher
9247be04ab Merge fx-team to central, a=merge CLOSED TREE 2016-08-12 14:37:49 -07:00
Wes Kocher
aecd5f5f0e Merge m-c to autoland, a=merge 2016-08-12 16:30:03 -07:00
Rob Wu
30a88dff65 Bug 1293583 - add test that checks whether the main frame has frame ID 0 r=billm
Tests cannot be run in a new process, so when this test is run along
with other tests, the faulty behavior is not caught.
You can manually check whether the bug is still present by running the
test in isolation:

    mach mochitest browser/components/extensions/test/browser/browser_ext_webNavigation_frameId0.js

MozReview-Commit-ID: LwumSU7zh8R
2016-08-09 00:12:09 -07:00