Commit graph

311 commits

Author SHA1 Message Date
Wes Kocher
309fb2cc5f Merge m-c to inbound, a=merge 2016-08-25 17:14:17 -07:00
Kris Maglione
eedfd4420e Bug 1293287: Close extension popups on extension shutdown. r=aswan
MozReview-Commit-ID: 5lpIk6XrdOM

--HG--
extra : rebase_source : ec403c06c2044fc3d65cc1e830e34670ea4e500d
2016-08-24 16:26:35 -07:00
Rob Wu
bef0b5a7ac Bug 1287010 - Use sandbox instead of JSM for global separation r=billm
MozReview-Commit-ID: GSqmh0xC2hW

--HG--
extra : rebase_source : 9b23172c205a1e4ef49f018eb2fbd5d9bd207adc
2016-08-23 16:19:33 -07:00
Rob Wu
459ac122eb 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

--HG--
extra : rebase_source : 1376a1325fd9bf186e09e1dbe83467f3ad94516f
2016-08-17 20:28:19 -07:00
Kris Maglione
b8397e058b Bug 1293548: Split browser_ext_pageAction_context into two files. r=me
MozReview-Commit-ID: 1Zj36K0xkX4

--HG--
rename : browser/components/extensions/test/browser/browser_ext_pageAction_context.js => browser/components/extensions/test/browser/browser_ext_pageAction_title.js
rename : browser/components/extensions/test/browser/browser_ext_pageAction_context.js => browser/components/extensions/test/browser/head_pageAction.js
extra : rebase_source : 8fc9e53ed34169838635abe5c00c7f9562c4b06c
2016-08-23 18:18:27 -07:00
Kris Maglione
580f9d04d0 Bug 1271374: Cache-bust page URL. r=me
MozReview-Commit-ID: FAdxwoxRLMA

--HG--
extra : rebase_source : f876d4ad6bc7c6e17f8b2f377fdd2a421bed6c64
2016-08-23 18:00:58 -07:00
Shane Caraveo
ff811bd1a9 Bug 1289549 bump slop in jpg color test, r=maglione
MozReview-Commit-ID: GGNze65Lpkl
2016-08-23 15:24:07 -07:00
Hector Zhao
ff7bc87130 Bug 1295894 - Show localized strings for browserAction/pageAction title. r=kmag
MozReview-Commit-ID: 1SMd3cnUOH4

--HG--
extra : rebase_source : 4c746fe866222e9d05177ba9b1d9210e15e1eac2
2016-08-17 14:39:33 +08:00
Ryan VanderMeulen
833833b8c5 Merge inbound to m-c. a=merge 2016-08-22 09:40:41 -04:00
Rob Wu
53ae1a1256 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

--HG--
extra : rebase_source : 900a65e695afd6db83d5102f515dc29d46d001f1
2016-08-16 21:36:42 -07:00
Kris Maglione
2c634c4cb0 Bug 1296888: Add "webextensions" tag to WebExtension tests. r=aswan
MozReview-Commit-ID: 3QYXtpdznrP

--HG--
extra : rebase_source : 4aacd77cd2569b9ffc3916a5db3f41dd26bc7b70
2016-08-20 15:41:31 -07:00
Kris Maglione
dbc9f1910b Bug 1259093: Follow-up: Fix another test race. r=me
MozReview-Commit-ID: 3DsTcQli8Ga

--HG--
extra : rebase_source : e32b68893d6684211cd752b88967f7cc74600faa
2016-08-20 14:00:37 -07:00
Kris Maglione
71987e4163 Bug 1259093: Follow-up: Fix some test races. r=me
MozReview-Commit-ID: riVGF5q3xV
2016-08-19 17:20:22 -07:00
Kris Maglione
e9d8b48ce4 Bug 1259093: Part 3 - Preload browserAction popups to prevent flicker during opening. r=Gijs r=jaws r=bwinton f=mattw
MozReview-Commit-ID: EpAKLV8VPTn

--HG--
extra : rebase_source : 6ce6e622734214c7214fc2ddb7ddb2233fc0c8fd
2016-08-19 12:29:11 -07:00
Bob Silverberg
068821e975 Bug 1295301 - history.onVisitRemoved argument is wrong after a call to history.deleteAll, r=aswan
MozReview-Commit-ID: 9b9PKAwcNDA

