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

Issue 425413002: [ServiceWorker] Tests for Cache (Closed)

Created:
6 years, 4 months ago by asanka
Modified:
6 years, 2 months ago
Reviewers:
jkarlin, 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] Tests for Cache These tests exercise the following methods on Cache objects: * add * addAll * put * match * matchAll BUG=374802 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184242

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address comments and update tests with spec. #

Patch Set 3 : More tests. #

Total comments: 53

Patch Set 4 : Address comments. #

Total comments: 8

Patch Set 5 : Comments + 'Vary' header tests + refactoring #

Patch Set 6 : Fix typo #

Patch Set 7 : Update interfaces test #

Patch Set 8 : #

Patch Set 9 : Merge with ToT #

Patch Set 10 : Add test expectations. #

Patch Set 11 : #

Total comments: 2

Patch Set 12 : #

Total comments: 1

Patch Set 13 : CacheStorage.{create => open} #

Total comments: 19

Patch Set 14 : Updates tests to comply with spec changes #

Total comments: 20

Patch Set 15 : Enable more tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+996 lines, -11 lines) Patch
M LayoutTests/http/tests/resources/testharness-helpers.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +108 lines, -2 lines 0 comments Download
A + LayoutTests/http/tests/serviceworker/cache-add.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/cache-add-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +20 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/serviceworker/cache-match.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/cache-match-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +22 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/serviceworker/cache-put.html View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/cache-put-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +16 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/interfaces-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/resources/cache-add-worker.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +146 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/resources/cache-match-worker.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +399 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +219 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 2 chunks +18 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/worker-testharness.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +38 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (10 generated)
asanka
6 years, 4 months ago (2014-07-30 23:09:02 UTC) #1
jsbell
Quick skim; someone more familiar with cache API should review. https://codereview.chromium.org/425413002/diff/1/LayoutTests/http/tests/serviceworker/resources/cache-batch-test-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-batch-test-worker.js (right): https://codereview.chromium.org/425413002/diff/1/LayoutTests/http/tests/serviceworker/resources/cache-batch-test-worker.js#newcode37 ...
6 years, 4 months ago (2014-08-01 00:02:25 UTC) #2
asanka
https://codereview.chromium.org/425413002/diff/1/LayoutTests/http/tests/serviceworker/resources/cache-batch-test-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-batch-test-worker.js (right): https://codereview.chromium.org/425413002/diff/1/LayoutTests/http/tests/serviceworker/resources/cache-batch-test-worker.js#newcode37 LayoutTests/http/tests/serviceworker/resources/cache-batch-test-worker.js:37: assert_true(e instanceof TypeError, On 2014/08/01 00:02:25, jsbell wrote: > ...
6 years, 4 months ago (2014-08-13 03:30:04 UTC) #3
jsbell
Note: this is dependent on the 'expect_promise_throws' function over in https://codereview.chromium.org/430993002/
6 years, 4 months ago (2014-08-15 19:09:50 UTC) #4
jsbell
looking pretty good. I'm worried about the churn in https://github.com/slightlyoff/ServiceWorker/issues/372 I haven't tried running this ...
6 years, 4 months ago (2014-08-15 20:49:35 UTC) #5
jsbell
Hrm... we don't typically name the workers <base>-test-worker.js, just <base>-worker.js fetch-event-test-worker.js is the only exception. ...
6 years, 4 months ago (2014-08-15 22:42:31 UTC) #6
asanka
I renamed the workers to be cache-foo-worker.js. https://codereview.chromium.org/425413002/diff/40001/LayoutTests/http/tests/serviceworker/resources/cache-add-test-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-add-test-worker.js (right): https://codereview.chromium.org/425413002/diff/40001/LayoutTests/http/tests/serviceworker/resources/cache-add-test-worker.js#newcode21 LayoutTests/http/tests/serviceworker/resources/cache-add-test-worker.js:21: .then(t.step_func(function(result) { ...
6 years, 4 months ago (2014-08-20 03:11:59 UTC) #7
jsbell
lgtm, with just a few nits https://codereview.chromium.org/425413002/diff/40001/LayoutTests/http/tests/serviceworker/resources/cache-add-test-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-add-test-worker.js (right): https://codereview.chromium.org/425413002/diff/40001/LayoutTests/http/tests/serviceworker/resources/cache-add-test-worker.js#newcode117 LayoutTests/http/tests/serviceworker/resources/cache-add-test-worker.js:117: function absolute_url(url) { ...
6 years, 4 months ago (2014-08-20 18:18:09 UTC) #8
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:15 UTC) #9
asanka
Thanks! This is waiting on https://codereview.chromium.org/430993002/. In the meantime I added a few tests that ...
6 years, 4 months ago (2014-08-20 21:24:58 UTC) #10
jsbell
BTW, since the C++ Cache constructor is not implemented yet, converting the interfaces-worker.js usage over ...
6 years, 4 months ago (2014-08-21 18:31:47 UTC) #11
asanka
On 2014/08/21 18:31:47, jsbell wrote: > BTW, since the C++ Cache constructor is not implemented ...
6 years, 4 months ago (2014-08-21 21:51:20 UTC) #12
asanka
jkarlin: Here are the tests for Cache. Can you run them and check how they ...
6 years, 2 months ago (2014-09-29 19:19:57 UTC) #14
jkarlin
Everything but the first test in each fails right now. You can patch in https://codereview.chromium.org/580063003/ ...
6 years, 2 months ago (2014-09-30 11:31:34 UTC) #15
asanka
On 2014/09/30 11:31:34, jkarlin wrote: > Everything but the first test in each fails right ...
6 years, 2 months ago (2014-09-30 20:36:04 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/425413002/200001
6 years, 2 months ago (2014-09-30 22:42:11 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/29599)
6 years, 2 months ago (2014-10-01 00:16:44 UTC) #20
asanka
On 2014/10/01 00:16:44, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 2 months ago (2014-10-01 03:13:12 UTC) #21
jkarlin
https://codereview.chromium.org/425413002/diff/200001/LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js (right): https://codereview.chromium.org/425413002/diff/200001/LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js#newcode23 LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js:23: assert_equals(result, assert_equals does a === comparison which will fail ...
6 years, 2 months ago (2014-10-03 15:10:52 UTC) #22
asanka
Could you take another look? I had to make some substantial changes. https://codereview.chromium.org/425413002/diff/200001/LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js ...
6 years, 2 months ago (2014-10-15 23:43:49 UTC) #24
asanka
Updated to use CacheStorage.open. I can haz review?
6 years, 2 months ago (2014-10-17 20:30:28 UTC) #25
jsbell
overall lgtm, a few nits/suggestions. https://codereview.chromium.org/425413002/diff/260001/LayoutTests/http/tests/resources/testharness-helpers.js File LayoutTests/http/tests/resources/testharness-helpers.js (right): https://codereview.chromium.org/425413002/diff/260001/LayoutTests/http/tests/resources/testharness-helpers.js#newcode18 LayoutTests/http/tests/resources/testharness-helpers.js:18: // only need to ...
6 years, 2 months ago (2014-10-20 18:20:41 UTC) #26
asanka
https://codereview.chromium.org/425413002/diff/260001/LayoutTests/http/tests/resources/testharness-helpers.js File LayoutTests/http/tests/resources/testharness-helpers.js (right): https://codereview.chromium.org/425413002/diff/260001/LayoutTests/http/tests/resources/testharness-helpers.js#newcode18 LayoutTests/http/tests/resources/testharness-helpers.js:18: // only need to be wrapped in test.step()s if ...
6 years, 2 months ago (2014-10-22 22:35:32 UTC) #28
jsbell
https://codereview.chromium.org/425413002/diff/260001/LayoutTests/http/tests/serviceworker/resources/cache-add-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-add-worker.js (right): https://codereview.chromium.org/425413002/diff/260001/LayoutTests/http/tests/serviceworker/resources/cache-add-worker.js#newcode8 LayoutTests/http/tests/serviceworker/resources/cache-add-worker.js:8: cache.add(''), On 2014/10/22 22:35:31, asanka wrote: > On 2014/10/20 ...
6 years, 2 months ago (2014-10-22 23:54:44 UTC) #29
jsbell
lgtm! https://codereview.chromium.org/425413002/diff/300001/LayoutTests/http/tests/serviceworker/cache-add-expected.txt File LayoutTests/http/tests/serviceworker/cache-add-expected.txt (right): https://codereview.chromium.org/425413002/diff/300001/LayoutTests/http/tests/serviceworker/cache-add-expected.txt#newcode3 LayoutTests/http/tests/serviceworker/cache-add-expected.txt:3: FAIL Cache.add with no arguments Failed to execute ...
6 years, 2 months ago (2014-10-23 00:15:31 UTC) #30
jsbell
https://codereview.chromium.org/425413002/diff/300001/LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js (right): https://codereview.chromium.org/425413002/diff/300001/LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js#newcode122 LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js:122: // crash is resolved. http://crbug.com/426153 On 2014/10/23 00:15:31, jsbell ...
6 years, 2 months ago (2014-10-23 00:23:51 UTC) #31
jsbell
Sorry for the churn, just want to make sure everything is documented. https://codereview.chromium.org/425413002/diff/300001/LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js ...
6 years, 2 months ago (2014-10-23 00:30:32 UTC) #32
jsbell
https://codereview.chromium.org/425413002/diff/300001/LayoutTests/http/tests/serviceworker/resources/cache-add-worker.js File LayoutTests/http/tests/serviceworker/resources/cache-add-worker.js (right): https://codereview.chromium.org/425413002/diff/300001/LayoutTests/http/tests/serviceworker/resources/cache-add-worker.js#newcode5 LayoutTests/http/tests/serviceworker/resources/cache-add-worker.js:5: return assert_promise_rejects( Ah, the bindings code has a known ...
6 years, 2 months ago (2014-10-23 00:39:24 UTC) #33
asanka
On 2014/10/22 23:54:44, jsbell wrote: > https://codereview.chromium.org/425413002/diff/260001/LayoutTests/http/tests/serviceworker/resources/cache-add-worker.js > File LayoutTests/http/tests/serviceworker/resources/cache-add-worker.js (right): > > https://codereview.chromium.org/425413002/diff/260001/LayoutTests/http/tests/serviceworker/resources/cache-add-worker.js#newcode8 > ...
6 years, 2 months ago (2014-10-23 04:45:46 UTC) #34
asanka
https://codereview.chromium.org/425413002/diff/300001/LayoutTests/http/tests/serviceworker/cache-add-expected.txt File LayoutTests/http/tests/serviceworker/cache-add-expected.txt (right): https://codereview.chromium.org/425413002/diff/300001/LayoutTests/http/tests/serviceworker/cache-add-expected.txt#newcode3 LayoutTests/http/tests/serviceworker/cache-add-expected.txt:3: FAIL Cache.add with no arguments Failed to execute 'add' ...
6 years, 2 months ago (2014-10-23 06:12:39 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/425413002/320001
6 years, 2 months ago (2014-10-23 06:40:08 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/67062)
6 years, 2 months ago (2014-10-23 07:11:44 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/425413002/320001
6 years, 2 months ago (2014-10-23 07:14:18 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/67062)
6 years, 2 months ago (2014-10-23 07:17:38 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/425413002/320001
6 years, 2 months ago (2014-10-23 08:31:27 UTC) #45
commit-bot: I haz the power
6 years, 2 months ago (2014-10-23 08:32:25 UTC) #46
Message was sent while issue was closed.
Committed patchset #15 (id:320001) as 184242

Powered by Google App Engine
This is Rietveld 408576698