Bug 13672 - DumpRenderTree needs to support the Back/Forward cache
Summary: DumpRenderTree needs to support the Back/Forward cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 523.x (Safari 3)
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-10 21:14 PDT by Brady Eidson
Modified: 2009-10-13 19:09 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2007-05-10 21:14:22 PDT
DRT needs to support the Back/Forward cache. 
Whatever reasons that it doesn't, it needs to now!

Once the support is in, there needs to be a slew of layout tests added for various recent and future enhancements to the cache including 
- Pages with password fields
- Pages with frames
- Pages with plugins
- etc.
Comment 1 Brady Eidson 2007-05-12 18:10:09 PDT
Another bug that needs this ability in DRT for a proper layout test is http://bugs.webkit.org/show_bug.cgi?id=13701

The reduced test case attached to that bug can be adapted for this purpose
Comment 2 Darin Adler 2007-07-17 08:33:30 PDT
Mitz found a way to do a layout test for bug 13701 without back/forward cache.
Comment 3 Cameron Zwarich (cpst) 2008-06-11 02:32:50 PDT
I turned the back/forward cache on in DumpRenderTree.mm, also adding

    [[webView backForwardList] init];

to resetWebViewToConsistentStateBeforeTesting() (otherwise you get over 1000 tests failing). Correct me if this is the wrong code to add. I had to turn off http/tests/navigation, because dumpBackForwardListForWebView() expects the previous test's back/forward items to be there as well, and asserts when they aren't. I didn't really want to sit through 60 or so tests crashing.

Besides that, I only got 5 new failures:

fast/css/target-fragment-match.html
fast/dom/location-hash.htm
fast/forms/button-state-restore.html
fast/frames/frame-navigation.html	
fast/history/go-back-to-changed-name.html

When I run fast/js on its own, I get one test expecting a GC to occur that doesn't. There are a few tests with new stderr output, and Apache had to be killed during one HTTP test, which is fishy. 

I will try to work out the reasons for the failures. Hopefully we can turn the back/forward cache on in DRT soon, and then we can write an interface to expose it to tests. Is there any reason we want it to always be off for some existing tests?
Comment 4 Brady Eidson 2008-06-11 09:19:50 PDT
I can't think of any right now, but it would be good to keep in mind that turning the back/forward cache off is sometimes a very real, preferable thing in real world WebKit apps so you may as well add it to DRT for possible future bugs + tests.

Great start!
Comment 5 Dmitry Titov 2008-12-11 18:56:51 PST
There is a landed change (bug 20534) that adds ability to override preferences, so one could use
layoutTestController.overridePreference("UsesPageCache", true);
to enable page cache for a particular test. One test using this is bug 22806. 
It could be a way to author the f/b + page cache tests until the enabling it permanently is understood well.
Comment 6 Dmitry Titov 2009-10-13 19:09:31 PDT
Since the patch for bug 20534 landed, there is support for Back/Forward cache. Resolving.