Commit graph

157 commits

Author SHA1 Message Date
Rob Wu
2cc8f66f57 Bug 1295082 - Minor fixups for experimental WebExtensions APIs r=kmag
- Remove unused registerAPI and registerPrivilegedAPI
- Generate the APIs just once.
- Fix typo in addon ID.

MozReview-Commit-ID: rdiiIxHMsm

--HG--
extra : rebase_source : aede9c63e0f19d5b4c97022c0254b07603277aef
2016-08-18 13:58:30 -07:00
Rob Wu
bacc209644 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

--HG--
extra : rebase_source : 7aa9fb7a53e057e8d3d8c477bd6821f8344c571a
2016-08-15 01:04:58 -07:00
Sebastian Hengst
274c9cf54e Backed out changeset d71c400313a2 (bug 1293132) for failing test_ext_schemas_api_injection.js on Android's Sets test. r=backout 2016-08-18 18:27:34 +02:00
Sebastian Hengst
2164cd95c8 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
ba87856051 Backed out changeset 7c4c98ac6b3f (bug 1295082) 2016-08-18 16:46:26 +02:00
Rob Wu
e33e39b554 Bug 1293132 - Document contract for Schemas.inject and Schemas.normalize r=kmag
MozReview-Commit-ID: KgSrgHttwrI

--HG--
extra : rebase_source : 1cf288a7d0ce1c5d9dc7276b4f1710d0acb4187b
2016-08-07 18:36:36 -07:00
Rob Wu
a3c3c29726 Bug 1295082 - Minor fixups for experimental WebExtensions APIs r=kmag
- Remove unused registerAPI and registerPrivilegedAPI
- Generate the APIs just once.
- Fix typo in addon ID.

MozReview-Commit-ID: rdiiIxHMsm

--HG--
extra : rebase_source : 080d9b6de6fc2f256d953b5266a2c36ee9e56205
2016-08-16 14:31:28 -07:00
Rob Wu
dfc11d6f00 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

--HG--
extra : rebase_source : 9a85d95f0c147198938b86c57127f6e7403fd53c
2016-08-15 01:04:58 -07:00
Rob Wu
8a0b0a5460 Bug 1288901 - Create ExtensionContext at document-element-inserted r=billm
MozReview-Commit-ID: 9ZQWmNjoAXA

--HG--
extra : rebase_source : d62d5169df1549d576e71bbc9ad51ecf0b4add9b
2016-08-07 19:10:01 -07:00
Rob Wu
6cea2d2df8 Bug 1288901 - Destroy ExtensionContext at inner window destruction instead of unload r=billm
MozReview-Commit-ID: 4JI7PpAj9xd

--HG--
extra : rebase_source : 7b4a4f1e18dd52bf7c2f430d31ebe2b5f1928fab
2016-08-07 19:09:56 -07:00
Luca Greco
aa6d7d1c94 Bug 1290901 - [webext] Allow APIs implementation to return null when the API should not be injected in a context. r=aswan
needed to be able to return null when the registered schema API should not be available
based on the context type instead of WebExtensions permissions.

MozReview-Commit-ID: G8w8ZYzmA7S

--HG--
extra : rebase_source : 7cacd2d5b5c0e1ef354e2cef19c7d809cc632470
2016-08-02 04:00:06 +02:00
Luca Greco
d59eaef91b Bug 1290901 - [webext] Handle nested namespaced API schema. r=aswan
MozReview-Commit-ID: H26E8ZwLrqJ

--HG--
extra : rebase_source : d3eaba631b4f3aca55e0edb037776c13a319934d
2016-08-15 15:34:43 +02:00
Kris Maglione
026f92fc96 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

--HG--
extra : rebase_source : 88aa9e5eb14d22696126c26f960edbc40e923b89
extra : histedit_source : 01ff56be73b884fe73f4543b875acf37a1469b3d
2016-08-04 16:18:25 -07:00
Kris Maglione
d16036cec9 Bug 1293700: Make console object available to WebExtension internals. r=aswan
MozReview-Commit-ID: GyD4uo95gt6

