Commit Graph

1510 Commits

Author SHA1 Message Date
Chris Manchester
c0a229d4c3 Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium
MozReview-Commit-ID: FMEtb5PY7iP

--HG--
extra : rebase_source : 3cdee7528846462c758e623d6bcd2e6e17dbabff
2017-09-11 11:33:26 -07:00
Robert Strong
2c80f0c7bd bug 1361102 - change tests to account for updating the application update xml files asynchronously. r=dothayer 2017-09-08 10:38:55 -07:00
Robert Strong
2b9b13e6c9 bug 1361102 - split out tests so they are more deterministic when updating the application update xml files asynchronously. r=dothayer
--HG--
rename : toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedRecovery.js => toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedNoRecovery.js
rename : toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedRecovery.js => toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedOffline.js
rename : toolkit/mozapps/update/tests/unit_aus_update/downloadInvalidMar.js => toolkit/mozapps/update/tests/unit_aus_update/downloadInvalidSizeMar.js
rename : toolkit/mozapps/update/tests/unit_aus_update/downloadInvalidMar.js => toolkit/mozapps/update/tests/unit_aus_update/downloadMissingMar.js
2017-09-08 10:38:41 -07:00
Robert Strong
cd662f7515 bug 1361102 - update the application update xml files asynchronously for writes and deletions. r=dothayer 2017-09-08 10:38:31 -07:00
Robert Strong
9084ce73bb test code - Bug 1367910 - Delete active-updates.xml instead of writing to it when there isn't an active update. r=dothayer 2017-08-31 12:20:22 -07:00
Robert Strong
f0d8f05280 client code - Bug 1367910 - Delete active-updates.xml instead of writing to it when there isn't an active update. r=dothayer
When there are no updates to write to an xml file just delete the associated xml file
Cleaned up loading of the updates.xml and active-update.xml files so |_ensureUpdates| is no longer needed
Added dirty check for whether to write the update history in updates.xml
Adds errorCode property to nsIUpdatePatch so it is saved to the xml
Adds errorCode for trying to apply an older version or same version with the same build ID
Adds errorCode for when there is a no status file
Adds errorCode for channel change
2017-08-31 12:20:05 -07:00
Eric Rahm
0938982c90 Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj
--HG--
extra : rebase_source : 063c7f95dda063eafabfa1921366bd1957b8fe73
2017-08-11 17:45:18 -07:00
Robert Strong
9b64f352e7 Bug 1386176 Part 2 - App update patch. r=mhowell
MozReview-Commit-ID: 6GiFc0UpRw1

--HG--
extra : source : 46da0fc08e1c23e11250e8af002fa373e8e38af8
extra : histedit_source : 0b041b25e8e0e3488ebb474b3c341ec9048e11b1
2017-08-14 13:20:03 -07:00
Evan Tseng
4697753e00 Bug 1382135 - Remove all colon signs on sub-dialogs because we already removed them all on each category pane and we should make same thing for sub-dialogs. r=jaws
MozReview-Commit-ID: 8md6CFBSM3B

--HG--
extra : rebase_source : 80bff2dec6a20d7710aa3252c3e2fb295286b294
2017-08-01 11:54:54 +08:00
Masatoshi Kimura
8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Robert Strong
58093b5fc2 Bug 1105689 - use SHA384 certificates to sign app update mar files. Part 6 - app update test mar files signed with a SHA384 certificate. r=mhowell, a=app_update_sha384 2017-07-30 23:27:54 -07:00
Robert Strong
013866ec3b Bug 1105689 - use SHA384 certificates to sign app update mar files. Part 5 - app update test change for the new test mar file size. r=mhowell, a=app_update_sha384 2017-07-30 23:27:44 -07:00
Robert Strong
6d6b913f60 Bug 1105689 - use SHA384 certificates to sign app update mar files. Part 4 - app update SHA384 DER encoded certtificates. r=mhowell, a=app_update_sha384 2017-07-30 23:27:40 -07:00
Robert Strong
ef6fb23492 Bug 641212 - use lzma compression for application update. Part 4 - app update test mar files created using lzma compression. r=mhowell, a=app_update_lzma 2017-07-30 23:27:14 -07:00
Robert Strong
6847e81a18 Bug 641212 - use lzma compression for application update. Part 3 - test changes to support the new test mar file size and additional logging. r=mhowell, a=app_update_lzma 2017-07-30 23:27:05 -07:00
Robert Strong
c9eed36002 Bug 641212 - use lzma compression for application update. Part 2 - add xe-embedded decompression support to the updater. r=mhowell, , a=app_update_lzma
Changes to the libmar host utilities (mar and signmar) are backwards compatible with the previous versions of mar and signmar
2017-07-30 23:27:00 -07:00
Alessio Placitelli
2d82f2c5e6 Bug 1120372 - Introduce the "update" ping. r=bsmedberg,gfritzsche,mhowell
This ping will be sent as soon as an update is ready to be applied, after
it's downloaded. This is currently enabled but protected behind the
'toolkit.telemetry.updatePing.enabled' preference.

