| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 // all the way to the WebLayer. | 285 // all the way to the WebLayer. |
| 286 Element* scrollableElement = m_webViewImpl->mainFrameImpl()->frame()->docume
nt()->getElementById("scrollable"); | 286 Element* scrollableElement = m_webViewImpl->mainFrameImpl()->frame()->docume
nt()->getElementById("scrollable"); |
| 287 ASSERT(scrollableElement); | 287 ASSERT(scrollableElement); |
| 288 | 288 |
| 289 RenderObject* renderer = scrollableElement->renderer(); | 289 RenderObject* renderer = scrollableElement->renderer(); |
| 290 ASSERT_TRUE(renderer->isBoxModelObject()); | 290 ASSERT_TRUE(renderer->isBoxModelObject()); |
| 291 ASSERT_TRUE(renderer->hasLayer()); | 291 ASSERT_TRUE(renderer->hasLayer()); |
| 292 | 292 |
| 293 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer(); | 293 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer(); |
| 294 ASSERT_TRUE(layer->usesCompositedScrolling()); | 294 ASSERT_TRUE(layer->usesCompositedScrolling()); |
| 295 ASSERT_TRUE(layer->isComposited()); | 295 ASSERT_EQ(PaintsIntoOwnBacking, layer->compositingState()); |
| 296 | 296 |
| 297 CompositedLayerMapping* compositedLayerMapping = layer->compositedLayerMappi
ng(); | 297 CompositedLayerMapping* compositedLayerMapping = layer->compositedLayerMappi
ng(); |
| 298 ASSERT_TRUE(compositedLayerMapping->hasScrollingLayer()); | 298 ASSERT_TRUE(compositedLayerMapping->hasScrollingLayer()); |
| 299 ASSERT(compositedLayerMapping->scrollingContentsLayer()); | 299 ASSERT(compositedLayerMapping->scrollingContentsLayer()); |
| 300 | 300 |
| 301 GraphicsLayer* graphicsLayer = compositedLayerMapping->scrollingContentsLaye
r(); | 301 GraphicsLayer* graphicsLayer = compositedLayerMapping->scrollingContentsLaye
r(); |
| 302 ASSERT_EQ(layer->scrollableArea(), graphicsLayer->scrollableArea()); | 302 ASSERT_EQ(layer->scrollableArea(), graphicsLayer->scrollableArea()); |
| 303 | 303 |
| 304 WebLayer* webScrollLayer = compositedLayerMapping->scrollingContentsLayer()-
>platformLayer(); | 304 WebLayer* webScrollLayer = compositedLayerMapping->scrollingContentsLayer()-
>platformLayer(); |
| 305 ASSERT_TRUE(webScrollLayer->scrollable()); | 305 ASSERT_TRUE(webScrollLayer->scrollable()); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 | 397 |
| 398 TEST_F(ScrollingCoordinatorChromiumTest, setupScrollbarLayerShouldNotCrash) | 398 TEST_F(ScrollingCoordinatorChromiumTest, setupScrollbarLayerShouldNotCrash) |
| 399 { | 399 { |
| 400 registerMockedHttpURLLoad("setup_scrollbar_layer_crash.html"); | 400 registerMockedHttpURLLoad("setup_scrollbar_layer_crash.html"); |
| 401 navigateTo(m_baseURL + "setup_scrollbar_layer_crash.html"); | 401 navigateTo(m_baseURL + "setup_scrollbar_layer_crash.html"); |
| 402 // This test document setup an iframe with scrollbars, then switch to | 402 // This test document setup an iframe with scrollbars, then switch to |
| 403 // an empty document by javascript. | 403 // an empty document by javascript. |
| 404 } | 404 } |
| 405 | 405 |
| 406 } // namespace | 406 } // namespace |
| OLD | NEW |