--HG--
extra : rebase_source : a1bb70bbc186c76d5c0437530662b0754516ea7b
extra : histedit_source : d8bf619ce3d39987b2850223ccb3f28a82cbc532
2016-08-09 12:40:25 -07:00
Andrew Swan
b904b2d437 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

--HG--
extra : rebase_source : a0891e5ba308972c35813f55274badf9edde62f7
extra : source : e8818ef3c28489e196d1db92cabf224861b693c9
2016-08-02 16:04:37 -07:00
Kris Maglione
947c1cf7ba Bug 1289527: Hide browserAction and pageAction namespaces when relevant manifest entries are missing. r=aswan
MozReview-Commit-ID: 2gx0pLkHaVJ

--HG--
extra : rebase_source : 94ab5fbc632aedee4dc8261145bc8832ae31f53d
2016-08-06 14:43:58 -07:00
Andrew Swan
fa3c0fac00 Bug 1213990 Clear storage when webextension is uninstalled r=kmag
MozReview-Commit-ID: BeMOxOCSeru

--HG--
extra : rebase_source : 3eb7fc4e61fe1ce698e22e25bd05fc779a6cf7a8
2016-08-01 16:30:18 -07:00
Andrew Swan
d7af10177b Bug 1213990 Convert getExtensionUUID to UUIDMap r=kmag
MozReview-Commit-ID: 9VVNa0pjx8g

--HG--
extra : rebase_source : d62e8289c127afe762a6af71fecb4e15c08272ca
2016-08-07 09:53:36 -07:00
Andrew Swan
956647e2c9 Bug 1213990 Do immediate uninstall for test webextensions r=kmag
MozReview-Commit-ID: 9vcAfPhRYFi

--HG--
extra : rebase_source : c10b7e927eb0d0e12f70d9e06f77d1b56fa405fc
2016-07-22 10:16:55 -07:00
Kris Maglione
73b1b5f221 Bug 1263011: Part 2 - Implement WebExtensions Experiments prototype. r=aswan
MozReview-Commit-ID: 4KO4cCLRsLf

--HG--
extra : rebase_source : 40e5ec808e557e845a771bb21e8863a8edcd4faf
2016-08-05 14:20:54 -07:00
Kris Maglione
b022382989 Bug 1263011: Part 1 - Refactor Extension and ExtensionData to use ES6 classes. r=aswan
MozReview-Commit-ID: f5NqRuPLU7

--HG--
extra : rebase_source : 209033bc3f6cf4b9aafb8530f7681584ca046601
2016-06-17 16:02:16 +01:00
Kris Maglione
0dba25a0da Bug 1288979: Always convert badge background color to a ColorTuple. r=aswan
MozReview-Commit-ID: CWmaa9wwQLD

--HG--
extra : rebase_source : aa8eaa19bad2b825c818abd29172f75fa84368dd
2016-08-04 14:50:52 -07:00
Jared Wein
871ed4e3ba Bug 1291855 - Enable the no-else-return rule for eslint. r=Felipe,kmag,mossop
MozReview-Commit-ID: DYOmE6xwMJh

--HG--
extra : rebase_source : bc81b68ea5599fd1815dc34dac7106eef7044483
2016-08-03 18:54:59 -04:00
Wes Kocher
6362b05a21 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
Alexandre Lissy
0af5b943b6 Bug 1284674 - Remove NUWA r=cyu
MozReview-Commit-ID: GyMRNzOBKw6

--HG--
extra : rebase_source : 293af1cd55f2035ce6a99f4ebf144059c32a2b8f
2016-08-02 14:54:00 +02:00
Andrew Swan
0fbd21626b Bug 1213990 Clear storage when webextension is uninstalled r=kmag
MozReview-Commit-ID: BeMOxOCSeru

