Test packaged apps update

RESOLVED FIXED in mozilla27


5 years ago
a year ago


(Reporter: marco, Assigned: marco)


Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)



(1 attachment, 2 obsolete attachments)



5 years ago
Created attachment 802706 [details] [diff] [review]

This test is a simple test, quite similar to the hosted and cached app tests.
Attachment #802706 - Flags: review?(fabrice)
We already have some coming in bug 900553.

Comment 2

5 years ago
(In reply to Fabrice Desré [:fabrice] from comment #1)
> We already have some coming in bug 900553.

Yes, I've seen them, this one is a bit different because it actually loads the application in an iframe.
Sure, but that's not a good reason to have duplicate tests. Improve the existing ones if you wish, but duplication is not great.

Comment 4

5 years ago
Oh, yes, sure, I'll build on top of the test in bug 900553 when it will land! I just wanted to make sure that this test was actually useful, to avoid wasting time if it wasn't.

I've made this one a chrome mochitest because otherwise I couldn't load a app:// url in the iframe (because of the Ci.nsIProtocolHandler.URI_DANGEROUS_TO_LOAD flag, IIRC). Do you know of any workaround so that I can make it a plain mochitest?

Comment 5

5 years ago
Created attachment 806976 [details] [diff] [review]
Add simple test to test_packaged_app_update

This adds a small test to check that checkForUpdate doesn't find updates right after an application is installed and that mozIDOMApplication::download() doesn't download anything if no update is available.

The test that checks the package contents by loading the app in an iframe isn't yet present in this patch.
It needs to be in a chrome mochitest, do you want me to convert test_packaged_app_update.html to a chrome mochitest or do you prefer me to create a new test for that? (unless you know a workaround to allow the app:// protocol to be used in an iframe in a plain mochitest)
Attachment #802706 - Attachment is obsolete: true
Attachment #802706 - Flags: review?(fabrice)
Attachment #806976 - Flags: review?(fabrice)
Comment on attachment 806976 [details] [diff] [review]
Add simple test to test_packaged_app_update

Review of attachment 806976 [details] [diff] [review]:

lgtm, but please send to try before landing

::: dom/apps/tests/test_packaged_app_update.html
@@ +29,5 @@
>  var miniManifestURL;
>  SimpleTest.waitForExplicitFinish();
> +function checkForUpdate(aExpected, aOnSuccess, aOnApplied, aOnDownloadError, aLaunchDownload, aOnRequestError) {

nit: is this < 80 chars?
Attachment #806976 - Flags: review?(fabrice) → review+

Comment 7

5 years ago
Created attachment 811003 [details] [diff] [review]

Assignee: nobody → mcastelluccio
Attachment #806976 - Attachment is obsolete: true
Attachment #811003 - Flags: review+


5 years ago
Keywords: checkin-needed
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27


a year ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.