MozReview-Commit-ID: 4TuM0e5MzBl

--HG--
extra : rebase_source : aa3ebda3cf1e1fc2cdb8c294a643973c5101fa1c
2017-07-12 12:12:18 +02:00
Doug Thayer
1b05f8ad37 Bug 1383904 - Show old elevation dialog on elevation fail r=rstrong a=kwierso
The patch which originally disabled this seems to have been in error, thinking it was the cause of failing tests on try. Can't provide much more context than that.

MozReview-Commit-ID: 9h1pXVJeDCG

--HG--
extra : amend_source : 0b5bc70daa03efbee141b31e14c6b23ac35df553
2017-07-24 16:08:53 -07:00
Doug Thayer
ffb778fbad Bug 1382706 - Listen for pending-elevate in Update-Listener r=rstrong
We were missing a possible status in the list for the downloaded
topic. This should be all that we need to get the notification to
show up.

MozReview-Commit-ID: EQSccrdv30Y

--HG--
extra : rebase_source : cc620f08549fb099a82fd1fb4b4aee1c6a124e2f
2017-07-20 16:09:36 -07:00
Zibi Braniecki
2b81e48d4c Bug 1380278 - UpdateUtils.getLocale to Fetch API for async I/O. r=florian,whimboo
The NetUtils sync I/O shows up in the profile logs, so we want to switch the
function that loads `update.locale` file to be async.

MozReview-Commit-ID: AEYKiivsNl0

--HG--
extra : rebase_source : 3784a3d40d48e81df41d10eb92b35e1656a0305b
2017-07-12 10:34:23 -07:00
Carsten "Tomcat" Book
b5c809a8bc merge mozilla-inbound to mozilla-central a=merge 2017-07-07 10:35:44 +02:00
Sylvestre Ledru
4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Doug Thayer
906343ceef Bug 1377098 - Don't dismiss restart notifications r=rstrong
Since the restart itself will clear the restart notification if
it's successful, there's no need to actually dismiss it even on
the main action being executed. Accordingly, this patch changes
it to pass the "dismiss" field to the main action, which will
cause the main action to simply degrade the doorhanger to a
badge.

MozReview-Commit-ID: 5FKTTihIoe4

--HG--
extra : rebase_source : ec9bc2b961bd1c2ec08580d95f0fec06a7f2b437
2017-06-29 11:39:02 -07:00
Robert Strong
d8efa9e999 Bug 1376612 - Relaunch callback app even when the pid is still present. r=mhowell
This reverts the change made in Bug 1375549 where the callback application isn't relaunched when the pid is still present. Since the end result of relaunching when the pid hasn't exited is no worse than not relaunching just go ahead and try to relaunch.
2017-06-28 16:18:09 -07:00
Robert Strong
8f8743afac Bug 1378641 - add more app update test logging. r=mhowell 2017-07-06 18:20:22 -07:00
Robert Strong
448ca387ba Bug 1375549 - When the Firefox process doesn't exit apply the update anyway and don't relaunch the callback application. r=mhowell
This makes it so updating continue when the parent application doesn't exit (see bug 1375242) so any fixes to the parent application will be applied instead of leaving the client in a broken state.
Changes the wait time for the parent process to 30 seconds since the previous value of 70 seconds was based on nsTerminator which isn't used for this case. It still needs to be greater than the old value of 10 since we've seen cases lately where the process has taken more than 10 seconds.
2017-06-23 18:27:06 -07:00
Robert Strong
f9ae3f3f52 Bug 1373267 - Remove hashFunction and hashValue attributes from nsIUpdatePatch and code related to these attributes. r=mhowell
--HG--
rename : toolkit/mozapps/update/tests/unit_aus_update/downloadAndHashCheckMar.js => toolkit/mozapps/update/tests/unit_aus_update/downloadInvalidMar.js
2017-06-15 17:15:28 -07:00
Robert Strong
31214d5a1c Bug 1372523 - Update tests for the removal of the isSecurityUpdate, showNeverForVersion, and showPrompt attributes from nsIUpdate. r=mhowell
Converts the test functions getLocalPatchString, getLocalUpdateString, getRemotePatchString, and getRemoteUpdateString to use an object as a param.
2017-06-14 16:18:42 -07:00
Robert Strong
604fac26dd Bug 1372523 - Remove the isSecurityUpdate, showNeverForVersion, and showPrompt attributes from nsIUpdate and the use of these attributes. r=mhowell 2017-06-14 16:18:05 -07:00
Rajesh Kathiriya
6d3eb2c851 Bug 1370232 - Enabled the ESLint no-unneeded-ternary rule across mozilla-central. r=standard8
MozReview-Commit-ID: AH9ArRkjh78

