| 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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 | 1022 |
| 1023 FixedLayoutTestWebViewClient client; | 1023 FixedLayoutTestWebViewClient client; |
| 1024 client.m_screenInfo.deviceScaleFactor = 2; | 1024 client.m_screenInfo.deviceScaleFactor = 2; |
| 1025 | 1025 |
| 1026 FrameTestHelpers::WebViewHelper webViewHelper(this); | 1026 FrameTestHelpers::WebViewHelper webViewHelper(this); |
| 1027 webViewHelper.initializeAndLoad(m_baseURL + "no_viewport_tag.html", true, 0,
&client, enableViewportSettings); | 1027 webViewHelper.initializeAndLoad(m_baseURL + "no_viewport_tag.html", true, 0,
&client, enableViewportSettings); |
| 1028 | 1028 |
| 1029 webViewHelper.webView()->resize(WebSize(viewportWidth, viewportHeight)); | 1029 webViewHelper.webView()->resize(WebSize(viewportWidth, viewportHeight)); |
| 1030 webViewHelper.webView()->updateAllLifecyclePhases(); | 1030 webViewHelper.webView()->updateAllLifecyclePhases(); |
| 1031 | 1031 |
| 1032 EXPECT_EQ(2, webViewHelper.webView()->deviceScaleFactor()); | 1032 EXPECT_EQ(2, webViewHelper.webViewImpl()->page()->deviceScaleFactor()); |
| 1033 | 1033 |
| 1034 // Device scale factor should be independent of page scale. | 1034 // Device scale factor should be independent of page scale. |
| 1035 webViewHelper.webView()->setDefaultPageScaleLimits(1, 2); | 1035 webViewHelper.webView()->setDefaultPageScaleLimits(1, 2); |
| 1036 webViewHelper.webView()->setPageScaleFactor(0.5); | 1036 webViewHelper.webView()->setPageScaleFactor(0.5); |
| 1037 webViewHelper.webView()->updateAllLifecyclePhases(); | 1037 webViewHelper.webView()->updateAllLifecyclePhases(); |
| 1038 EXPECT_EQ(1, webViewHelper.webView()->pageScaleFactor()); | 1038 EXPECT_EQ(1, webViewHelper.webView()->pageScaleFactor()); |
| 1039 | 1039 |
| 1040 // Force the layout to happen before leaving the test. | 1040 // Force the layout to happen before leaving the test. |
| 1041 webViewHelper.webView()->mainFrame()->contentAsText(1024).utf8(); | 1041 webViewHelper.webView()->mainFrame()->contentAsText(1024).utf8(); |
| 1042 } | 1042 } |
| (...skipping 7310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8353 | 8353 |
| 8354 TEST_F(WebFrameTest, CallbackOrdering) | 8354 TEST_F(WebFrameTest, CallbackOrdering) |
| 8355 { | 8355 { |
| 8356 registerMockedHttpURLLoad("foo.html"); | 8356 registerMockedHttpURLLoad("foo.html"); |
| 8357 FrameTestHelpers::WebViewHelper webViewHelper; | 8357 FrameTestHelpers::WebViewHelper webViewHelper; |
| 8358 CallbackOrderingWebFrameClient client; | 8358 CallbackOrderingWebFrameClient client; |
| 8359 webViewHelper.initializeAndLoad(m_baseURL + "foo.html", true, &client); | 8359 webViewHelper.initializeAndLoad(m_baseURL + "foo.html", true, &client); |
| 8360 } | 8360 } |
| 8361 | 8361 |
| 8362 } // namespace blink | 8362 } // namespace blink |
| OLD | NEW |