Closed Bug 1034608 Opened 10 years ago Closed 10 years ago

Update the gaiatest webserver to serve app manifest files with the correct content-type

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Bebe, Assigned: davehunt)

References

Details

(Whiteboard: [affects=webqa])

Attachments

(1 file)

In Bug 1032745 - Update test_homescreen_delete_app to use local content.  

We need the ability to install webapps. For this the server must serve content with the header "application/x-web-app-manifest+json"

Can we update the web server to contain this header?
Blocks: 1032745
This is all done from Marionette so I'll see if the Marionette team can do it.
Component: Gaia::UI Tests → Marionette
Product: Firefox OS → Testing
Summary: Update the gaia ui tests webserver to work with manifest files → Update the Marionette webserver to work with manifest files
Priority: -- → P2
Whiteboard: [affects=webqa]
Marionette uses mozhttpd as a web server. It should be possible to add the appropriate content type for manifest files, however I'm unsure if this should go into mozhttpd itself, the Marionette test runner, or even the Gaia test runner. As it's related to the tests, I suspect the Gaia test runner (gaiatest) would be the most appropriate place, however we may need changes in Marionette test runner to allow this.

Will: I'm guessing you're most familiar with mozhttpd, do you have any suggestions?
Flags: needinfo?(wlachance)
Yes, it should be pretty easy to use mozhttpd for this, just define a handler function with the appropriate headers. See the json response decorator for an example of this:

http://hg.mozilla.org/mozilla-central/file/f93c0ef45597/testing/mozbase/mozhttpd/mozhttpd/handlers.py

I suspect it would make the most sense if the logic for doing this was in the gaia test runner, but I'm not very familiar with either its structure or that of that marionette test runner so can't give much guidance there.
Flags: needinfo?(wlachance)
Assignee: nobody → dave.hunt
Status: NEW → ASSIGNED
Summary: Update the Marionette webserver to work with manifest files → Update the gaiatest webserver to serve app manifest files with the correct content-type
Component: Marionette → Gaia::UI Tests
Product: Testing → Firefox OS
Comment on attachment 8456069 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/21749/files

r+, works very well. Surprised, it didn't look too painful in the end.
(tested in the context of the other pull request)
Attachment #8456069 - Flags: review?(zcampbell) → review+
Comment on attachment 8456069 [details]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/21749/files

Nice!
Attachment #8456069 - Flags: review?(wlachance) → review+
Landed in:
https://github.com/mozilla-b2g/gaia/commit/2196e6268d2ff901dc0af87333803112f17e9091
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: