diff options
author | baxley <baxley@chromium.org> | 2015-08-10 16:10:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-10 23:10:56 +0000 |
commit | f696ec5607f260d82a67604d519a93e043cd1a76 (patch) | |
tree | f1657a271f8ce0754d5a40f0aa40b436d95c7493 /ios | |
parent | 7cd4b784ffd31856b32ada4efd2265a4989fd575 (diff) | |
download | chromium_src-f696ec5607f260d82a67604d519a93e043cd1a76.zip chromium_src-f696ec5607f260d82a67604d519a93e043cd1a76.tar.gz chromium_src-f696ec5607f260d82a67604d519a93e043cd1a76.tar.bz2 |
Set minimum_zoom_scale for PageScrollState tests.
For WKWebView on iOS9 minimum_zoom_scale is 0.25, but on
UIWebView and WKWebView pre-iOS9, it was set to 1. This change
explicitly sets the minimum_zoom_scale for the tests.
BUG=517936
Review URL: https://codereview.chromium.org/1277223003
Cr-Commit-Position: refs/heads/master@{#342726}
Diffstat (limited to 'ios')
-rw-r--r-- | ios/web/web_state/ui/crw_web_controller_unittest.mm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ios/web/web_state/ui/crw_web_controller_unittest.mm b/ios/web/web_state/ui/crw_web_controller_unittest.mm index 7061196..001fb35 100644 --- a/ios/web/web_state/ui/crw_web_controller_unittest.mm +++ b/ios/web/web_state/ui/crw_web_controller_unittest.mm @@ -261,15 +261,15 @@ NSString* GetHTMLForZoomState(const web::PageZoomState& zoom_state, PageScalabilityType scalability_type) { NSString* const kHTMLFormat = @"<html><head><meta name='viewport' content=" - "'width=%f,maximum-scale=%f,initial-scale=%f," + "'width=%f,minimum-scale=%f,maximum-scale=%f,initial-scale=%f," "user-scalable=%@'/></head><body>Test</body></html>"; CGFloat width = CGRectGetWidth([UIScreen mainScreen].bounds) / zoom_state.minimum_zoom_scale(); BOOL scalability_enabled = scalability_type == PAGE_SCALABILITY_ENABLED; - return [NSString stringWithFormat:kHTMLFormat, width, - zoom_state.maximum_zoom_scale(), - zoom_state.zoom_scale(), - scalability_enabled ? @"yes" : @"no"]; + return [NSString + stringWithFormat:kHTMLFormat, width, zoom_state.minimum_zoom_scale(), + zoom_state.maximum_zoom_scale(), zoom_state.zoom_scale(), + scalability_enabled ? @"yes" : @"no"]; } // Forces |webController|'s view to render and waits until |webController|'s |