--HG--
extra : rebase_source : 24a4758a83b1792f8e52e426191abd0e229a4c0b
2016-08-01 16:30:18 -07:00
Andrew Swan
915d975a82 Bug 1213990 Convert getExtensionUUID to UUIDMap r=kmag
MozReview-Commit-ID: 9VVNa0pjx8g

--HG--
extra : rebase_source : 9959c866b77f5e6e8a4f5636aac6a1b906c6b013
2016-08-03 09:17:24 -07:00
Andrew Swan
b218e5f6ef Bug 1213990 Do immediate uninstall for test webextensions r=kmag
MozReview-Commit-ID: 9vcAfPhRYFi

--HG--
extra : rebase_source : 1834773542373362079d922785652f982f3facb6
2016-07-22 10:16:55 -07:00
Wes Kocher
f341d12e53 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
863d00a569 Bug 1213990 Clear storage when webextension is uninstalled r=kmag
MozReview-Commit-ID: BeMOxOCSeru

--HG--
extra : rebase_source : 552492edeccd340fcb03fcdd34f6229bb2ca7b48
2016-08-01 16:30:18 -07:00
Andrew Swan
d0a776b0e1 Bug 1213990 Convert getExtensionUUID to UUIDMap r=kmag
MozReview-Commit-ID: 9VVNa0pjx8g

--HG--
extra : rebase_source : befb02708aabf093320d4c6fcd5f70c0b117b087
2016-07-28 10:00:51 -07:00
Andrew Swan
b01dd213c2 Bug 1213990 Do immediate uninstall for test webextensions r=kmag
MozReview-Commit-ID: 9vcAfPhRYFi

--HG--
extra : rebase_source : 2b6313e7a1e572de160afbfcc5f2078f3ae6e716
2016-07-22 10:16:55 -07:00
Wes Kocher
507d36210b 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
44326f4fae Bug 1213990 Clear storage when webextension is uninstalled r=kmag
MozReview-Commit-ID: BeMOxOCSeru

--HG--
extra : rebase_source : 389e8ab2f444b615e8b1f558b3f9a588b77f3512
2016-07-28 10:01:09 -07:00
Andrew Swan
27dcca4f5e Bug 1213990 Convert getExtensionUUID to UUIDMap r=kmag
MozReview-Commit-ID: 9VVNa0pjx8g

--HG--
extra : rebase_source : befb02708aabf093320d4c6fcd5f70c0b117b087
2016-07-28 10:00:51 -07:00
Andrew Swan
3e04383ce2 Bug 1213990 Do immediate uninstall for test webextensions r=kmag
MozReview-Commit-ID: 9vcAfPhRYFi

--HG--
extra : rebase_source : 2b6313e7a1e572de160afbfcc5f2078f3ae6e716
2016-07-22 10:16:55 -07:00
Robert Helmer
e7f6d9d4ec Bug 1290617 - allow non-temp mock webextensions r=kmag
MozReview-Commit-ID: JeEeMkrQ4te

--HG--
extra : rebase_source : 98d95907134c68a347067de1cce601656f27b4a3
2016-07-29 16:14:19 -07:00
Kris Maglione
5595379222 Bug 1288885: Support testing WebExtensions from xpcshell tests. r=aswan
Most of the test helper code is derived from the SpecialPowers/ExtensionTestUtils
code that does the same. Eventually, the two implementations should probably
be unified, but I don't think it's worth the trouble for now.

MozReview-Commit-ID: 7Yy9jWkGsMM

--HG--
extra : source : 8da1ed0adf15e8244e57f22c581bbee072a118b9
2016-07-24 16:09:26 -07:00
Sebastian Hengst
b18a29d071 Backed out changeset 8da1ed0adf15 (bug 1288885) for failure and crashes in test_ext_background_window_properties.js on Android in xpcshell and sets tests. r=backout 2016-07-28 10:06:35 +02:00
Kris Maglione
ff96d80145 Bug 1288885: Support testing WebExtensions from xpcshell tests. r=aswan
Most of the test helper code is derived from the SpecialPowers/ExtensionTestUtils
code that does the same. Eventually, the two implementations should probably
be unified, but I don't think it's worth the trouble for now.

