Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Issue 430993002: [ServiceWorker] CacheStorage tests. (Closed)

Created:
6 years, 4 months ago by asanka
Modified:
6 years, 3 months ago
Reviewers:
gavinp, jsbell
CC:
blink-reviews, michaeln, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, tzik, serviceworker-reviews, nhiroki, falken, kinuko+serviceworker, horo+watch_chromium.org, alecflett+watch_chromium.org
Project:
blink
Visibility:
Public.

Description

[ServiceWorker] CacheStorage tests. These tests exercise the following methods of CacheStorage: * get() * has() * create() * delete() * keys() The editors draft is at: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#cache-storage BUG=374802 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182633

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix typo and formatting #

Total comments: 13

Patch Set 3 : Address comments, add tests for get(), bring tests up-to-date with spec. #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 17

Patch Set 6 : Address comments. #

Total comments: 6

Patch Set 7 : 'Formatting' #

Patch Set 8 : Typo #

Patch Set 9 : Allow throwing JS errors in assert_promise_throws #

Total comments: 6

Patch Set 10 : Address comments #

Patch Set 11 : #

Total comments: 8

Patch Set 12 : TYpoS. Delete caches before creating. No hack for JS Error objects. #

Total comments: 5

Patch Set 13 : #

Total comments: 2

Patch Set 14 : Add test expectations #

Patch Set 15 : Resolve collision with TestExpectation changes #