--HG--
extra : rebase_source : bdd4c4f8a4779ea373479a9cba772c036e00e816
2017-06-13 00:23:54 +05:30
Robert Strong
b8bce5af15 Bug 1370634 - Make the time to wait the callback application (e.g. firefox.exe) to exit in the updater to be greater than the application's watchdog timer. r=mhowell 2017-06-06 20:27:21 -07:00
Robert Strong
25f82c418c Bug 1365845 - Reset app.update.cancelations after a successful update. r=mhowell 2017-06-06 20:26:14 -07:00
Doug Thayer
f20e3b394d Bug 1337007 - Clear umask while updating on OSX r=rstrong,spohl
On OSX, we want the updater to behave the same as when a user
drags a .dmg to the /Applications directory. When the user does
this, OSX does not follow their umask settings, assuming the user
wants to install the application for all users. The updater
should behave similarly.

MozReview-Commit-ID: JXFI9mW9erL

--HG--
extra : rebase_source : b03b38fed9f470dacbd68ad5f439a07cb111231f
2017-05-26 14:45:34 -07:00
Doug Thayer
dcd122aa51 Bug 1365204 - Add update badge histogram r=bsmedberg,rstrong
Currently we can't differentiate between when a badge is shown
and a doorhanger is shown. This creates an additional problem
where if the badge progresses into a doorhanger after a window of
time has passed, it registers as two notifications shown, when
logically it is one. This splits out badges and doorhangers to
remedy that.

MozReview-Commit-ID: CTTaWDG1tah

--HG--
extra : rebase_source : 2b13b703ac4e12caa040138dadd2875df76ff61a
2017-05-24 09:32:01 -07:00
Robert Strong
0059f15fa9 Bug 1301517 - Cleanup the setting of post update values added by bug 1301288. r=mhowell
With these changes the latest update in updates.xml is always the latest update in progress even before applying the update. This makes it so that after a successful update the code in nsBrowserContentHandler.js will always get the correct custom update property.
2017-05-25 09:52:51 -07:00
Doug Thayer
6ef545c191 Bug 1359733 - (pt. 2.1) Move remaining test files r=rstrong
Tried to do the reverse order (move files then edit), but
reviewboard didn't seem to like me trying to undo what I had
already done. This should at least make the diffs clean though.

MozReview-Commit-ID: Ibcgg2Mc6MT

--HG--
rename : browser/base/content/test/appUpdate/downloadPage.html => toolkit/mozapps/update/tests/browser/downloadPage.html
rename : browser/base/content/test/appUpdate/head.js => toolkit/mozapps/update/tests/browser/head.js
rename : browser/base/content/test/appUpdate/testConstants.js => toolkit/mozapps/update/tests/browser/testConstants.js
extra : rebase_source : db886e032b68f73c561ad7bdaa7e0d4ee4cf0e1a
2017-05-18 15:55:00 -07:00
Doug Thayer
82301632cc Bug 1359733 - (pt. 2) Refactor gMenuButtonUpdateBadge r=rstrong
Since we now have a store of notifications that is global across
all windows, it no longer makes sense to consume the API from
within browser.js. This patch moves the browser.js logic out into
a jsm file that is wired up through nsBrowserGlue, such that it
will be lazily instantiated on the first update event it would
receive[1].

