Chromium Code Reviews

Side by Side Diff: Source/web/tests/WebFrameTest.cpp

Issue 1215973002: Oilpan: improve ScrollableArea handling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove too conservative null check Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
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...)
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
300 INSTANTIATE_TEST_CASE_P(All, ParameterizedWebFrameTest, ::testing::Values( 295 INSTANTIATE_TEST_CASE_P(All, ParameterizedWebFrameTest, ::testing::Values(
301 ParameterizedWebFrameTestConfig::Default, 296 ParameterizedWebFrameTestConfig::Default,
302 ParameterizedWebFrameTestConfig::RootLayerScrolls)); 297 ParameterizedWebFrameTestConfig::RootLayerScrolls));
303 #endif
304 298
305 TEST_P(ParameterizedWebFrameTest, ContentText) 299 TEST_P(ParameterizedWebFrameTest, ContentText)
306 { 300 {
307 registerMockedHttpURLLoad("iframes_test.html"); 301 registerMockedHttpURLLoad("iframes_test.html");
308 registerMockedHttpURLLoad("visible_iframe.html"); 302 registerMockedHttpURLLoad("visible_iframe.html");
309 registerMockedHttpURLLoad("invisible_iframe.html"); 303 registerMockedHttpURLLoad("invisible_iframe.html");
310 registerMockedHttpURLLoad("zero_sized_iframe.html"); 304 registerMockedHttpURLLoad("zero_sized_iframe.html");
311 305
312 FrameTestHelpers::WebViewHelper webViewHelper(this); 306 FrameTestHelpers::WebViewHelper webViewHelper(this);
313 webViewHelper.initializeAndLoad(m_baseURL + "iframes_test.html"); 307 webViewHelper.initializeAndLoad(m_baseURL + "iframes_test.html");
(...skipping 1902 matching lines...)
2216 webViewHelper.webViewImpl()->resize(WebSize(viewportSize.width, view portSize.height * 0.8f)); 2210 webViewHelper.webViewImpl()->resize(WebSize(viewportSize.width, view portSize.height * 0.8f));
2217 EXPECT_EQ(initialPageScaleFactor, webViewHelper.webViewImpl()->pageS caleFactor()); 2211 EXPECT_EQ(initialPageScaleFactor, webViewHelper.webViewImpl()->pageS caleFactor());
2218 EXPECT_EQ(expectedScrollOffset, webViewHelper.webViewImpl()->mainFra me()->scrollOffset()); 2212 EXPECT_EQ(expectedScrollOffset, webViewHelper.webViewImpl()->mainFra me()->scrollOffset());
2219 webViewHelper.webViewImpl()->resize(WebSize(viewportSize.width, view portSize.height * 0.8f)); 2213 webViewHelper.webViewImpl()->resize(WebSize(viewportSize.width, view portSize.height * 0.8f));
2220 EXPECT_EQ(initialPageScaleFactor, webViewHelper.webViewImpl()->pageS caleFactor()); 2214 EXPECT_EQ(initialPageScaleFactor, webViewHelper.webViewImpl()->pageS caleFactor());
2221 EXPECT_EQ(expectedScrollOffset, webViewHelper.webViewImpl()->mainFra me()->scrollOffset()); 2215 EXPECT_EQ(expectedScrollOffset, webViewHelper.webViewImpl()->mainFra me()->scrollOffset());
2222 } 2216 }
2223 } 2217 }
2224 }; 2218 };
2225 2219
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
2231 INSTANTIATE_TEST_CASE_P(All, WebFrameResizeTest, ::testing::Values( 2220 INSTANTIATE_TEST_CASE_P(All, WebFrameResizeTest, ::testing::Values(
2232 ParameterizedWebFrameTestConfig::Default, 2221 ParameterizedWebFrameTestConfig::Default,
2233 ParameterizedWebFrameTestConfig::RootLayerScrolls)); 2222 ParameterizedWebFrameTestConfig::RootLayerScrolls));
2234 #endif
2235 2223
2236 TEST_P(WebFrameResizeTest, ResizeYieldsCorrectScrollAndScaleForWidthEqualsDevice Width) 2224 TEST_P(WebFrameResizeTest, ResizeYieldsCorrectScrollAndScaleForWidthEqualsDevice Width)
2237 { 2225 {
2238 // With width=device-width, pageScaleFactor is preserved across resizes as 2226 // With width=device-width, pageScaleFactor is preserved across resizes as
2239 // long as the content adjusts according to the device-width. 2227 // long as the content adjusts according to the device-width.
2240 const char* url = "resize_scroll_mobile.html"; 2228 const char* url = "resize_scroll_mobile.html";
2241 const float initialPageScaleFactor = 1; 2229 const float initialPageScaleFactor = 1;
2242 const WebSize scrollOffset(0, 50); 2230 const WebSize scrollOffset(0, 50);
2243 const WebSize viewportSize(120, 160); 2231 const WebSize viewportSize(120, 160);
2244 const bool shouldScaleRelativeToViewportWidth = true; 2232 const bool shouldScaleRelativeToViewportWidth = true;
(...skipping 5610 matching lines...)
7855 7843
7856 TEST_F(WebFrameTest, MaxFramesDetach) 7844 TEST_F(WebFrameTest, MaxFramesDetach)
7857 { 7845 {
7858 registerMockedHttpURLLoad("max-frames-detach.html"); 7846 registerMockedHttpURLLoad("max-frames-detach.html");
7859 FrameTestHelpers::WebViewHelper webViewHelper; 7847 FrameTestHelpers::WebViewHelper webViewHelper;
7860 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "max- frames-detach.html", true); 7848 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "max- frames-detach.html", true);
7861 webViewImpl->mainFrameImpl()->collectGarbage(); 7849 webViewImpl->mainFrameImpl()->collectGarbage();
7862 } 7850 }
7863 7851
7864 } // namespace blink 7852 } // namespace blink
OLDNEW
« Source/platform/scroll/Scrollbar.cpp ('K') | « Source/web/tests/ScrollAnimatorNoneTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine