[webkit-reviews] review granted: [Bug 67451] Add a test for going back to a cached page after changing the device scale factor : [Attachment 106057] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 2 05:44:41 PDT 2011


Adam Roben (:aroben) <aroben at apple.com> has granted Beth Dakin
<bdakin at apple.com>'s request for review:
Bug 67451: Add a test for going back to a cached page after changing the device
scale factor
https://bugs.webkit.org/show_bug.cgi?id=67451

Attachment 106057: Patch
https://bugs.webkit.org/attachment.cgi?id=106057&action=review

------- Additional Comments from Adam Roben (:aroben) <aroben at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=106057&action=review


Yay tests! (Bug 67150 is next!)

> Tools/ChangeLog:21
> +	   Added new functions to WebKitAgnosticTest to goBack and goForward.
Separated 
> +	   waitForLoadToFinish() into its own function (instead of being a part
of 
> +	   loadAndWaitUntilFinished()) so that it can be called from goBack and
goForward as 
> +	   well. Also added initializeView() so we can set the cache model.

Since you never use goForward, maybe we shouldn't add it?

> Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm:64
> +void DeviceScaleFactorOnBack::initializeView(WebView *view)
> +{
> +    [[view preferences] setCacheModel:WebCacheModelDocumentBrowser];
> +}
> +
> +void DeviceScaleFactorOnBack::initializeView(WKView *view)
> +{
> +    WKContextSetCacheModel(WKPageGetContext([view pageRef]),
kWKCacheModelDocumentBrowser);
> +}

It's probably worth adding a comment here explaining why we do this.


More information about the webkit-reviews mailing list