Commit Graph

798 Commits

Author SHA1 Message Date
Kris Maglione
1e9bb5a560 Bug 1296934: Prevent background pages from showing up in global history. r=gabor
MozReview-Commit-ID: GRIJwCsfqVB
2016-08-21 12:43:50 -07: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
Rob Wu
b37ee71c9a Bug 1293132 - Document and enforce contract for Schemas.inject and Schemas.normalize r=kmag
MozReview-Commit-ID: KgSrgHttwrI
2016-08-07 18:36:36 -07:00
Rob Wu
98a49ff299 Bug 1295082 - BaseContext.extensionId -> BaseContext.extension.id r=kmag
MozReview-Commit-ID: 2tFVUwjyJQu
2016-08-16 14:29:52 -07:00
Rob Wu
6efdd88867 Bug 1295082 - Put Extension in BaseContext r=kmag
ExtensionContext in Extension.jsm has |extension| as an instance member,
so use it instead of passing |extension| to registerSchemaAPI's
callback.

And to make sure that this pattern also works in content processes, move
the |extension| member to BaseContext.

MozReview-Commit-ID: BgsGGCPQxJR
2016-08-15 01:04:58 -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
Sebastian Hengst
c7a498ffbd Backed out changeset 0ce1cc39aa3d (bug 1295082) for timing out in test_ext_schemas_api_injection.js. r=backout 2016-08-18 16:47:09 +02:00
Sebastian Hengst
ff21875b1a Backed out changeset dc7b09331202 (bug 1295082) 2016-08-18 16:46:30 +02:00
Rob Wu
7c6379abff Bug 1295082 - BaseContext.extensionId -> BaseContext.extension.id r=kmag
MozReview-Commit-ID: 2tFVUwjyJQu
2016-08-16 14:29:52 -07:00
Rob Wu
6189daa99f Bug 1295082 - Put Extension in BaseContext r=kmag
ExtensionContext in Extension.jsm has |extension| as an instance member,
so use it instead of passing |extension| to registerSchemaAPI's
callback.

And to make sure that this pattern also works in content processes, move
the |extension| member to BaseContext.

MozReview-Commit-ID: BgsGGCPQxJR
2016-08-15 01:04:58 -07:00
Rob Wu
5d41ba7ac3 Bug 1295473 - Fix return type of {tabs,runtime}.sendMessage r=billm
The tabs.sendMessage and runtime.sendMessage implementations behave like
an async function: They take a callback parameter and return a promise.
So they should be handled by |callAsyncFunction|, not
|callFunctionNoReturn|.

This fixes the issue for background pages, but not for content scripts
because sendMessage is not implemented as a schema at the moment. This
will also be fixed once content script APIs are generated via Schemas.

MozReview-Commit-ID: 9p1hvOP0KSm
2016-08-15 23:53:24 -07:00
Rob Wu
c37b6fdf35 Bug 1288901 - Create ExtensionContext at document-element-inserted r=billm
MozReview-Commit-ID: 9ZQWmNjoAXA
2016-08-07 19:10:01 -07:00
Rob Wu
d5bc9c78b6 Bug 1288901 - Destroy ExtensionContext at inner window destruction instead of unload r=billm
MozReview-Commit-ID: 4JI7PpAj9xd
2016-08-07 19:09:56 -07:00
Luca Greco
a82a9b2143 Bug 1290901 - [webext] Add xpcshell test cases on nested namespaces and null/empty api objects. r=aswan
MozReview-Commit-ID: HKh3gXTk09H
2016-08-02 04:00:46 +02:00
Wes Kocher
b9d5a32ad5 Merge inbound to central, a=merge 2016-08-12 13:44:29 -07:00
Kris Maglione
874e487954 Bug 1292369: Null out contentWindow properties when they point to a different inner window than the context belongs to. r=billm
MozReview-Commit-ID: LYQRxpU9vI8
2016-08-04 16:18:25 -07:00
Rob Wu
4200ce686c Bug 1288276 - Add tests for background page context r=billm
MozReview-Commit-ID: 8FsN8NoCreW
2016-08-07 19:09:37 -07:00
Rob Wu
38d4ae8bfc Bug 1288276 - Close proxy context upon page reload, with tests r=billm
MozReview-Commit-ID: HB65DfQTGXd
2016-08-07 19:09:27 -07:00
Bob Silverberg
876abdf297 Bug 1285537 - Create schema for the management API, r=aswan
MozReview-Commit-ID: EXmIv7TwmaK
2016-07-18 17:15:54 -04:00
Rob Wu
c576617ccb Bug 1197451 - Add clipboardWrite permission r=billm
MozReview-Commit-ID: 6d1mQSVWRPe
2016-07-08 17:19:17 -07:00
Andrew Swan
1206774e48 Bug 1286908 Remove id allocation from SpecialPowers loadExtension() r=kmag
Prior to this change, SpecialPowers used the extension id to identiy
extension instances in inter-process messaging.  This required that
an id be allocated from the content process side when loadExtension()
was called, but that made it impossible to test code that exercises the
code path in the AddonManager that allocates ids for extensions that do
not include an id in the manifest (it also made the loadExtension() api
clunky).