--HG--
extra : rebase_source : a0cbbe63b227139085b3641786e14e2a1df13bbe
2016-08-16 09:35:37 -04:00
Wes Kocher
48b8d407c8 Merge inbound to central, a=merge
a=release to get around the webidl hook for a comment-only change

--HG--
extra : amend_source : f7e57101e1a25d3cf3536a256898ec2a21c54b38
2016-08-16 17:05:30 -07:00
Rob Wu
cbd2a581f6 Bug 1294920 - Fix test expectation on high-density screens in browser_ext_browserAction_pageAction_icon_permissions r=billm
MozReview-Commit-ID: 8iQXNEmsMJ5

--HG--
extra : rebase_source : a4f4cf9a1d48194a00aff060c199426f3872a1ce
2016-08-12 19:15:28 -07:00
Rob Wu
65acb9a681 Bug 1290157 - Always pass an array to tabs.executeScript on success r=kmag
MozReview-Commit-ID: Ctw8RUtfEZC

--HG--
extra : rebase_source : 7f76c1c99b5948463e5bfa0f7270fe50f6e95a88
2016-08-09 00:28:47 -07:00
Phil Ringnalda
602a0147b1 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
162c6aa3c3 Bug 1246034 - ESLint followup a=me CLOSED TREE 2016-08-15 15:20:40 -07:00
Wes Kocher
2253eb9510 Merge m-c to inbound, a=merge 2016-08-15 14:53:49 -07:00
Wes Kocher
d602abb016 Merge inbound to central, a=merge 2016-08-15 14:20:38 -07:00
Kris Maglione
9462ff7027 Bug 1225215: Follow-up: ESLint fix. r=me
MozReview-Commit-ID: WP5idmrVE6
2016-08-14 20:05:07 -07:00
Sebastian Hengst
d11b74103a merge mozilla-central to autoland. r=merge a=merge 2016-08-13 13:54:41 +02:00
Sebastian Hengst
9ec085584d 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
b44cee8b2a Merge fx-team to central, a=merge CLOSED TREE 2016-08-12 14:37:49 -07:00
Wes Kocher
4aec37ca6e Merge m-c to autoland, a=merge 2016-08-12 16:30:03 -07:00
Rob Wu
f50a92851a 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

--HG--
extra : rebase_source : c09fae54cd94af90d7d5391361b33532df6a8d72
2016-08-09 00:12:09 -07:00
Jared Wein
c1a786bb11 Bug 1252224 - Remove synchronous layout flushes and style invalidations during the opening of multiview panels. r=mconley
MozReview-Commit-ID: 9T4gAPwFrXp
* * *
[mq]: temp

MozReview-Commit-ID: Bj91OhNd8ed
* * *
[mq]: temp

MozReview-Commit-ID: J8h8InaMRP4
2016-08-04 17:30:54 -04:00
Carsten "Tomcat" Book
553a2da922 merge mozilla-inbound to mozilla-central a=merge 2016-08-10 15:54:26 +02:00
Kris Maglione
bc51ef01c8 Bug 1280128: [webext] Use transparent backgrounds and correct border radii for popup browsers. r=bwinton ui-r=maritz
MozReview-Commit-ID: 9jmuxdSLmBM

--HG--
extra : source : 9999b6b8022bfe815d79a4f309986d2859285e16
extra : histedit_source : 69afe0d2ecfa9d73e30fc6e363dbfa6849530dcf%2C3a9aaafbb3288f43d7f2b17b0e93597d9a305032
2016-08-09 12:08:04 -07:00
Wes Kocher
8ca795c1c8 Backed out changeset 9999b6b8022b (bug 1280128) for ESLint failures 2016-08-09 11:28:12 -07:00
Kris Maglione
818537d543 Bug 1280128: [webext] Use transparent backgrounds and correct border radii for popup browsers. r=bwinton ui-r=maritz
MozReview-Commit-ID: 9jmuxdSLmBM

--HG--
extra : rebase_source : 377e47f39b1c52e36813f79e9d650c5f6bfab970
extra : histedit_source : c0d5ec2e5143ac4013e203dd75980dfcb43e7c9e
2016-08-09 10:54:53 -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
617494218f Bug 1290117: Call sendMessage response callback when there are no replies. r=robwu
MozReview-Commit-ID: 1BYD1CgZmvD

--HG--
extra : rebase_source : dc6297a85062c6713fa808f935ec7051d8668dc1
extra : amend_source : e398638f70f95835c7a8f8e94ea6945fa763ccb6
2016-08-06 14:21:10 -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
Matthew Wein
019b4824e4 Bug 1246034 - Part 2: [webext] Add support for _execute_browser_action. r=kmag
MozReview-Commit-ID: EIbPidn07qZ

