Moved these mostly onto the prototype. We couldn't do this before without making
the target of the wrapper a property of the wrappers and we don't want to expose
that but now WeakMaps allow us to get the target without exposing it.
Once change with this approach is that when the test suite shuts down the
add-ons manager it kills the map and so wrappers cease to function. A couple of
tests were relying on accessing wrapper properties after that but that would
have likely been unsafe anyway.
--HG--
extra : commitid : 6OI6dLyM45D
extra : rebase_source : c8a53360ce582186dcdc5cbf0dfc2b5057881eac
Both for brevity and to remove the use of |self = this|.
--HG--
extra : commitid : 7gNXRCzxPxM
extra : rebase_source : 4dccdf8bf99f5979664ca3ca3d9e61f66e217bfe
We used to need explicit names for functions to make stack traces display
properly. The JS engine is smarter now so doesn't need them and they just
make the code messy and redundant.
--HG--
extra : commitid : 4FEIiQYhRQu
extra : rebase_source : 26689d5417f592d0f327f32076245cb4f154229a
For build speed, for correct line numbers in errors, for faster development, for so many reasons.
Still a couple of cases left mostly in XUL files for different strings on Windows.
Bonus: The new lexical scope means ADDON_SIGNING and REQUIRE_SIGNING can just
be declared as regular constants and outside code can't get to them easily.
--HG--
extra : commitid : Kj8khjuCwG2
extra : rebase_source : 2e0a3143900c0c414cda43254306f0c070f8e621
Simple obvious fix. Adds tests by making BootstrapMonitor (which
test_experiments.js and others use for verifying bootstrap startup and shutdown)
verify the list of registered chrome manifests at various points. Without the
fix this makes test_experiment fail as expected.
--HG--
extra : commitid : DhCOtar9Mqu
extra : rebase_source : c194a4d390bbd460b9c17ec09e9c3a219b5025d6
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