Closed Bug 1120505 Opened 9 years ago Closed 9 years ago

import Service Worker web platform tests written by blink


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

Not set



Tracking Status
firefox41 --- fixed


(Reporter: bkelly, Assigned: jgraham)




(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)

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.

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

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

* Replace uses of 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.

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 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.
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
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:

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:

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

Attachment #8626539 - Flags: review?(Ms2ger) → review+
Assignee: nobody → james
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.