MozReview-Commit-ID: 7Yy9jWkGsMM

--HG--
extra : rebase_source : 92cc01e1cde97fa79250d51bad5a56181fbe715c
2016-07-24 16:09:26 -07:00
Luca Greco
d7252a1c8d Bug 1286526 - [webext] Fix shutdown issues on empty addon with a valid manifest. r=aswan
MozReview-Commit-ID: 30MryAPYBv0

--HG--
extra : rebase_source : 3cce09a704263c13eda837a7b4a0063deaa55268
2016-07-13 13:12:59 +02:00
Matthew Wein
9db4b394c8 Bug 1285063 - Part 2: Switch to using the Category Manager to register scripts/schemas in order to load them in time for Fennec. r=kmag
MozReview-Commit-ID: 2U8cTYeH8kg

--HG--
extra : rebase_source : 32ffedca29caeb1154d9d1712795f18fc74dbe2a
2016-07-22 12:44:40 -07:00
Carsten "Tomcat" Book
42933ba381 merge fx-team to mozilla-central a=merge
--HG--
rename : devtools/client/shared/css-color.js => devtools/shared/css-color.js
2016-07-25 15:49:05 +02:00
Kris Maglione
8d58c7c636 Bug 1285493: Add-on Manager should not be closed when an add-on with options_ui is disabled. r=billm
MozReview-Commit-ID: 8oRK8uPphDf

--HG--
extra : rebase_source : c6dcc7da1823711e3223ba39d038e1ccc949f6fd
2016-07-24 15:05:39 -07:00
Kris Maglione
fba8996a05 Bug 1274775 - Make sure background pages are created with a PresShell. r=billm
MozReview-Commit-ID: GLWg5aK47g5

--HG--
extra : rebase_source : 472365762aca534e826173989c48f5058960a987
2016-07-24 15:09:07 -07:00
Mike Conley
028ae1c7d9 Bug 1261842 - Make sure ExtensionContent.jsm has been loaded in the parent process if Extension.jsm is initialized. r=kmag
MozReview-Commit-ID: BNrSegqzqeJ

--HG--
extra : rebase_source : a3aa41d14fde66cf69f30e07d86ca948cc6fc328
extra : source : 855931929739ab4f44ff92f7549b4d80348b580b
2016-06-08 16:46:35 -04:00
Rob Wu
0211115bf6 Bug 1234677 - Overwrite alert at window init instead of onload r=billm
A nice extra effect of this is that it will also work after reloading
the background page (location.reload()) and it should also work for
child frames in background pages.

MozReview-Commit-ID: ErvpzD8d3ow

--HG--
extra : rebase_source : 2057ecc805c8d8c8e724743a11c01362fa0cf5bc
2016-07-20 01:00:29 -07:00
Luca Greco
a898928047 Bug 1285314 - Fix extension id overridden with undefined when missing from the manifest. r=aswan
MozReview-Commit-ID: J4Iwl4tYlJX

--HG--
extra : transplant_source : %08%85%E2%D3%00%5Dd%28%F7%F1%BB%06%A2%A6%EC2%3D%DCv%2C
2016-07-07 20:25:28 +02:00
Kris Maglione
a1dac7caad Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
MozReview-Commit-ID: 8m7wJrAbFwS

--HG--
extra : source : a00cf073f5c00380d4e42b13bc0cd3146b708845
extra : amend_source : d74ef90e88acbe62e33af3b5b9cf870d5c0a9d3e
2016-06-09 17:44:47 -07:00
Sebastian Hengst
f8035f62a8 Backed out changeset a00cf073f5c0 (bug 1279392) for failing mochitest test_ext_contentscript_create_iframe.html at least on Linux x64 opt. r=backout 2016-06-14 13:37:52 +02:00