[webkit-dev] DRT/WTR should clear the cache at the beginning of each test?
fischman at chromium.org
Sat Oct 27 22:16:19 PDT 2012
On Sat, Oct 27, 2012 at 9:08 PM, Alexey Proskuryakov <ap at webkit.org> wrote:
> But visiting site A is not expected to affect behavior on site B, even
> though cache state was affected by site A.
is a counter-example (and is backed up the
or it would be if it didn't contain the new Date() + Math.random()
We can live in one of two worlds:
1) LayoutTests that concern themselves with specific network/loading
concerns need to use unique URLs to refer to static data; or
2) DRT clears JS-visible state between tests.
The pros/cons seem clear to me:
Pro#1: loading/caching code is coincidentally tested by (unknown) tests
that reuse URLs among themselves.
Con#1: requires additional cognitive load for all webkit developers; the
only way to write a test that won't be affected by future addition of
unrelated tests is to use unique URLs
Pro#2: principle of least-surprise is maintained; understanding DRT &
reading a test (and not every other test) is enough to understand its
Con#2: loading/caching code needs to be tested explicitly.
IMO (Pro#2 + -Con#1) >> (Pro#1 + -Con#2).
Are you saying you believe the inequality goes a different way, or am I
missing some other feature of your thesis?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev