Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache API tests: prepopulate cache in deterministic order #5521

Merged
merged 1 commit into from
Apr 10, 2017

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Apr 10, 2017

Chrome and Firefox differ in the order in which cache keys() are
returned. Chrome orders by according to when the put()s were issued.
Firefox orders by when the body is complete. The test helper
prepopulated_cache_test did not guarantee that these matched, leading
to the tests being flaky in Firefox. This change tweaks the helper so
that the put()s are processed serially so that the order is
deterministic for both.

Spec issue: w3c/ServiceWorker#823
BUG=655479

Review-Url: https://codereview.chromium.org/2806793002
Cr-Commit-Position: refs/heads/master@{#463195}


This change is Reviewable

Chrome and Firefox differ in the order in which cache keys() are
returned. Chrome orders by according to when the put()s were issued.
Firefox orders by when the body is complete. The test helper
prepopulated_cache_test did not guarantee that these matched, leading
to the tests being flaky in Firefox. This change tweaks the helper so
that the put()s are processed serially so that the order is
deterministic for both.

Spec issue: w3c/ServiceWorker#823
BUG=655479

Review-Url: https://codereview.chromium.org/2806793002
Cr-Commit-Position: refs/heads/master@{#463195}
@wpt-pr-bot
Copy link
Collaborator

Notifying @inexorabletash and @wanderview. (Learn how reviewing works.)

@ghost
Copy link

ghost commented Apr 10, 2017

View the complete job log.

Firefox (nightly channel)

Testing web-platform-tests at revision e65d020
Using browser at version BuildID 20170409194145; SourceStamp 45692c884fdd5136a64fb2f8a61a0c8183b69331
Starting 10 test iterations
All results were stable

All results

8 tests ran
/service-workers/cache-storage/window/cache-add.https.html
Subtest Results Messages
OK
Cache.add called with no arguments PASS
Cache.add called with relative URL specified as a string PASS
Cache.add called with non-HTTP/HTTPS URL PASS
Cache.add called with Request object PASS
Cache.add called with POST request PASS
Cache.add called twice with the same Request object PASS
Cache.add with request with null body (not consumed) FAIL assert_false: expected false got true
Cache.add with 206 response FAIL promise_test: Unhandled rejection with value: object "ReferenceError: assert_promise_rejects is not defined"
Cache.addAll with 206 response FAIL promise_test: Unhandled rejection with value: object "TypeError: test.unreached_func is not a function"
Cache.add with request that results in a status of 404 PASS
Cache.add with request that results in a status of 500 PASS
Cache.addAll with no arguments PASS
Cache.addAll with a mix of valid and undefined arguments PASS
Cache.addAll with an empty array PASS
Cache.addAll with string URL arguments PASS
Cache.addAll with Request arguments PASS
Cache.addAll with a mix of succeeding and failing requests PASS
Cache.addAll called with the same Request object specified twice PASS
/service-workers/cache-storage/window/cache-delete.https.html
Subtest Results Messages
OK
Cache.delete with no arguments PASS
Cache.delete called with a string URL PASS
Cache.delete called with a Request object PASS
Cache.delete called with a HEAD request PASS
Cache.delete with a non-existent entry PASS
/service-workers/cache-storage/window/cache-match.https.html
Subtest Results Messages
OK
Cache.match with no matching entries PASS
Cache.match with URL PASS
Cache.match with Request PASS
Cache.match with new Request PASS
Cache.match with HEAD PASS
Cache.match with ignoreSearch option (request with no search parameters) PASS
Cache.match with ignoreSearch option (request with search parameter) PASS
Cache.match with URL containing fragment PASS
Cache.match with string fragment "http" as query PASS
Cache.match with responses containing "Vary" header PASS
Cache.match with Request and Response objects with different URLs PASS
Cache.match invoked multiple times for the same Request/Response PASS
Cache.match with POST Request PASS
Cache.match with a non-2xx Response PASS
Cache.match with a network error Response PASS
Cache produces large Responses that can be cloned and read correctly. PASS
/service-workers/cache-storage/window/cache-matchAll.https.html
Subtest Results Messages
OK
Cache.matchAll with no matching entries PASS
Cache.matchAll with URL PASS
Cache.matchAll with Request PASS
Cache.matchAll with new Request PASS
Cache.matchAll with HEAD PASS
Cache.matchAll with ignoreSearch option (request with no search parameters) PASS
Cache.matchAll with ignoreSearch option (request with search parameter) PASS
Cache.matchAll with URL containing fragment PASS
Cache.matchAll with string fragment "http" as query PASS
Cache.matchAll with responses containing "Vary" header PASS
Cache.matchAll with "ignoreVary" parameter PASS
/service-workers/cache-storage/window/cache-put.https.html
Subtest Results Messages
OK
Cache.put called with simple Request and Response PASS
Cache.put called with Request and Response from fetch() PASS
Cache.put with Request without a body PASS
Cache.put with Response without a body PASS
Cache.put with a Response containing an empty URL PASS
Cache.put with an empty response body PASS
Cache.put with 206 response FAIL promise_test: Unhandled rejection with value: object "ReferenceError: assert_promise_rejects is not defined"
Cache.put with HTTP 500 response PASS
Cache.put called twice with matching Requests and different Responses PASS
Cache.put called twice with request URLs that differ only by a fragment PASS
Cache.put with a string request PASS
Cache.put with an invalid response PASS
Cache.put with a non-HTTP/HTTPS request PASS
Cache.put with a relative URL PASS
Cache.put with a non-GET request PASS
Cache.put with a null response PASS
Cache.put with a POST request PASS
Cache.put with a used response body PASS
getReader() after Cache.put PASS
Cache.put with a VARY:* Response PASS
Cache.put with an embedded VARY:* Response PASS
Cache.put should store Response.redirect() correctly PASS
/service-workers/cache-storage/window/cache-storage-keys.https.html
Subtest Results Messages
OK
CacheStorage keys PASS
/service-workers/cache-storage/window/cache-storage-match.https.html
Subtest Results Messages
OK
CacheStorageMatch with no cache name provided PASS
CacheStorageMatch from one of many caches PASS
CacheStorageMatch from one of many caches by name PASS
CacheStorageMatch a string request PASS
CacheStorageMatch a HEAD request PASS
CacheStorageMatch with no cached entry PASS
CacheStorageMatch with no caches available but name provided PASS
/service-workers/cache-storage/window/cache-storage.https.html
Subtest Results Messages
OK
CacheStorage.open PASS
CacheStorage.open with an empty name PASS
CacheStorage.open with no arguments PASS
CacheStorage.has with existing cache PASS
CacheStorage.has with nonexistent cache PASS
CacheStorage.open with existing cache PASS
CacheStorage.delete with existing cache PASS
CacheStorage.delete with nonexistent cache PASS
CacheStorage names are DOMStrings not USVStrings PASS

@ghost
Copy link

ghost commented Apr 10, 2017

View the complete job log.

Chrome (unstable channel)

Testing web-platform-tests at revision e65d020
Using browser at version 59.0.3063.4 dev
Starting 10 test iterations
All results were stable

All results

8 tests ran
/service-workers/cache-storage/window/cache-add.https.html
Subtest Results Messages
ERROR
Cache.add called with no arguments PASS
Cache.add called with relative URL specified as a string PASS
Cache.add called with non-HTTP/HTTPS URL PASS
Cache.add called with Request object PASS
Cache.add called with POST request PASS
Cache.add called twice with the same Request object PASS
Cache.add with request with null body (not consumed) PASS
Cache.add with 206 response FAIL promise_test: Unhandled rejection with value: object "ReferenceError: assert_promise_rejects is not defined"
Cache.addAll with 206 response FAIL promise_test: Unhandled rejection with value: object "TypeError: test.unreached_func is not a function"
Cache.add with request that results in a status of 404 PASS
Cache.add with request that results in a status of 500 PASS
Cache.addAll with no arguments PASS
Cache.addAll with a mix of valid and undefined arguments PASS
Cache.addAll with an empty array PASS
Cache.addAll with string URL arguments PASS
Cache.addAll with Request arguments PASS
Cache.addAll with a mix of succeeding and failing requests PASS
Cache.addAll called with the same Request object specified twice FAIL assert_unreached: Should have rejected: Cache.addAll should throw InvalidStateError if the same request is added twice. Reached unreachable code
/service-workers/cache-storage/window/cache-delete.https.html
Subtest Results Messages
OK
Cache.delete with no arguments PASS
Cache.delete called with a string URL PASS
Cache.delete called with a Request object PASS
Cache.delete called with a HEAD request PASS
Cache.delete with a non-existent entry PASS
/service-workers/cache-storage/window/cache-match.https.html
Subtest Results Messages
OK
Cache.match with no matching entries PASS
Cache.match with URL PASS
Cache.match with Request PASS
Cache.match with new Request PASS
Cache.match with HEAD PASS
Cache.match with ignoreSearch option (request with no search parameters) PASS
Cache.match with ignoreSearch option (request with search parameter) PASS
Cache.match with URL containing fragment PASS
Cache.match with string fragment "http" as query PASS
Cache.match with responses containing "Vary" header PASS
Cache.match with Request and Response objects with different URLs PASS
Cache.match invoked multiple times for the same Request/Response PASS
Cache.match with POST Request PASS
Cache.match with a non-2xx Response PASS
Cache.match with a network error Response PASS
Cache produces large Responses that can be cloned and read correctly. PASS
/service-workers/cache-storage/window/cache-matchAll.https.html
Subtest Results Messages
OK
Cache.matchAll with no matching entries PASS
Cache.matchAll with URL PASS
Cache.matchAll with Request PASS
Cache.matchAll with new Request PASS
Cache.matchAll with HEAD PASS
Cache.matchAll with ignoreSearch option (request with no search parameters) PASS
Cache.matchAll with ignoreSearch option (request with search parameter) PASS
Cache.matchAll with URL containing fragment PASS
Cache.matchAll with string fragment "http" as query PASS
Cache.matchAll with responses containing "Vary" header FAIL assert_equals: Cache.matchAll should match the entire header if a vary header is present in both the query and cached requests. expected 1 but got 0
Cache.matchAll with "ignoreVary" parameter FAIL assert_equals: Cache.matchAll should honor "ignoreVary" parameter. expected 3 but got 1
/service-workers/cache-storage/window/cache-put.https.html
Subtest Results Messages
OK
Cache.put called with simple Request and Response PASS
Cache.put called with Request and Response from fetch() PASS
Cache.put with Request without a body PASS
Cache.put with Response without a body PASS
Cache.put with a Response containing an empty URL PASS
Cache.put with an empty response body PASS
Cache.put with 206 response FAIL promise_test: Unhandled rejection with value: object "ReferenceError: assert_promise_rejects is not defined"
Cache.put with HTTP 500 response PASS
Cache.put called twice with matching Requests and different Responses PASS
Cache.put called twice with request URLs that differ only by a fragment PASS
Cache.put with a string request PASS
Cache.put with an invalid response PASS
Cache.put with a non-HTTP/HTTPS request PASS
Cache.put with a relative URL PASS
Cache.put with a non-GET request PASS
Cache.put with a null response PASS
Cache.put with a POST request PASS
Cache.put with a used response body PASS
getReader() after Cache.put PASS
Cache.put with a VARY:* Response PASS
Cache.put with an embedded VARY:* Response PASS
Cache.put should store Response.redirect() correctly PASS
/service-workers/cache-storage/window/cache-storage-keys.https.html
Subtest Results Messages
OK
CacheStorage keys PASS
/service-workers/cache-storage/window/cache-storage-match.https.html
Subtest Results Messages
OK
CacheStorageMatch with no cache name provided PASS
CacheStorageMatch from one of many caches PASS
CacheStorageMatch from one of many caches by name PASS
CacheStorageMatch a string request PASS
CacheStorageMatch a HEAD request PASS
CacheStorageMatch with no cached entry PASS
CacheStorageMatch with no caches available but name provided PASS
/service-workers/cache-storage/window/cache-storage.https.html
Subtest Results Messages
OK
CacheStorage.open PASS
CacheStorage.open with an empty name PASS
CacheStorage.open with no arguments PASS
CacheStorage.has with existing cache PASS
CacheStorage.has with nonexistent cache PASS
CacheStorage.open with existing cache PASS
CacheStorage.delete with existing cache PASS
CacheStorage.delete with nonexistent cache PASS
CacheStorage names are DOMStrings not USVStrings FAIL assert_true: keys should include cache with bad name expected true got false

@foolip
Copy link
Member

foolip commented Apr 10, 2017

This should be combined with #5413, but leaving open until that's merged or it will be automatically re-created.

@ghost
Copy link

ghost commented Apr 11, 2017

These tests are now available on w3c-test.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants