Bug 28324 - Add a test to verify that page cache can be enabled for a test
Summary: Add a test to verify that page cache can be enabled for a test
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dmitry Titov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-14 15:10 PDT by Dmitry Titov
Modified: 2009-08-14 18:24 PDT (History)
0 users

See Also:


Attachments
Proposed patch (5.05 KB, patch)
2009-08-14 15:25 PDT, Dmitry Titov
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Titov 2009-08-14 15:10:49 PDT
The test verifies that override setting that enables page cache works correctly. It navigates forward and then back and checks that onload is not fired again  but the timer continues firing.
Comment 1 Dmitry Titov 2009-08-14 15:25:15 PDT
Created attachment 34877 [details]
Proposed patch
Comment 2 Eric Seidel (no email) 2009-08-14 17:13:56 PDT
Comment on attachment 34877 [details]
Proposed patch

Yay for trailblazing!

The test makes sense to me.  I assume you've tested to make sure it fails with:
 30         layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
commented out.

I'm not sure we have a test to verify that onload would be sent twice w/ the page cache off.  That seems useful to test.

Eventually we'll want to make this sort of thing into a framework, so that it's easy to test page-cache bugs.  For example, we want to test what sort of things prevents a page from entering the cache.  Ideally that will eventually be as easy as making a single function call in a test with a little HTML passed to it. :)  But I dream...

LGTM assuming you've tested with the page cache off to make sure it fails.
Comment 3 Dmitry Titov 2009-08-14 18:24:08 PDT
Landed http://trac.webkit.org/changeset/47306

Eric, I think your points are very good. I've landed the test so it is out there and tests things, however I will think if I can create some simple 'helper script' which can make it easy to write a page cache test!