Commit Graph

798 Commits

Author SHA1 Message Date
Kris Maglione
b60b9cd3ac Bug 1306447: Remove b2g support code from WebExtensions. r=aswan
MozReview-Commit-ID: L3g01tpDSwH
2016-09-29 21:10:30 +01:00
Kris Maglione
2874f6f820 Bug 1295867: Fix race in handling buffered stderr output from native app. r=me
MozReview-Commit-ID: 14wEDVGlRyb
2016-09-30 00:06:42 +01:00
Tomislav Jovanovic
32a487cd24 bug 1293355 - add fromCache to onResponseStarted details, r=kmag
MozReview-Commit-ID: GO0a8s8D2oT
2016-09-21 21:57:15 +02:00
Tomislav Jovanovic
4d2be23e86 Bug 1247791 - Implement options.saveAs for downloads.download, r=kmag
MozReview-Commit-ID: 5MrObsL7eTw
2016-09-19 22:39:22 +02:00
Phil Ringnalda
f9b2178711 Backed out changeset 9b6a4552a5c2 (bug 1254221) for test_ext_cookies.html timeouts and lint failures
CLOSED TREE
2016-09-27 18:21:01 -07:00
Jesper Kristensen
69262c1580 Bug 1254221 - Support private browsing cookies in WebExtensions r=kmag
MozReview-Commit-ID: 29ci8wbnMra
2016-05-15 12:18:13 +02: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
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
Carsten "Tomcat" Book
564bff267b merge mozilla-inbound to mozilla-central a=merge 2016-09-23 12:05:53 +02:00
Ehsan Akhgari
0a2b381a4b Bug 1297687 - Part 1: Remove nsIScriptSecurityManager.createExpandedPrincipal(); r=bholley 2016-09-22 13:27:33 -04:00
Bob Silverberg
c49878e5a9 Bug 1299775 - Implement chrome.idle.onStateChanged, r=aswan
MozReview-Commit-ID: 2M5prJYDdqe
2016-09-19 15:44:09 -04:00
Carsten "Tomcat" Book
2dfe81885a merge mozilla-inbound to mozilla-central a=merge 2016-09-22 11:55:12 +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
Matthew Wein
c26b978847 Bug 1302898 - Rename 'restrictions' to 'allowedContexts' r=kmag
All tests pass locally.

MozReview-Commit-ID: 5dPPthlPT6i
2016-09-19 17:36:46 -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
Kris Maglione
bad292d78c Bug 1304331: Support setting the Content-Type header from WebRequest observers. r=mao
MozReview-Commit-ID: 93joPUweJ2x
2016-09-21 14:17:24 +01:00
Bob Silverberg
1112aa9792 Bug 1280404 - Implement chrome.webNavigation.onTabReplaced, r=aswan
MozReview-Commit-ID: 6K167oHyqz2
2016-09-14 15:57:21 -04:00
Tomislav Jovanovic
dee0f400d7 Bug 1280044 - handle subdirs in browser.downloads filenames, r=aswan
MozReview-Commit-ID: B4WoMbdxYjV
2016-09-09 19:38:01 +02:00
Ben Kelly
ab46e8bcda Bug 1300658 P7 Make test_ext_downloads_search.js wait for full window file removal. r=aswan 2016-09-13 20:14:02 -07:00
Rob Wu
e97808b72d Bug 1298979 - Add test to verify that sending a message and unloading works r=billm
Checks what happens before closing a window or removing a frame:

- Tests that sendMessage/connect is received by the extension.
- Tests that any responses from the extension is not received by the
  sending script (of the closing context).

MozReview-Commit-ID: 9VwCpRmaZOO
2016-08-28 16:26:52 -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
b725840b0b Bug 1298979 - Decouple ProxyContext from ExtensionContext r=billm
To allow ExtensionContext to be refactored, we first need to remove the
dependency of ProxyContext on ExtensionContext.

With the decoupling, we can make setContentWindow unconditional and
remove externallyVisible. Let's clean up later.

