| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 switch (config) { | 285 switch (config) { |
| 286 case Default: | 286 case Default: |
| 287 *os << "Default"; | 287 *os << "Default"; |
| 288 break; | 288 break; |
| 289 case RootLayerScrolls: | 289 case RootLayerScrolls: |
| 290 *os << "RootLayerScrolls"; | 290 *os << "RootLayerScrolls"; |
| 291 break; | 291 break; |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 | 294 |
| 295 #if OS(MACOSX) && ENABLE(OILPAN) |
| 296 // FIXME(504655): RootLayerScrolls configuration crashes on Mac Oilpan bots. |
| 297 INSTANTIATE_TEST_CASE_P(All, ParameterizedWebFrameTest, ::testing::Values( |
| 298 ParameterizedWebFrameTestConfig::Default)); |
| 299 #else |
| 295 INSTANTIATE_TEST_CASE_P(All, ParameterizedWebFrameTest, ::testing::Values( | 300 INSTANTIATE_TEST_CASE_P(All, ParameterizedWebFrameTest, ::testing::Values( |
| 296 ParameterizedWebFrameTestConfig::Default, | 301 ParameterizedWebFrameTestConfig::Default, |
| 297 ParameterizedWebFrameTestConfig::RootLayerScrolls)); | 302 ParameterizedWebFrameTestConfig::RootLayerScrolls)); |
| 303 #endif |
| 298 | 304 |
| 299 TEST_P(ParameterizedWebFrameTest, ContentText) | 305 TEST_P(ParameterizedWebFrameTest, ContentText) |
| 300 { | 306 { |
| 301 registerMockedHttpURLLoad("iframes_test.html"); | 307 registerMockedHttpURLLoad("iframes_test.html"); |
| 302 registerMockedHttpURLLoad("visible_iframe.html"); | 308 registerMockedHttpURLLoad("visible_iframe.html"); |
| 303 registerMockedHttpURLLoad("invisible_iframe.html"); | 309 registerMockedHttpURLLoad("invisible_iframe.html"); |
| 304 registerMockedHttpURLLoad("zero_sized_iframe.html"); | 310 registerMockedHttpURLLoad("zero_sized_iframe.html"); |
| 305 | 311 |
| 306 FrameTestHelpers::WebViewHelper webViewHelper(this); | 312 FrameTestHelpers::WebViewHelper webViewHelper(this); |
| 307 webViewHelper.initializeAndLoad(m_baseURL + "iframes_test.html"); | 313 webViewHelper.initializeAndLoad(m_baseURL + "iframes_test.html"); |
| (...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2210 webViewHelper.webViewImpl()->resize(WebSize(viewportSize.width, view
portSize.height * 0.8f)); | 2216 webViewHelper.webViewImpl()->resize(WebSize(viewportSize.width, view
portSize.height * 0.8f)); |
| 2211 EXPECT_EQ(initialPageScaleFactor, webViewHelper.webViewImpl()->pageS
caleFactor()); | 2217 EXPECT_EQ(initialPageScaleFactor, webViewHelper.webViewImpl()->pageS
caleFactor()); |
| 2212 EXPECT_EQ(expectedScrollOffset, webViewHelper.webViewImpl()->mainFra
me()->scrollOffset()); | 2218 EXPECT_EQ(expectedScrollOffset, webViewHelper.webViewImpl()->mainFra
me()->scrollOffset()); |
| 2213 webViewHelper.webViewImpl()->resize(WebSize(viewportSize.width, view
portSize.height * 0.8f)); | 2219 webViewHelper.webViewImpl()->resize(WebSize(viewportSize.width, view
portSize.height * 0.8f)); |
| 2214 EXPECT_EQ(initialPageScaleFactor, webViewHelper.webViewImpl()->pageS
caleFactor()); | 2220 EXPECT_EQ(initialPageScaleFactor, webViewHelper.webViewImpl()->pageS
caleFactor()); |
| 2215 EXPECT_EQ(expectedScrollOffset, webViewHelper.webViewImpl()->mainFra
me()->scrollOffset()); | 2221 EXPECT_EQ(expectedScrollOffset, webViewHelper.webViewImpl()->mainFra
me()->scrollOffset()); |
| 2216 } | 2222 } |
| 2217 } | 2223 } |
| 2218 }; | 2224 }; |
| 2219 | 2225 |
| 2226 #if OS(MACOSX) && ENABLE(OILPAN) |
| 2227 // FIXME(504655): RootLayerScrolls configuration crashes on Mac Oilpan bots. |
| 2228 INSTANTIATE_TEST_CASE_P(All, WebFrameResizeTest, ::testing::Values( |
| 2229 ParameterizedWebFrameTestConfig::Default)); |
| 2230 #else |
| 2220 INSTANTIATE_TEST_CASE_P(All, WebFrameResizeTest, ::testing::Values( | 2231 INSTANTIATE_TEST_CASE_P(All, WebFrameResizeTest, ::testing::Values( |
| 2221 ParameterizedWebFrameTestConfig::Default, | 2232 ParameterizedWebFrameTestConfig::Default, |
| 2222 ParameterizedWebFrameTestConfig::RootLayerScrolls)); | 2233 ParameterizedWebFrameTestConfig::RootLayerScrolls)); |
| 2234 #endif |
| 2223 | 2235 |
| 2224 TEST_P(WebFrameResizeTest, ResizeYieldsCorrectScrollAndScaleForWidthEqualsDevice
Width) | 2236 TEST_P(WebFrameResizeTest, ResizeYieldsCorrectScrollAndScaleForWidthEqualsDevice
Width) |
| 2225 { | 2237 { |
| 2226 // With width=device-width, pageScaleFactor is preserved across resizes as | 2238 // With width=device-width, pageScaleFactor is preserved across resizes as |
| 2227 // long as the content adjusts according to the device-width. | 2239 // long as the content adjusts according to the device-width. |
| 2228 const char* url = "resize_scroll_mobile.html"; | 2240 const char* url = "resize_scroll_mobile.html"; |
| 2229 const float initialPageScaleFactor = 1; | 2241 const float initialPageScaleFactor = 1; |
| 2230 const WebSize scrollOffset(0, 50); | 2242 const WebSize scrollOffset(0, 50); |
| 2231 const WebSize viewportSize(120, 160); | 2243 const WebSize viewportSize(120, 160); |
| 2232 const bool shouldScaleRelativeToViewportWidth = true; | 2244 const bool shouldScaleRelativeToViewportWidth = true; |
| (...skipping 5610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7843 | 7855 |
| 7844 TEST_F(WebFrameTest, MaxFramesDetach) | 7856 TEST_F(WebFrameTest, MaxFramesDetach) |
| 7845 { | 7857 { |
| 7846 registerMockedHttpURLLoad("max-frames-detach.html"); | 7858 registerMockedHttpURLLoad("max-frames-detach.html"); |
| 7847 FrameTestHelpers::WebViewHelper webViewHelper; | 7859 FrameTestHelpers::WebViewHelper webViewHelper; |
| 7848 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "max-
frames-detach.html", true); | 7860 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "max-
frames-detach.html", true); |
| 7849 webViewImpl->mainFrameImpl()->collectGarbage(); | 7861 webViewImpl->mainFrameImpl()->collectGarbage(); |
| 7850 } | 7862 } |
| 7851 | 7863 |
| 7852 } // namespace blink | 7864 } // namespace blink |
| OLD | NEW |