Closed Bug 821589 Opened 12 years ago Closed 11 years ago

mozApps.installPackage doesn't have any automated tests at the DOM level

Categories

(Core Graveyard :: DOM: Apps, defect, P1)

defect

Tracking

(blocking-basecamp:-)

RESOLVED FIXED
mozilla24
blocking-basecamp -

People

(Reporter: briansmith, Assigned: ferjm)

References

Details

(Whiteboard: [apps-automation:P1])

Attachments

(2 files, 5 obsolete files)

+++ This bug was initially created as a clone of Bug #772365 +++

I wrote some automated tests for the signature verification code in PSM, but we don't have any tests at the DOM layer or the GAIA layer. We should build some mochitests and whatnot. For example, we should test that unsigned privileged apps cannot be installed and that privileged signed apps can be installed and that certified apps can never be installed whether they are signed or not.
To get this automation off the ground, we're going to want to put the dependencies on the UI dependent on a preference that SpecialPowers can flip to disable the UI. That's probably the first step - as that will remove the dependency on mochitest chrome and probably make it easier to write this automation targeting the DOM-specific pieces we're looking to analyze.
Definitely something we want to fix, but I wouldn't hold the product over it.
blocking-basecamp: ? → -
Blocks: app-install
Assignee: nobody → ferjmoreno
Attached patch Part 1: Tests base. WIP (obsolete) — Splinter Review
Attachment #711910 - Flags: review?(fabrice) → review+
Attached patch Part 1: Tests base. WIP (obsolete) — Splinter Review
144 INFO TEST-START | Shutdown
145 INFO Passed: 134
146 INFO Failed: 0
147 INFO Todo:   5
148 INFO SimpleTest FINISHED

IMO this patch could land as soon as Bug 826058 lands. Until then, I'll be adding more tests if possible.
Attachment #711911 - Attachment is obsolete: true
Attachment #712470 - Flags: feedback?(fabrice)
Depends on: 826058
Attached patch Part 1: Tests. WIP (obsolete) — Splinter Review
Attachment #712470 - Attachment is obsolete: true
Attachment #712470 - Flags: feedback?(fabrice)
Attached patch Part 1: Tests. WIP (obsolete) — Splinter Review
More tests
Attachment #718545 - Attachment is obsolete: true
Blocks: 859258
Attached patch Part1: Tests (obsolete) — Splinter Review
Attachment #727259 - Attachment is obsolete: true
Attachment #736301 - Flags: review?(fabrice)
Blocks: b2g-apps-v1-next
No longer blocks: app-install
defineLazyServiceGetter is failing in Cc[@mozilla.org/parentprocessmessagemanager;1].getService(Ci.nsIMessageBroadcaster) according to the instrumented try push at:
https://tbpl.mozilla.org/?tree=Try&rev=8487cc30cfc9
Whiteboard: [apps-automation]
Whiteboard: [apps-automation] → [apps-automation:P1]
Attachment #736301 - Flags: review?(fabrice)
Attached patch Part 1: TestsSplinter Review
Attachment #736301 - Attachment is obsolete: true
Attachment #751002 - Flags: review?(fabrice)
Attachment #751002 - Attachment is patch: true
Attachment #751002 - Attachment mime type: text/x-patch → text/plain
Depends on: 873134
Comment on attachment 751002 [details] [diff] [review]
Part 1: Tests

Review of attachment 751002 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/apps/tests/Makefile.in
@@ +21,3 @@
>    $(NULL)
>  
> +ifdef MOZ_B2G

We have packaged apps enabled on Android as well. Do these tests run successfully on FxAndroid if you allow them to run?
Comment on attachment 751002 [details] [diff] [review]
Part 1: Tests

Review of attachment 751002 [details] [diff] [review]:
-----------------------------------------------------------------

r=me, woohoo!

Jason, can we check that this runs also on Android in a followup? I'd like this to land so badly...

::: dom/apps/tests/test_packaged_app_install.html
@@ +303,5 @@
> +                          "?getManifest=true" +
> +                          "&wrongPackagePath=true";
> +    checkAppInstallError(miniManifestURL, "INVALID_MANIFEST");
> +  },
> +  function() {    

nit: trailing whitespace

@@ +327,5 @@
> +  },
> +  function() {
> +    // Test mini-manifest dev name is different from the webapp manifest dev
> +    // name.
> +    ok (true, "== TEST == Mini-manifest dev name is different from manifest " + 

here also
Yes. We can do that in a followup. I'll file a bug to get the tests running on FxAndroid.
Attachment #751002 - Flags: review?(fabrice) → review+
Filed bug 873567 to get these tests running on FxAndroid.
https://hg.mozilla.org/mozilla-central/rev/ecf32db974ef
https://hg.mozilla.org/mozilla-central/rev/bc47c6690f68
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
No longer blocks: b2g-apps-v1-next
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: