Bug 81945

Summary: fast/events/suspend-timers.html is failing in Mac WebKit2, even though LayoutTestController.overridePreference is implemented in WebKitTestRunner
Product: WebKit Reporter: mitz
Component: Tools / TestsAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: jer.noble, sam, slewis, webkit-bug-importer, webkit.review.bot, zalan
Priority: P2 Keywords: InRadar, LayoutTestFailure
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description mitz 2012-03-22 12:01:40 PDT
fast/events/suspend-timers.html is failing in Mac WebKit2, but passes in Safari. The test relies on enabling the page cache using layoutTestController.overridePreference('WebKitUsesPageCachePreferenceKey', 1). Even though this function is implemented in WebKitTestRunner, it may not be achieving the desired effect.
Comment 1 Radar WebKit Bug Importer 2012-03-22 12:02:04 PDT
<rdar://problem/11101498>
Comment 2 mitz 2012-03-22 12:04:49 PDT
Added the current incorrect results as Mac WebKit2 expected results in <http://trac.webkit.org/r111741>.
Comment 3 mitz 2012-03-22 14:08:39 PDT
The failing results are inconsistent, so I am going to skip the test in Mac WebKit2.
Comment 4 mitz 2012-03-22 14:11:34 PDT
Added to the Mac WebKit2 skip list in <http://trac.webkit.org/r111761>.
Comment 5 zalan 2012-04-14 05:21:47 PDT
Created attachment 137208 [details]
Patch
Comment 6 zalan 2012-04-14 05:24:44 PDT
Alternatively, CacheModel can be set to PrimaryWebBrowser, only when the PageCache's preference key is also set to enabled. Though, I believe it's better to run WebKitTestRunner with PrimaryWebBrowser setting instead of that DocumentViewer.
Comment 7 zalan 2012-04-14 05:25:57 PDT
*** Bug 81637 has been marked as a duplicate of this bug. ***
Comment 8 mitz 2012-04-14 09:52:47 PDT
Comment on attachment 137208 [details]
Patch

It looks like DumpRenderTree (on Mac, at least) uses WebCacheModelDocumentBrowser. Shouldn’t WebKitTestRunner use the same by default?
Comment 9 zalan 2012-04-14 10:18:44 PDT
(In reply to comment #8)
> (From update of attachment 137208 [details])
> It looks like DumpRenderTree (on Mac, at least) uses WebCacheModelDocumentBrowser. Shouldn’t WebKitTestRunner use the same by default?

The only reason I picked PrimaryWebBrowser was because it guarantees capacity > 0. However for compatibility reasons, i guess DocumentBrowser is a better pick.
Comment 10 zalan 2012-04-14 10:36:09 PDT
Created attachment 137213 [details]
Patch
Comment 11 WebKit Review Bot 2012-04-14 11:29:35 PDT
Comment on attachment 137213 [details]
Patch

Clearing flags on attachment: 137213

Committed r114206: <http://trac.webkit.org/changeset/114206>
Comment 12 WebKit Review Bot 2012-04-14 11:29:41 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Jer Noble 2012-04-17 16:02:11 PDT
This commit broke the LayoutTests/fast/harness/use-page-cache.html test on Lion and Snow Leopard.

See: http://build.webkit.org/results/Lion%20Debug%20(WebKit2%20Tests)/r114298%20(6058)/results.html
Comment 14 Jer Noble 2012-04-17 16:08:58 PDT
Filed <https://bugs.webkit.org/show_bug.cgi?id=84206> to track the test failure.