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
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
Mitz found a way to do a layout test for bug 13701 without back/forward cache.
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:
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?
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.
There is a landed change (bug 20534) that adds ability to override preferences, so one could use
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.
Since the patch for bug 20534 landed, there is support for Back/Forward cache. Resolving.