| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 4105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4116 EXPECT_TRUE(page->suspended()); | 4116 EXPECT_TRUE(page->suspended()); |
| 4117 } | 4117 } |
| 4118 } | 4118 } |
| 4119 | 4119 |
| 4120 TEST_P(WebViewTest, ForceAndResetViewport) { | 4120 TEST_P(WebViewTest, ForceAndResetViewport) { |
| 4121 registerMockedHttpURLLoad("200-by-300.html"); | 4121 registerMockedHttpURLLoad("200-by-300.html"); |
| 4122 WebViewImpl* webViewImpl = | 4122 WebViewImpl* webViewImpl = |
| 4123 m_webViewHelper.initializeAndLoad(m_baseURL + "200-by-300.html"); | 4123 m_webViewHelper.initializeAndLoad(m_baseURL + "200-by-300.html"); |
| 4124 webViewImpl->resize(WebSize(100, 150)); | 4124 webViewImpl->resize(WebSize(100, 150)); |
| 4125 webViewImpl->layerTreeView()->setViewportSize(WebSize(100, 150)); | 4125 webViewImpl->layerTreeView()->setViewportSize(WebSize(100, 150)); |
| 4126 VisualViewport* visualViewport = | 4126 VisualViewport* visualViewport = &webViewImpl->page()->visualViewport(); |
| 4127 &webViewImpl->page()->frameHost().visualViewport(); | |
| 4128 DevToolsEmulator* devToolsEmulator = webViewImpl->devToolsEmulator(); | 4127 DevToolsEmulator* devToolsEmulator = webViewImpl->devToolsEmulator(); |
| 4129 | 4128 |
| 4130 TransformationMatrix expectedMatrix; | 4129 TransformationMatrix expectedMatrix; |
| 4131 expectedMatrix.makeIdentity(); | 4130 expectedMatrix.makeIdentity(); |
| 4132 EXPECT_EQ(expectedMatrix, | 4131 EXPECT_EQ(expectedMatrix, |
| 4133 webViewImpl->getDeviceEmulationTransformForTesting()); | 4132 webViewImpl->getDeviceEmulationTransformForTesting()); |
| 4134 EXPECT_FALSE(devToolsEmulator->visibleContentRectForPainting()); | 4133 EXPECT_FALSE(devToolsEmulator->visibleContentRectForPainting()); |
| 4135 EXPECT_TRUE(visualViewport->containerLayer()->masksToBounds()); | 4134 EXPECT_TRUE(visualViewport->containerLayer()->masksToBounds()); |
| 4136 | 4135 |
| 4137 // Override applies transform, sets visibleContentRect, and disables | 4136 // Override applies transform, sets visibleContentRect, and disables |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4412 EXPECT_FALSE(frameView->visualViewportSuppliesScrollbars()); | 4411 EXPECT_FALSE(frameView->visualViewportSuppliesScrollbars()); |
| 4413 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 4412 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 4414 EXPECT_NE(nullptr, | 4413 EXPECT_NE(nullptr, |
| 4415 frameView->layoutViewportScrollableArea()->verticalScrollbar()); | 4414 frameView->layoutViewportScrollableArea()->verticalScrollbar()); |
| 4416 } else { | 4415 } else { |
| 4417 EXPECT_NE(nullptr, frameView->verticalScrollbar()); | 4416 EXPECT_NE(nullptr, frameView->verticalScrollbar()); |
| 4418 } | 4417 } |
| 4419 } | 4418 } |
| 4420 | 4419 |
| 4421 } // namespace blink | 4420 } // namespace blink |
| OLD | NEW |