We decided to move this into toolkit, as this piece of the
system is fairly generic and shouldn't differ between
applications.

[1]: There is a change to nsBrowserGlue to use "global[module]"
instead of this[module]. This mirrors the code for all the other
types of notifications, and I suspect it was just a latent bug,
since the original diff that includes this line makes no use of
it.

MozReview-Commit-ID: 8EQdM9BOpgl

--HG--
rename : browser/base/content/test/appUpdate/.eslintrc.js => toolkit/mozapps/update/tests/browser/.eslintrc.js
rename : browser/base/content/test/appUpdate/browser.ini => toolkit/mozapps/update/tests/browser/browser.ini
rename : browser/base/content/test/appUpdate/browser_updatesBackgroundWindow.js => toolkit/mozapps/update/tests/browser/browser_updatesBackgroundWindow.js
rename : browser/base/content/test/appUpdate/browser_updatesBackgroundWindowFailures.js => toolkit/mozapps/update/tests/browser/browser_updatesBackgroundWindowFailures.js
rename : browser/base/content/test/appUpdate/browser_updatesBasicPrompt.js => toolkit/mozapps/update/tests/browser/browser_updatesBasicPrompt.js
rename : browser/base/content/test/appUpdate/browser_updatesBasicPromptNoStaging.js => toolkit/mozapps/update/tests/browser/browser_updatesBasicPromptNoStaging.js
rename : browser/base/content/test/appUpdate/browser_updatesCantApply.js => toolkit/mozapps/update/tests/browser/browser_updatesCantApply.js
rename : browser/base/content/test/appUpdate/browser_updatesCompleteAndPartialPatchesWithBadCompleteSize.js => toolkit/mozapps/update/tests/browser/browser_updatesCompleteAndPartialPatchesWithBadCompleteSize.js
rename : browser/base/content/test/appUpdate/browser_updatesCompleteAndPartialPatchesWithBadPartialSize.js => toolkit/mozapps/update/tests/browser/browser_updatesCompleteAndPartialPatchesWithBadPartialSize.js
rename : browser/base/content/test/appUpdate/browser_updatesCompleteAndPartialPatchesWithBadSizes.js => toolkit/mozapps/update/tests/browser/browser_updatesCompleteAndPartialPatchesWithBadSizes.js
rename : browser/base/content/test/appUpdate/browser_updatesCompletePatchApplyFailure.js => toolkit/mozapps/update/tests/browser/browser_updatesCompletePatchApplyFailure.js
rename : browser/base/content/test/appUpdate/browser_updatesCompletePatchWithBadCompleteSize.js => toolkit/mozapps/update/tests/browser/browser_updatesCompletePatchWithBadCompleteSize.js
rename : browser/base/content/test/appUpdate/browser_updatesDownloadFailures.js => toolkit/mozapps/update/tests/browser/browser_updatesDownloadFailures.js
rename : browser/base/content/test/appUpdate/browser_updatesMalformedXml.js => toolkit/mozapps/update/tests/browser/browser_updatesMalformedXml.js
rename : browser/base/content/test/appUpdate/browser_updatesPartialPatchApplyFailure.js => toolkit/mozapps/update/tests/browser/browser_updatesPartialPatchApplyFailure.js
rename : browser/base/content/test/appUpdate/browser_updatesPartialPatchApplyFailureWithCompleteAvailable.js => toolkit/mozapps/update/tests/browser/browser_updatesPartialPatchApplyFailureWithCompleteAvailable.js
rename : browser/base/content/test/appUpdate/browser_updatesPartialPatchApplyFailureWithCompleteValidationFailure.js => toolkit/mozapps/update/tests/browser/browser_updatesPartialPatchApplyFailureWithCompleteValidationFailure.js
rename : browser/base/content/test/appUpdate/browser_updatesPartialPatchWithBadPartialSize.js => toolkit/mozapps/update/tests/browser/browser_updatesPartialPatchWithBadPartialSize.js
extra : rebase_source : 24048650b23eff0a1da9679d1e9b5e1db1900287
2017-05-19 08:56:22 -07:00
Robert Strong
ff874f028b Followup eslint fix for Bug 1366918. r=me 2017-05-23 10:23:04 -07:00
Robert Strong
c716ab4db4 Bug 1366918 - Remove redundant tests from urlConstruction.js and add tests that can be added to test_UpdateUtils_url.js from urlConstruction.js. r=mhowell 2017-05-23 10:07:35 -07:00
Robert Strong
7d35bd00fd Bug 1365861 - Minor gonk cleanup in nsUpdateService.js. r=mhowell
Removes unused gonk code
Changes use of Array.prototype.indexOf(val) != -1 to Array.prototype.includes(val)
Some very minor indentation and logging cleanup
2017-05-18 11:33:24 -07:00
Matt Howell
8312cf3057 Bug 1355818 - followup to fix eslint error. r=me
MozReview-Commit-ID: 3Gudztk76qG