With this change, SpecialPowers allocates an internal identifier for
messaging, but this identifier is separate from extension ids.
Confusingly, we still store the actual extension id in an id property
on the object returned by loadExtension(), but there are enough tests
that reference this that it would be unnecessarily disruptive to get
rid of it so it stays for now...

MozReview-Commit-ID: G6xk1mBJJL8
2016-08-02 16:04:37 -07:00
Kris Maglione
aa06adc855 Bug 1290117: Call sendMessage response callback when there are no replies. r=robwu
MozReview-Commit-ID: 1BYD1CgZmvD
2016-08-06 14:21:10 -07:00
Andrew Swan
6782607111 Bug 1213990 Clear storage when webextension is uninstalled r=kmag
MozReview-Commit-ID: BeMOxOCSeru
2016-08-01 16:30:18 -07:00
Kris Maglione
aeb04c78d9 Bug 1263011: Part 2 - Implement WebExtensions Experiments prototype. r=aswan
MozReview-Commit-ID: 4KO4cCLRsLf
2016-08-05 14:20:54 -07:00
Kris Maglione
d1cd3911ce Bug 1291199: Retry subprocess perf tests on failure. r=aswan
MozReview-Commit-ID: 9PDT9tcYFqf
2016-08-02 15:37:34 -07:00
Kris Maglione
eb33fdebb6 Bug 1290598: Move slower native messaging tests to a separate unit. r=aswan
MozReview-Commit-ID: 2kXbNae1bmR
2016-07-29 14:35:04 -07:00
Kris Maglione
0d5c67223e Bug 1290598: Migrate native messaging tests to xpcshell. r=aswan
MozReview-Commit-ID: 4Uz73l8qGVE
2016-08-02 17:39:51 -07:00
Kris Maglione
c3ea0facd5 Bug 1290598: Refactor native messaging test setup code into separate head file. r=aswan
MozReview-Commit-ID: BN9oeXt79eG
2016-07-29 14:42:03 -07:00
Jared Wein
ebf1ccbe46 Bug 1291855 - Enable the no-else-return rule for eslint. r=Felipe,kmag,mossop
MozReview-Commit-ID: DYOmE6xwMJh
2016-08-03 18:54:59 -04:00
Wes Kocher
e600667862 Backed out 3 changesets (bug 1213990) for problems in browser_ext_pageAction_context.js a=bustage CLOSED TREE
Backed out changeset c9b70a1998fc (bug 1213990)
Backed out changeset ffc2455a9135 (bug 1213990)
Backed out changeset 3223d0970b9a (bug 1213990)
2016-08-03 13:49:50 -07:00
Andrew Swan
b7b02bc2d0 Bug 1213990 Clear storage when webextension is uninstalled r=kmag
MozReview-Commit-ID: BeMOxOCSeru
2016-08-01 16:30:18 -07:00
Wes Kocher
4316d9744a Backed out 3 changesets (bug 1213990) for webextension failures a=backout
Backed out changeset 2b1fdeff506d (bug 1213990)
Backed out changeset 157efae8dd8a (bug 1213990)
Backed out changeset ea870f4c5a61 (bug 1213990)
2016-08-02 10:51:06 -07:00
Andrew Swan
9317fd97ab Bug 1213990 Clear storage when webextension is uninstalled r=kmag
MozReview-Commit-ID: BeMOxOCSeru
2016-08-01 16:30:18 -07:00
Carsten "Tomcat" Book
4a8f4b4c7a merge mozilla-inbound to mozilla-central a=merge 2016-08-02 17:09:31 +02:00
Wes Kocher
4503203f3f Backed out 3 changesets (bug 1213990) for failing a mochitest a=backout
Backed out changeset 846ac5ddba37 (bug 1213990)
Backed out changeset 26bab9c6a89c (bug 1213990)
Backed out changeset 12d7193f1310 (bug 1213990)
2016-08-01 16:56:18 -07:00
Andrew Swan
9c8eeb9af2 Bug 1213990 Clear storage when webextension is uninstalled r=kmag
MozReview-Commit-ID: BeMOxOCSeru
2016-07-28 10:01:09 -07:00
Robert Helmer
fc30f77754 Bug 1290617 - allow non-temp mock webextensions r=kmag
MozReview-Commit-ID: JeEeMkrQ4te
2016-07-29 16:14:19 -07:00
Giorgio Maone
fe97eb7f75 Bug 1201979 - Support requestBody in onBeforeRequest. r=kmag
MozReview-Commit-ID: LAHKN5uZO0
2016-07-29 23:38:43 +02:00
Kris Maglione
79b5f4517b Bug 1288912: Follow-up: Skip native messaging tests on Android.
MozReview-Commit-ID: JYcUirnAfqw
2016-07-29 13:09:59 -07:00
Kris Maglione
aa6026c47b Bug 1288912: Add tests for native messaging round trip time. r=aswan
MozReview-Commit-ID: 6gOpZhvAZUE
2016-07-28 20:54:40 -07:00
Kris Maglione
d84d47c36d Bug 1288885: Migrate simple extension mochitests to xpcshell. r=aswan
MozReview-Commit-ID: BiaTf6u43XP
2016-07-22 16:57:58 -07:00
Kris Maglione
29fd34d789 Fix botched backout for changeset af745bd5c209 (bug 1288885)
MozReview-Commit-ID: KCC6FQ0yn45
2016-07-28 13:49:38 -07:00
Kris Maglione
76d81ae721 Backed out changeset af745bd5c209 for xpcshell test failures.
MozReview-Commit-ID: Dt6n5mRFLgN
2016-07-28 13:42:02 -07:00
Kris Maglione
4c2297b609 Bug 1288885: Split out the longest-running alarm tasks into separate units. r=aswan
MozReview-Commit-ID: GwnRd6gncGI
2016-07-22 19:29:58 -07:00
Kris Maglione
d79c7d89d3 Bug 1288885: Migrate background page mochitests to xpcshell. r=aswan
MozReview-Commit-ID: Fiv7sArlWDw
2016-07-22 18:44:27 -07:00
Kris Maglione
7345559170 Bug 1288885: Migrate downloads mochitests to xpcshell. r=aswan
MozReview-Commit-ID: Z67uTNUcqD
2016-07-22 18:49:50 -07:00
Kris Maglione
06452231dd Bug 1288885: Migrate storage mochitests to xpcshell. r=aswan
MozReview-Commit-ID: 1DYgv3LNDOW
2016-07-22 17:32:31 -07:00
Kris Maglione
80e6bae2f8 Bug 1288885: Migrate bookmarks mochitests to xpcshell. r=aswan
MozReview-Commit-ID: 9PFJcqXXxhU
2016-07-22 17:29:52 -07:00
Kris Maglione
4fb6f6ecd9 Bug 1288885: Migrate localStorage mochitests to xpcshell. r=aswan
MozReview-Commit-ID: 1sjpnsKYEv5
2016-07-27 21:47:53 -07:00