Closed Bug 1120505 Opened 9 years ago Closed 9 years ago

import Service Worker web platform tests written by blink

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: bkelly, Assigned: jgraham)

References

Details

Attachments

(1 file)

The blink team have written a number of web platform tests for ServiceWorker.  We should get these into the gecko automation sooner rather than later.
Do you know the current state of the SW tests?  I seem to recall you were reviewing some PRs from the blink folks.

Also, I had that problem with the Cache tests not completing from a while ago.  Did you ever have a chance to look at that?  I think that was bug 1091620.

We have a goal to pref on SW in Q1, so getting these in would be nice.
Depends on: 1091620
Flags: needinfo?(james)
Yup

So the tests are at [1] and should be compatible with web-platform-tests, but haven't been submitted yet. I have asked about plans to upstream them. It seems like they intend to, but it's not clear if they are actually going to put the time into doing that or not.

[1] https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/LayoutTests/http/tests/serviceworker/&q=service-worker&sq=package:chromium&type=cs
Joshua, if you could let us know if the team has time in the near future, that'd be appreciated.
Flags: needinfo?(inexorabletash)
So I started an import at [1]. I did a small amount of the required conversion work, and detailed some of the remaining work in the topmost commit message, which I will repeat below:

"""At least the following tasks remain:

* Rewrite the remaining PHP scripts as equivalent Python scripts using
  the API described at http://wptserve.readthedocs.org/en/latest/

* Convert references to the .php scripts in other files with references
  to the new .py scripts

* Replace uses of 127.0.0.1:8000 with {{host}}:{{ports[http][0]}} and
  localhost:8000 with {{domains[www]}}:{{ports[http][0]}}

* Ensure all files using the substitution syntax above are either given
  a filename like .sub.html or loaded with ?pipe=sub"""

I expect there will be other issues too that will come to light once the process is started. At this point I *very* roughly estimate there is a maybe day or two of work to do a basic conversion for someone that knows the web-platform-tests setup already (possibly less if they also understand ServiceWorker). For others you would have to add in time required to learn about wpt. After that there is an unknown amount of work fixing the tests to match the spec / not assume blink-isms / etc.

[1] https://github.com/w3c/web-platform-tests/commits/jgraham/blink-service-workers
Flags: needinfo?(james)
A small update here: I ported the PHP scripts to Python. However updating the servers will require working out which servers are supposed to be same doamin and which are supposed to be cross-domain; I think all the 127.0.0.1 servers are supposed to be cross-domain, for example.

There will also need to be some wpt changes so that all the files can run under https by default. For now it's not a big problem, just remember to load them as https://web-platform.test:8443
This was completed already.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(inexorabletash)
Resolution: --- → WORKSFORME
I thought this was for the cache tests, but its for the service worker tests themselves.
Blocks: ServiceWorkers-B2G
No longer blocks: serviceworker-cache
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
OK, so I think this needs to move forward. Plan: add the import I have to testing/web-platform/mozilla. Enable. Fixup the tests as needed. Move to testing/web-platform/tests once we think they are basically ready to upstream.
OK, pushed a basic conversion/import to try: https://hg.mozilla.org/try/pushloghtml?changeset=2ed661478989

Feel free to grab that and make improvements if you want. I plan to land it once I have all the right metadata.
Attached patch 1120505.diffSplinter Review
Patch to just add a rough auto-conversion of the tests so that they run, without attempting to fix every problem. Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=43016f31c138

Followup work actually fixing the tests will be needed.
Attachment #8626539 - Flags: review?(Ms2ger)
Comment on attachment 8626539 [details] [diff] [review]
1120505.diff

rs=me
Attachment #8626539 - Flags: review?(Ms2ger) → review+
https://hg.mozilla.org/mozilla-central/rev/a03152790896
Assignee: nobody → james
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: