Bug 142848 - Test disk cache behavior when using back navigation cache policy
Summary: Test disk cache behavior when using back navigation cache policy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 142831
  Show dependency treegraph
 
Reported: 2015-03-18 17:04 PDT by Antti Koivisto
Modified: 2015-03-18 22:22 PDT (History)
3 users (show)

See Also:


Attachments
patch (13.85 KB, patch)
2015-03-18 17:12 PDT, Antti Koivisto
cdumez: review+
cdumez: commit-queue-
Details | Formatted Diff | Diff
patch (15.15 KB, patch)
2015-03-18 18:00 PDT, Antti Koivisto
cdumez: review+
cdumez: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2015-03-18 17:04:41 PDT
Add testing support and a test matrix.
Comment 1 Antti Koivisto 2015-03-18 17:12:53 PDT
Created attachment 248990 [details]
patch
Comment 2 Chris Dumez 2015-03-18 17:21:12 PDT
Comment on attachment 248990 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=248990&action=review

> Source/WebCore/testing/Internals.idl:49
> +    void setOverrideCachePolicy(unsigned short policy);

Would make the tests more readable if we used an IDL enum argument (or at least add static constants on Internals).
Comment 3 Antti Koivisto 2015-03-18 18:00:04 PDT
Created attachment 248997 [details]
patch
Comment 4 Chris Dumez 2015-03-18 18:36:59 PDT
Comment on attachment 248997 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=248997&action=review

Still LGTM.

> LayoutTests/http/tests/cache/disk-cache-validation.html:-42
> -runTests(generateTests(testMatrix));

Not strictly related but OK.
Comment 5 Chris Dumez 2015-03-18 20:08:58 PDT
Antti, it looks like http/tests/cache/disk-cache-validation.html and http/tests/cache/disk-cache-validation-back-navigation-policy.html may cause each other to be flaky. If I run each test on their own, they run fine.

However, if I run the whole http/ folder, http/tests/cache/disk-cache-validation.html is flaky with the following diff:
http://pastebin.com/1n2spiVB
Comment 6 Chris Dumez 2015-03-18 20:12:59 PDT
Comment on attachment 248997 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=248997&action=review

> Source/WebCore/testing/Internals.cpp:442
> +void Internals::setOverrideCachePolicy(const String& policy)

You probably want to clear the override cache policy from Internals::resetToConsistentState() to avoid flakiness.
Comment 7 Antti Koivisto 2015-03-18 20:58:38 PDT
> You probably want to clear the override cache policy from
> Internals::resetToConsistentState() to avoid flakiness.

The field is in the FrameLoader which is per-document and doesn't affect any other tests. There shouldn't be need for this.
Comment 8 Chris Dumez 2015-03-18 21:44:51 PDT
(In reply to comment #7)
> > You probably want to clear the override cache policy from
> > Internals::resetToConsistentState() to avoid flakiness.
> 
> The field is in the FrameLoader which is per-document and doesn't affect any
> other tests. There shouldn't be need for this.

It seems to fix the flakiness for me locally though.
Comment 9 Antti Koivisto 2015-03-18 22:22:37 PDT
https://trac.webkit.org/r181728