--HG--
extra : rebase_source : 87dc1d6421f1638ff2f10c38dd80b974ffdd7bc5
2017-05-16 19:34:49 -07:00
Matt Howell
e32594a18e Bug 1355818 - Wait for staging to finish in the update wizard if downloading is done before the download page appears. r=rstrong
MozReview-Commit-ID: 1hTj35SYnDi

--HG--
extra : source : 7bc7221adbf29c5c2c0237a85291a606fcce3475
extra : amend_source : 3760803c007a4612b7661754cf768c8ec8b5b96c
2017-05-14 10:23:43 -07:00
Florian Quèze
5e3539e504 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Doug Thayer
5361205f4d Bug 1358363 - Show PanelUI notifications when window focused r=rstrong
Right now notifications displayed in non-focused windows are
causing that window to be focused. This is annoying. We could work
to make the doorhangers not focus the other windows, but a simpler
solution is to just not show the doorhanger until the window is
focused. This has the added benefit of ensuring that the doorhangers
entry animation is seen by the user, increasing the likelihood that
they will notice it.

Additionally, some existing tests involving extra windows were
refactored. I stripped the old tests of their extra windows and
created new tests specifically to test the behavior of background
windows. These tests were modeled off of the background window
tests of PopupNotifications.jsm, which create a new window knowing
that this will cause the existing window to be the background,
rather than explicitly manipulating the focus of the two windows.

MozReview-Commit-ID: 1fjrDOhEKCw

--HG--
extra : rebase_source : 954ace7e43da90fcee3da2d70c4bdbcda8456d77
2017-04-21 08:57:28 -07:00
Matt Howell
219948bce9 Bug 1363275 - Make the updater progress dialog DPI-aware on Windows. r=rstrong
MozReview-Commit-ID: FPjcbzW2RPY

--HG--
extra : rebase_source : 8c5e957c23e62e915dc11c2efe7c83846148ec63
2017-05-09 10:47:24 -07:00
Frederik Braun
cd1cbcef0f Bug 1359350: Add no-eval rule to eslint config (and whitelist failures in tests) r=standard8
MozReview-Commit-ID: 4nYlX4sSdbF

--HG--
extra : rebase_source : cf610e7d8bf2b8dbd5a0d40c5b835bc6620c3bba
2017-05-08 14:50:50 +02:00
Robert Strong
0882cf1e24 Client code - Bug 1362267 - Replace requests are failing on Windows and falling back to normal updates. r=mhowell
Restore chdir for replace requests in updater.cpp
2017-05-05 12:46:25 -07:00
Robert Strong
c6201e3098 Test code - Bug 1362267 - Replace requests are failing on Windows and falling back to normal updates. r=mhowell
Use an environment var for the test updater's current working dir
2017-05-05 12:46:21 -07:00
Tom Tromey
30dfbf2080 Bug 1334283 - use MOZ_FORMAT_PRINTF in toolkit/mozapps/update; r=rstrong
Use MOZ_FORMAT_PRINTF in toolkit/mozapps/update, and fix the one
erroneous printf that this detected.

MozReview-Commit-ID: 5dzyMOZwNDG

--HG--
extra : rebase_source : b26942181d52b356702c039bcace11dbf900a3d1
2017-05-02 08:55:19 -06:00
Robert Strong
d504bfc0fb Bug 1358336 - followup test only fix to handle the different staging location on OS X. r=me 2017-04-28 18:12:00 -07:00