Patch Set 16 : Update test expectations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+297 lines, -2 lines) Patch
A LayoutTests/http/tests/serviceworker/cache-storage.html View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/cache-storage-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/cache-storage-keys.html View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/cache-storage-keys-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/interfaces-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +7 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +30 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +185 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/interfaces-worker.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +11 lines, -1 line 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/test-helpers.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (7 generated)
asanka
6 years, 4 months ago (2014-07-30 23:08:36 UTC) #1
jsbell
Another quick skim https://codereview.chromium.org/430993002/diff/1/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js (right): https://codereview.chromium.org/430993002/diff/1/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js#newcode26 LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js:26: 'CacheStroage.keys should only return ' + ...
6 years, 4 months ago (2014-08-01 00:09:11 UTC) #2
asanka
https://codereview.chromium.org/430993002/diff/1/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js (right): https://codereview.chromium.org/430993002/diff/1/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js#newcode26 LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js:26: 'CacheStroage.keys should only return ' + On 2014/08/01 00:09:11, ...
6 years, 4 months ago (2014-08-01 06:03:21 UTC) #3
dominicc (has gone to gerrit)
Comments inline. In general these look very well crafted tests. https://codereview.chromium.org/430993002/diff/20001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js (right): https://codereview.chromium.org/430993002/diff/20001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js#newcode3 ...
6 years, 4 months ago (2014-08-11 01:57:37 UTC) #4
jsbell
https://codereview.chromium.org/430993002/diff/20001/LayoutTests/http/tests/serviceworker/resources/cache-storage-test-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-test-worker.js (right): https://codereview.chromium.org/430993002/diff/20001/LayoutTests/http/tests/serviceworker/resources/cache-storage-test-worker.js#newcode78 LayoutTests/http/tests/serviceworker/resources/cache-storage-test-worker.js:78: // FIXME: Define and test behavior for invalid cache ...
6 years, 4 months ago (2014-08-11 22:48:34 UTC) #5
asanka
https://codereview.chromium.org/430993002/diff/20001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js (right): https://codereview.chromium.org/430993002/diff/20001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js#newcode3 LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js:3: var test_cache_list = ['enum-1', 'enum-2', 'enum-3']; On 2014/08/11 01:57:36, ...
6 years, 4 months ago (2014-08-13 01:22:52 UTC) #6
dominicc (has gone to gerrit)
> > Someone familiar with the Cache implementation (gavinp@?) might advise on > > whether ...
6 years, 4 months ago (2014-08-15 06:53:01 UTC) #7
jsbell
On 2014/08/15 06:53:01, dominicc wrote: > > > Someone familiar with the Cache implementation (gavinp@?) ...
6 years, 4 months ago (2014-08-15 17:07:24 UTC) #8
asanka
On 2014/08/15 at 17:07:24, jsbell wrote: > On 2014/08/15 06:53:01, dominicc wrote: > > > ...
6 years, 4 months ago (2014-08-15 18:03:16 UTC) #9
jsbell
On 2014/08/15 18:03:16, asanka wrote: > I'm guessing we won't be able to land this ...
6 years, 4 months ago (2014-08-15 18:35:02 UTC) #10
jsbell
Also looking pretty good. Worried about lifetime of the caches across tests (noted below) https://codereview.chromium.org/430993002/diff/80001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js ...
6 years, 4 months ago (2014-08-15 21:36:13 UTC) #11
jsbell
On 2014/08/15 18:35:02, jsbell wrote: > On 2014/08/15 18:03:16, asanka wrote: > > I'm guessing ...
6 years, 4 months ago (2014-08-15 23:07:41 UTC) #12
dominicc (has gone to gerrit)
My $0.02: Let's get these in with Pass Fail expectations. This will support the cache ...
6 years, 4 months ago (2014-08-18 01:08:20 UTC) #13
asanka
https://codereview.chromium.org/430993002/diff/80001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js (right): https://codereview.chromium.org/430993002/diff/80001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js#newcode7 LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-test-worker.js:7: return caches.keys() On 2014/08/15 21:36:13, jsbell wrote: > Can ...
6 years, 4 months ago (2014-08-20 03:10:29 UTC) #14
jsbell
lgtm! https://codereview.chromium.org/430993002/diff/100001/LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js (right): https://codereview.chromium.org/430993002/diff/100001/LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js#newcode16 LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js:16: // Note that this test may collide with ...
6 years, 4 months ago (2014-08-20 17:54:13 UTC) #15
jsbell
Note: this will need the -expected.txt files added, since most of the tests will fail ...
6 years, 4 months ago (2014-08-20 18:24:22 UTC) #16
asanka
Thanks! I'll add expectations and land once I've verified that the failures make sense. https://codereview.chromium.org/430993002/diff/100001/LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js ...
6 years, 4 months ago (2014-08-20 21:20:50 UTC) #17
jsbell
On 2014/08/20 21:20:50, asanka wrote: > Thanks! I'll add expectations and land once I've verified ...
6 years, 4 months ago (2014-08-20 21:44:52 UTC) #18
jsbell
https://codereview.chromium.org/430993002/diff/160001/LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js (right): https://codereview.chromium.org/430993002/diff/160001/LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js#newcode21 LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js:21: return self.caches.create(); I missed that this is calling create() ...
6 years, 4 months ago (2014-08-21 19:07:48 UTC) #19
jsbell
https://codereview.chromium.org/430993002/diff/160001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js (right): https://codereview.chromium.org/430993002/diff/160001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js#newcode7 LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js:7: return self.caches.keys() This need to do a cleanup pass, ...
6 years, 4 months ago (2014-08-21 20:35:01 UTC) #20
asanka
https://codereview.chromium.org/430993002/diff/160001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js (right): https://codereview.chromium.org/430993002/diff/160001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js#newcode7 LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js:7: return self.caches.keys() On 2014/08/21 20:35:01, jsbell wrote: > This ...
6 years, 4 months ago (2014-08-21 21:50:59 UTC) #21
jsbell
I was going to suggest landing this set of tests but I'm hitting flaky v8 ...
6 years, 3 months ago (2014-08-27 18:42:16 UTC) #22
jsbell
Yep, no flaky crashes with 433blahblahblah applied...
6 years, 3 months ago (2014-08-27 19:30:20 UTC) #23
asanka
On 2014/08/27 19:30:20, jsbell wrote: > Yep, no flaky crashes with 433blahblahblah applied... Awesome! Will ...
6 years, 3 months ago (2014-08-27 19:39:14 UTC) #24
asanka
Patchset #12 (id:220001) has been deleted
6 years, 3 months ago (2014-08-27 20:15:08 UTC) #25
dominicc (has gone to gerrit)
dominicc@chromium.org changed reviewers: - dominicc@chromium.org
6 years, 3 months ago (2014-08-27 21:12:07 UTC) #26
jsbell
https://codereview.chromium.org/430993002/diff/200001/LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js File LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js (right): https://codereview.chromium.org/430993002/diff/200001/LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js#newcode105 LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js:105: assert_class_string(e, code, description); This doesn't work - the Error ...
6 years, 3 months ago (2014-08-27 21:56:47 UTC) #27
jsbell
https://codereview.chromium.org/430993002/diff/200001/LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js File LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js (right): https://codereview.chromium.org/430993002/diff/200001/LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js#newcode99 LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js:99: throw 'assert_promise_throws: ' + description + ' Promise did ...
6 years, 3 months ago (2014-08-27 22:28:24 UTC) #28
jsbell
https://codereview.chromium.org/430993002/diff/200001/LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js (right): https://codereview.chromium.org/430993002/diff/200001/LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js#newcode121 LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js:121: return self.caches.create(cache_name) This needs a 'delete' so it can ...
6 years, 3 months ago (2014-08-27 23:20:08 UTC) #29
asanka
https://codereview.chromium.org/430993002/diff/200001/LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js (right): https://codereview.chromium.org/430993002/diff/200001/LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js#newcode121 LayoutTests/http/tests/serviceworker/resources/cache-storage-worker.js:121: return self.caches.create(cache_name) On 2014/08/27 23:20:07, jsbell wrote: > This ...
6 years, 3 months ago (2014-08-28 00:02:56 UTC) #30
jsbell
Thanks for sticking with this. With the code CLs applied, everything passes except for the ...
6 years, 3 months ago (2014-08-28 21:07:26 UTC) #31
jsbell
https://codereview.chromium.org/430993002/diff/240001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js (right): https://codereview.chromium.org/430993002/diff/240001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js#newcode29 LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js:29: assert_array_equals(keys, On 2014/08/28 21:07:26, jsbell wrote: > Order is ...
6 years, 3 months ago (2014-08-28 21:49:01 UTC) #32
asanka
Looks like the spec still requires .match() to be present on CacheStorage. https://codereview.chromium.org/430993002/diff/240001/LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-storage-keys-worker.js ...
6 years, 3 months ago (2014-08-28 21:59:46 UTC) #33
jsbell
On 2014/08/28 21:59:46, asanka wrote: > Looks like the spec still requires .match() to be ...
6 years, 3 months ago (2014-08-28 22:31:46 UTC) #34
jsbell
https://codereview.chromium.org/430993002/diff/260001/LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js File LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js (right): https://codereview.chromium.org/430993002/diff/260001/LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js#newcode96 LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js:96: function assert_promise_throws(promise, code, description) { Can we rename this ...
6 years, 3 months ago (2014-09-11 22:27:30 UTC) #35
asanka
https://codereview.chromium.org/430993002/diff/260001/LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js File LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js (right): https://codereview.chromium.org/430993002/diff/260001/LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js#newcode96 LayoutTests/http/tests/serviceworker/resources/worker-test-harness.js:96: function assert_promise_throws(promise, code, description) { On 2014/09/11 22:27:30, jsbell ...
6 years, 3 months ago (2014-09-24 03:28:55 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/430993002/280001
6 years, 3 months ago (2014-09-24 03:29:38 UTC) #38
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 3 months ago (2014-09-24 03:29:59 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/430993002/300001
6 years, 3 months ago (2014-09-24 15:21:49 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/26258)
6 years, 3 months ago (2014-09-24 16:03:25 UTC) #44
jsbell
On 2014/09/24 16:03:25, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 3 months ago (2014-09-24 17:29:31 UTC) #45
asanka
On 2014/09/24 17:29:31, jsbell wrote: > On 2014/09/24 16:03:25, I haz the power (commit-bot) wrote: ...
6 years, 3 months ago (2014-09-24 20:59:26 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/430993002/320001
6 years, 3 months ago (2014-09-24 21:01:00 UTC) #50
commit-bot: I haz the power
6 years, 3 months ago (2014-09-24 21:27:33 UTC) #51
Message was sent while issue was closed.
Committed patchset #16 (id:320001) as 182633

Powered by Google App Engine
This is Rietveld 408576698