MozReview-Commit-ID: 1KmSQpxFTVK
2016-08-24 23:29:29 -07:00
Bob Silverberg
17f3bb9df7 Bug 1220136 - WebExtensions support chrome.management.uninstallSelf, r=kmag
MozReview-Commit-ID: L80ynbuFr7U
2016-09-07 10:06:01 -04:00
Tomislav Jovanovic
24e5cad3b1 bug 1268399 - add runtime.getBrowserInfo() method with AppInfo data r=kmag
MozReview-Commit-ID: GvwFG0CyfR7
2016-09-04 21:22:18 +02:00
Luca Greco
f580d6bc87 Bug 1252215 - [webext] Fix promiseAddonStartup defined in xpcshell tests. r=kmag
MozReview-Commit-ID: BXYXHDrG6zL
2016-09-01 19:42:41 +02:00
Luca Greco
36fc29ed1f Bug 1252215 - [webext] Add Embedded Extensions helper to LegacyExtensionsUtils. r=aswan,kmag
This patch introduces helper for the embedding of a webextension (and new related tests).

The new exported helpers are going to be integrated in the XPIProvider
to provide the Embedded WebExtension to the Legacy Extensions which
have enabled it in their install.rdf

MozReview-Commit-ID: 7M1DRkXjGat
2016-08-29 15:56:02 +02: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
Phil Ringnalda
5cc38dcb0f Back out 73e11489018d (bug 1220136) for Windows failures in test_ext_management_uninstall_self.js 2016-09-03 11:03:29 -07:00
Bob Silverberg
c100f137d1 Bug 1299846 - Complete the implementation of chrome.idle.queryState, r=kmag
MozReview-Commit-ID: jYsePeTluZ
2016-09-01 09:28:56 -04:00
Bob Silverberg
df4cc09083 Bug 1220136 - WebExtensions support chrome.management.uninstallSelf, r=kmag
MozReview-Commit-ID: L80ynbuFr7U
2016-08-15 15:32:36 -04:00
Kris Maglione
04c93fc6ca Bug 1339144 - Use windowless browser for remote background pages. r=aswan
MozReview-Commit-ID: LfmPbkTsgwu
2017-02-16 17:26:15 -08:00
Iris Hsiao
a03d2f9e7d Backed out changeset c122b0183c7c (bug 1339144) for xpcshell failures 2017-02-17 10:40:20 +08:00
Kris Maglione
04eaecabfd Bug 1339144 - Use windowless browser for remote background pages. r=aswan
MozReview-Commit-ID: LfmPbkTsgwu
2017-02-16 17:26:15 -08:00
Kris Maglione
31297b2525 Bug 1298939: Don't initialize APIs that the extension does not have permissions for. r=rpl
MozReview-Commit-ID: Y0MTBL1z2O
2016-09-01 13:04:54 -07:00
Rob Wu
31679e4596 Bug 1298716 - Unify use of ExtensionTestUtils.loadExtension r=billm
MozReview-Commit-ID: DT6rx6KYODl
2016-08-28 17:22:03 -07:00
Kris Maglione
1b64819992 Bug 1298810: Pass Port object to listeners on native messaging ports. r=rpl
MozReview-Commit-ID: 1saUOB1jyE1
2016-08-29 13:12:16 -07:00
Ryan VanderMeulen
7ffccc8668 Merge inbound to m-c. a=merge 2016-08-30 09:52:55 -04:00
Thomas Wisniewski
c030c85638 Bug 289714 - Do not write <parsererror> nodes for invalid XML documents in XMLHttpRequests made by web content. r=billm, r=bz 2016-08-29 16:30:36 -04:00
Rob Wu
4d5d4452a8 Bug 1286124 - Part 2/2 - Do not deliver messages to the sender's frame r=kmag
MozReview-Commit-ID: 8xZPDIJyMEo
2016-07-13 21:33:56 -07:00
Rob Wu
719db77cf5 Bug 1286124 - Part 1/2 - Modify existing tests to not use same-frame messaging r=kmag
MozReview-Commit-ID: CtCcajKYAoR
2016-07-13 16:25:58 -07:00
Shubheksha Jalan
b8f5ca14cd Bug 1282978 - Accept and ignore the minimum_chrome_version manifest property. r=kmag
MozReview-Commit-ID: C9AlxpQDCnC
***
Bug 1282978 - Fixed tabs and spacing issues

