RESOLVED FIXED 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
Summary Add a test for going back to a cached page after changing the device scale fa...
Beth Dakin
Reported 2011-09-01 16:07:25 PDT
https://bugs.webkit.org/show_bug.cgi?id=66244 should have a corresponding TestWebKitAPI test. Patch forthcoming.
Attachments
Patch (13.22 KB, patch)
2011-09-01 16:15 PDT, Beth Dakin
aroben: review+
Beth Dakin
Comment 1 2011-09-01 16:15:38 PDT
Adam Roben (:aroben)
Comment 2 2011-09-02 05:44:42 PDT
Comment on attachment 106057 [details] Patch 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.
Beth Dakin
Comment 3 2011-09-02 11:54:44 PDT
I removed goForward and added comments to both implementations of initializeWebView, and I committed the test with revision 94437. Thanks Adam!!!
Note You need to log in before you can comment on or make changes to this bug.