--HG--
extra : rebase_source : 5ed49fb3b70fa07b6ec5430381c73d702d156898
2016-07-08 15:02:49 -07:00
Kris Maglione
1d020acead Bug 1246034 - Part 1: [webext] Add a helper function to trigger a browserAction. r=jaws
MozReview-Commit-ID: JUW6oUpWiN4

--HG--
extra : rebase_source : 91473d3b5278df43694709fe732b176696f25151
2016-08-05 18:35:39 -07:00
fiveNinePlusR
f69df51c78 Bug 1289213 - Part 2: Fall back to the tab.label when there is no browser.contentTitle available. r=kmag
When a tab is unloaded, the session browser.contentTitle is unavailable so this patch allows the title to be exposed when the tab is unloaded.
2016-08-11 19:44:00 -04:00
fiveNinePlusR
479a4f4ae3 Bug 1291830 - Do not return tabs that are in the process of closing from a chrome.tabs.query call. r=kmag
--HG--
extra : rebase_source : 24e51c2a777bf22b4314f7001018aa8ae756ea53
2016-08-09 16:43:33 -07:00
Kris Maglione
d63b08badc Bug 1293099: Fill panel arrow and arrow content with browser body's background color. r=bwinton ui-r=maritz
MozReview-Commit-ID: 3xf31UgUy2A

--HG--
extra : rebase_source : 4f1e4149587da7a2c0aefdde7c8880ea21330393
2016-08-08 14:06:19 -07:00
Kris Maglione
8e7896a8c6 Bug 1277181: Split up browser_ext_browserAction_page_icon test. r=trivial
MozReview-Commit-ID: 2A0TZzTrREu

--HG--
rename : browser/components/extensions/test/browser/browser_ext_browserAction_pageAction_icon.js => browser/components/extensions/test/browser/browser_ext_browserAction_pageAction_icon_permissions.js
extra : rebase_source : fc4be9e1db1909aa57dc96e48ab840187ab7b9fb
2016-08-10 12:19:45 -07:00
Kris Maglione
4f1b1dda0b Bug 1225215: [webext] Raise the expected errors when given invalid tab IDs. r=aswan
MozReview-Commit-ID: E5G0GmVhzLh

--HG--
extra : rebase_source : 5c6624b9d2d06109a1b047ad48dcac7e9405ee59
extra : amend_source : fb23020f7d2772f56fabc61f2e32f7d9c4c2f52a
2016-02-26 17:56:30 -08: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
Kris Maglione
9e29edc5a4 Bug 1268184: Split browser_ext_runtime_openOptionsPage into two files. r=trivial
MozReview-Commit-ID: I9UbxGmOjMg

--HG--
rename : browser/components/extensions/test/browser/browser_ext_runtime_openOptionsPage.js => browser/components/extensions/test/browser/browser_ext_runtime_openOptionsPage_uninstall.js
extra : rebase_source : 2347ab5594b2a9bb60c6ec0a041bd7b7822e8f21
2016-08-04 13:27:31 -07:00
Matthew Wein
525255f4a1 Bug 1287159 - Grant activeTab permission to the current tab when onCommand fires. r=kmag
MozReview-Commit-ID: ETwqDOBHCRS

--HG--
extra : rebase_source : 59c73f10fca5c5e9e9fd806d556a82433c609e9c
2016-07-25 14:42:23 -07:00
Carsten "Tomcat" Book
cc6b6404c0 Merge mozilla-central to fx-team 2016-08-02 17:13:42 +02:00
Rob Wu
ed596b32d9 Bug 1275126 - Implement targetUrlPattern for link contexts. r=kmag
MozReview-Commit-ID: EzqX8YbeQqI

--HG--
extra : transplant_source : %11%87%12%B3%C5a%C5%93c%05%16%04%D9g%D9%CD%B6%8AH%7B
2016-07-27 18:23:24 -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
Matthew Wein
eaa94c242e Bug 1272198 - Add tests for accepted modifiers. r=kmag
MozReview-Commit-ID: KTLk7sMcsmt

--HG--
extra : transplant_source : %87%A0%24%7B%96GT%06w%83%BE%FA%C3%B0f%25T%D7%F05
2016-07-25 10:36:07 -07:00