| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 FixedLayoutTestWebViewClient client; | 1213 FixedLayoutTestWebViewClient client; |
| 1214 client.m_screenInfo.deviceScaleFactor = 2; | 1214 client.m_screenInfo.deviceScaleFactor = 2; |
| 1215 | 1215 |
| 1216 FrameTestHelpers::WebViewHelper webViewHelper; | 1216 FrameTestHelpers::WebViewHelper webViewHelper; |
| 1217 webViewHelper.initializeAndLoad(m_baseURL + "no_viewport_tag.html", true, | 1217 webViewHelper.initializeAndLoad(m_baseURL + "no_viewport_tag.html", true, |
| 1218 nullptr, &client, nullptr, | 1218 nullptr, &client, nullptr, |
| 1219 enableViewportSettings); | 1219 enableViewportSettings); |
| 1220 | 1220 |
| 1221 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); | 1221 webViewHelper.resize(WebSize(viewportWidth, viewportHeight)); |
| 1222 | 1222 |
| 1223 EXPECT_EQ(2, webViewHelper.webView()->page()->deviceScaleFactor()); | 1223 EXPECT_EQ(2, webViewHelper.webView()->page()->deviceScaleFactorDeprecated()); |
| 1224 | 1224 |
| 1225 // Device scale factor should be independent of page scale. | 1225 // Device scale factor should be independent of page scale. |
| 1226 webViewHelper.webView()->setDefaultPageScaleLimits(1, 2); | 1226 webViewHelper.webView()->setDefaultPageScaleLimits(1, 2); |
| 1227 webViewHelper.webView()->setPageScaleFactor(0.5); | 1227 webViewHelper.webView()->setPageScaleFactor(0.5); |
| 1228 webViewHelper.webView()->updateAllLifecyclePhases(); | 1228 webViewHelper.webView()->updateAllLifecyclePhases(); |
| 1229 EXPECT_EQ(1, webViewHelper.webView()->pageScaleFactor()); | 1229 EXPECT_EQ(1, webViewHelper.webView()->pageScaleFactor()); |
| 1230 | 1230 |
| 1231 // Force the layout to happen before leaving the test. | 1231 // Force the layout to happen before leaving the test. |
| 1232 webViewHelper.webView()->updateAllLifecyclePhases(); | 1232 webViewHelper.webView()->updateAllLifecyclePhases(); |
| 1233 } | 1233 } |
| (...skipping 10128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11362 FrameTestHelpers::WebViewHelper openerHelper; | 11362 FrameTestHelpers::WebViewHelper openerHelper; |
| 11363 openerHelper.initialize(false, nullptr, &openerWebViewClient); | 11363 openerHelper.initialize(false, nullptr, &openerWebViewClient); |
| 11364 FrameTestHelpers::WebViewHelper helper; | 11364 FrameTestHelpers::WebViewHelper helper; |
| 11365 helper.initializeWithOpener(openerHelper.webView()->mainFrame()); | 11365 helper.initializeWithOpener(openerHelper.webView()->mainFrame()); |
| 11366 | 11366 |
| 11367 openerHelper.reset(); | 11367 openerHelper.reset(); |
| 11368 EXPECT_EQ(nullptr, helper.webView()->mainFrameImpl()->opener()); | 11368 EXPECT_EQ(nullptr, helper.webView()->mainFrameImpl()->opener()); |
| 11369 } | 11369 } |
| 11370 | 11370 |
| 11371 } // namespace blink | 11371 } // namespace blink |
| OLD | NEW |