https://bugs.webkit.org/show_bug.cgi?id=66244 should have a corresponding TestWebKitAPI test. Patch forthcoming.
Created attachment 106057 [details] Patch
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.
I removed goForward and added comments to both implementations of initializeWebView, and I committed the test with revision 94437. Thanks Adam!!!