MozReview-Commit-ID: 3SSpQpvZY2B
2016-08-30 00:40:33 +05:30
Rob Wu
8eb396a770 Bug 1287010 - Add test for SchemaAPIManager's loadScript r=billm
And change `this.global.Object.create(null)` to
`Cu.createObjectIn(this.global)`. The tests pass either way, but
`Cu.createObjectIn` is more explicit.

MozReview-Commit-ID: LmL6rTru5zZ
2016-08-24 15:40:35 -07:00
Rob Wu
becfb68e93 Bug 1287010 - Refactor shouldInject / pathObj r=billm
Split the `shouldInject` method into separate methods:
- `shouldInject` to determine whether the API (or namespace)
  should be injected.
- `getImplementation` to return the actual implementation.

Introduced `SchemaAPIInterface` for documentation purposes, and
two concrete implementations `LocalAPIImplementation` and
`ProxyAPIImplementation` which provide the functionality to run a local
and remote implementation of the API for which the schema API is
generated, respectively. These classes store the necessary details for
the invocation, so the methods that were formerly in the `Context` in
Schemas.jsm no longer get the `pathObj`, `path` or `name` parameters.

And merge the `path` and `name` in the implementation of remote APIs
because there is no need for having them separate, as the callers and
callees often did redundant pre/post-processing on `data.path` because
of the way it was implemented.

MozReview-Commit-ID: isbG9i9pNP
2016-08-24 01:03:49 -07:00
Rob Wu
fc61c013eb Bug 1287010 - Prepare for moving content script APIs to schemas r=billm
- By default, schema APIs are not injected in content scripts unless
  the JSON schema sets the "restrictions" attribute to `["content"]`.
- Added the "restrictions" attribute to the storage and test schemas.
  Other APIs will follow in subsequent commits and make use of the
  primitives introduced in this commit.

MozReview-Commit-ID: 1rNjQap0BiM
2016-08-18 17:46:57 -07:00
Rob Wu
812e170fe8 Bug 1287010 - Make environment of Context explicit. r=billm
- Add `envType` to BaseContext.
 - Pass an explicit envType to all `registerSchemaAPI` invocations.
 - The factories passed to `registerSchemaAPI` will be split up later, so
   that content scripts (`content_child`) and addon pages can share
   common implementations.
 - The factories that implement the addon API will also be split up,
   to separate code running in the main process (`addon_parent`) from
   code running in a child process (`addon_child`).
 - Remove the use of a hardcoded list of `namespaces` from ProxyContext.
   Now `envType` is used to specify whether an API should be activated.

MozReview-Commit-ID: Jiff8HIwG92
2016-08-16 15:51:50 -07:00
Rob Wu
42e49c6137 Bug 1287010 - Add pathObj parameter to Schemas r=billm
Local wrappers currently look up the API object over and over again
whenever a schema API is invoked. This can be optimized by re-using
the lookup result from a `shouldInject` invocation, which is passed
as the `pathObj` parameter to the wrapper methods.

This commit adds the necessary changes and tests to allow this to
happen, but does not modify the wrapper in Extension.jsm yet.

Also, this construction allows the `ChildAPIManager` to use a local
implementation if available and fall back to a remote implementation
otherwise.

MozReview-Commit-ID: C9gm7A9Zppb
2016-08-19 00:35:07 -07:00
Ryan VanderMeulen
65e0550627 Merge m-c to inbound. a=merge 2016-08-24 09:09:05 -04:00
Andrew Swan
ffbad6824f Bug 1297229 Run experiments APIs through schemas r=kmag
It is not directly related to the current bug but I added a test
for browser.extentionTypes while I was here.

MozReview-Commit-ID: 2XifKm3ZhrY
2016-08-22 16:50:32 -07:00
Rob Wu
52997a1c5a Bug 1297202 - Support cross-namespace submodule references in schemas r=aswan
MozReview-Commit-ID: 5JfOI3i3xbW
2016-08-22 15:11:47 -07:00