The Android-specific AddonUpdateService has a bit of redundant code
because AddonManagerPrivate has a backgroundUpdateCheck method that does
a lot of the same thing. This patch makes AddonUpdateService call that
method so there's less code and more consistency.
This requires flipping the "extensions.update.enabled" pref, which was
disabled in bug 528588 for showing the XUL addon update dialog. I don't
think this is relevant anymore in native Fennec and with the later
rewrite of AddonManager, so I'm fairly certain it's okay to flip that
pref.
The patch also disables the AddonManager update timer because we have
our own update timer on Android.
Experiments should differ from normal add-ons in a few ways:
* They can always be enabled regardless of compatibility info
* They default to disabled when installed
* They cannot be checked for updates
* They only stay enabled for the lifetime of the current process
* The UI doesn't give users the ability to enable/disable
This makes a few changes to keep these differences but remove much of the special casing code for experiments.
Being able to use regardless of compatibility was mostly fixed by bug 1220198 but I've also removed the redundant override in isCompatible.
Previously the "enabled until restart" feature worked with by not updating the DBAddonInternal object and instead using a hack to make the wrapper still seem enabled. This seems likely to break other code that relies on the state of the DBAddonInternal object so instead we update that as normal and simply don't persist the enabled state to disk.
Also switch the DBAddonInteral.prototype code to use some newer JS features.
I've removed the hack from addon.permissions which was hiding the enable/disable buttons in the UI and instead just hidden them in the UI stylesheet. This makes the API make sense and means callers can use addon.permissions to verify that enabling will work.
--HG--
extra : commitid : I1KdZYTWAyE
extra : rebase_source : 352634d8e980a6f7a9c2121607283f5b08dc8484
Before changing the handling of experiments make the tests a bit more readable
and use BootstrapMonitor to verify things.
--HG--
extra : commitid : LnQTmpOqRgj
extra : rebase_source : be63740ca7613bf685c9d69722e9fb2e1bb0d5e3
In order to meet the addon signing requirement for tests, specialpowers
needs to be installed at gecko runtime. This means it must be restartless.
This patch packages specialpowers as a restartless addon, but it does not
yet install it at runtime.
--HG--
rename : testing/specialpowers/components/SpecialPowersObserver.js => testing/specialpowers/content/SpecialPowersObserver.jsm
extra : commitid : Bbg8gFten8S
extra : rebase_source : 99d0b841a1f8f9eb6b6ca846363a158836482e57
This builds the Robocop tests with |mach build mobile/android|, making
it easier for developers to build Fennec and the tests at the same
time.
--HG--
rename : build/mobile/robocop/AndroidManifest.xml.in => mobile/android/tests/browser/robocop/AndroidManifest.xml.in
rename : build/mobile/robocop/Makefile.in => mobile/android/tests/browser/robocop/Makefile.in
rename : build/mobile/robocop/README => mobile/android/tests/browser/robocop/README
rename : build/mobile/robocop/moz.build => mobile/android/tests/browser/robocop/moz.build
rename : build/mobile/robocop/res/values/strings.xml => mobile/android/tests/browser/robocop/res/values/strings.xml
rename : build/mobile/robocop/robotium-solo-4.3.1.jar => mobile/android/tests/browser/robocop/robotium-solo-4.3.1.jar
extra : commitid : BuNBjgXdm1d
extra : rebase_source : c36b8bf0183d8f5821b7f7839668ca963065d894
extra : histedit_source : a86fef3b834420ea496a9c2644ca72786a2d7da9
Attempt to get around the fact that XP SP2 (and below) systems won't be able to
handle Authenticode signatues with SHA-2 digests by disabling the maintenance
service, the only thing on our update path that uses Authenticode, on systems
running WinXP below SP3.
This patch both prevents the service from being included in new installations,
and prevents the service from being used where it is already installed.
--HG--
extra : transplant_source : %F7%BE%0B%FDYd%CF%24%E7%B2%A5l%40%8D%E5%81%88F%E4%07
I tried to keep the changes to existing tests as minimal as
possible. There were a few exceptions, though:
* test_update_ignorecompat.js was completely broken. I couldn't
figure out why it was suddenly failing after I changed it to use
`add_test`, and it turned out that it had been failing all along,
but in a way that the harness didn't pick up.
* I changed most of the `do_throw` in update callbacks to `ok(false`
because it took me about an hour to figure out where the test was
failing when I hit one of them.
* I made some changes to sync `test_update.js` and `test_update_ignorecompat.js`
where one appeared to have been changed without updating the
other.
* I made `promiseFindAddonUpdates` a bit more generic, because I was
planning to convert most of `test_update.js` to use it, rather
than nested callbacks. I changed my mind a quarter of the way
through, but decided to keep the changes, since they'll probably
be useful elsewhere.
--HG--
extra : commitid : 2jBJ2yUht46
extra : rebase_source : a123db431a26b29f3deb81e6b961bf556005c2a6
extra : source : 90e625ac70b2071f1c2430725892f7c266928521
I tried to keep the changes to existing tests as minimal as
possible. There were a few exceptions, though:
* test_update_ignorecompat.js was completely broken. I couldn't
figure out why it was suddenly failing after I changed it to use
`add_test`, and it turned out that it had been failing all along,
but in a way that the harness didn't pick up.
* I changed most of the `do_throw` in update callbacks to `ok(false`
because it took me about an hour to figure out where the test was
failing when I hit one of them.
* I made some changes to sync `test_update.js` and `test_update_ignorecompat.js`
where one appeared to have been changed without updating the
other.
* I made `promiseFindAddonUpdates` a bit more generic, because I was
planning to convert most of `test_update.js` to use it, rather
than nested callbacks. I changed my mind a quarter of the way
through, but decided to keep the changes, since they'll probably
be useful elsewhere.
--HG--
extra : commitid : 84oLUw4ZPOg
extra : rebase_source : 2bd6c921c6b677e4d487d0ee9c33b1130163bc39
If not building the Windows Maintenance Service, avoid a dependency
on crypt32.dll and wintrust.dll.
Also, avoid setting sUsingService inside the updater code; this
ensures that all Maintenance Service related codepaths are skipped.
Rather that trying to get the method from the sandbox global object which will
only work for var and function declared methods instead evaluate the function
name in the sandbox scope and get the result which will give us access to the
lexical scope.
--HG--
extra : commitid : 1yWu6Go3XoQ
extra : rebase_source : 447ef2f2184229693cd6a45d6d5ac9705b200847