Closed
Bug 1110493
(cachetests)
Opened 10 years ago
Closed 10 years ago
improve Service Worker Cache tests
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: bkelly, Assigned: ehsan.akhgari)
References
Details
On maple we currently have only very basic tests of the Service Worker Cache. All the methods are used, but not all the corner cases are hit. These tests need to be fleshed out before we can enable the feature by default.
Reporter | ||
Comment 1•10 years ago
|
||
As part of this, verify that UTF-16 characters can be used in cache names, etc.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → ehsan
Reporter | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Reporter | ||
Comment 2•10 years ago
|
||
See bug 1142333 comment 2 and bug 1142333 comment 3 for more things that need to be tested.
Assignee | ||
Updated•10 years ago
|
Alias: cachetests
Assignee | ||
Comment 3•10 years ago
|
||
(In reply to Ben Kelly [:bkelly] from comment #2)
> See bug 1142333 comment 2 and bug 1142333 comment 3 for more things that
> need to be tested.
I think I've covered everything on this list with my latest patches. If something is missing, please let me know!
Assignee | ||
Comment 4•10 years ago
|
||
Ben, with bug 1147184, I've run out of ideas on what else needs to be tested. If you can think of others, please let me know. Otherwise I think we can call this done.
Flags: needinfo?(bkelly)
Reporter | ||
Comment 5•10 years ago
|
||
Thanks for the awesome work Ehsan!
The only thing I can think of is to try to force some corner cases. Things like using the Cache after its deleted, etc. I think we do some of that already. Another one I can think of is:
1) Open cache 'foo'
2) Put a response with a long body in the Cache
3) Match the response back out of the Cache
4) caches.delete('foo')
5) drop ref to the Cache object and force GC
6) Call response.text() to see if we can still read the stream
Also, now that we're pref'd on we could do wpt tests. :-)
I'm also ok just declaring this closed now. I think we have pretty good coverage.
Flags: needinfo?(bkelly)
Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Ben Kelly [:bkelly] from comment #5)
> Thanks for the awesome work Ehsan!
>
> The only thing I can think of is to try to force some corner cases. Things
> like using the Cache after its deleted, etc
This should be tested already.
> I think we do some of that
> already. Another one I can think of is:
>
> 1) Open cache 'foo'
> 2) Put a response with a long body in the Cache
> 3) Match the response back out of the Cache
> 4) caches.delete('foo')
> 5) drop ref to the Cache object and force GC
> 6) Call response.text() to see if we can still read the stream
We do test something along these lines in test_cache_match/matchAll_request.js. Unfortunately SpecialPowers is unavailable on workers so we can't force a GC there. But if you want I can do that ony on the main thread.
> Also, now that we're pref'd on we could do wpt tests. :-)
Yeah, I think jgraham is working on that. But we can't check those tests in until we're preffed on for release, otherwise an uplift into beta will turn the tests orange.
> I'm also ok just declaring this closed now. I think we have pretty good
> coverage.
Let's do that, since this bug has served its tracking purpose now. :)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•