| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 Element* element = document->getElementById("span-br"); | 241 Element* element = document->getElementById("span-br"); |
| 242 ASSERT_TRUE(element); | 242 ASSERT_TRUE(element); |
| 243 WebLayer* layer = webLayerFromElement(element); | 243 WebLayer* layer = webLayerFromElement(element); |
| 244 ASSERT_TRUE(layer); | 244 ASSERT_TRUE(layer); |
| 245 WebLayerPositionConstraint constraint = layer->positionConstraint(); | 245 WebLayerPositionConstraint constraint = layer->positionConstraint(); |
| 246 ASSERT_TRUE(constraint.isFixedPosition); | 246 ASSERT_TRUE(constraint.isFixedPosition); |
| 247 ASSERT_TRUE(constraint.isFixedToRightEdge && constraint.isFixedToBottomE
dge); | 247 ASSERT_TRUE(constraint.isFixedToRightEdge && constraint.isFixedToBottomE
dge); |
| 248 } | 248 } |
| 249 } | 249 } |
| 250 | 250 |
| 251 TEST_F(ScrollingCoordinatorChromiumTest, nonFastScrollableRegion) | |
| 252 { | |
| 253 registerMockedHttpURLLoad("non-fast-scrollable.html"); | |
| 254 navigateTo(m_baseURL + "non-fast-scrollable.html"); | |
| 255 forceFullCompositingUpdate(); | |
| 256 | |
| 257 WebLayer* rootScrollLayer = getRootScrollLayer(); | |
| 258 WebVector<WebRect> nonFastScrollableRegion = rootScrollLayer->nonFastScrolla
bleRegion(); | |
| 259 | |
| 260 ASSERT_EQ(1u, nonFastScrollableRegion.size()); | |
| 261 ASSERT_EQ(WebRect(8, 8, 10, 10), nonFastScrollableRegion[0]); | |
| 262 } | |
| 263 | |
| 264 TEST_F(ScrollingCoordinatorChromiumTest, wheelEventHandler) | 251 TEST_F(ScrollingCoordinatorChromiumTest, wheelEventHandler) |
| 265 { | 252 { |
| 266 registerMockedHttpURLLoad("wheel-event-handler.html"); | 253 registerMockedHttpURLLoad("wheel-event-handler.html"); |
| 267 navigateTo(m_baseURL + "wheel-event-handler.html"); | 254 navigateTo(m_baseURL + "wheel-event-handler.html"); |
| 268 forceFullCompositingUpdate(); | 255 forceFullCompositingUpdate(); |
| 269 | 256 |
| 270 WebLayer* rootScrollLayer = getRootScrollLayer(); | 257 WebLayer* rootScrollLayer = getRootScrollLayer(); |
| 271 ASSERT_TRUE(rootScrollLayer->haveWheelEventHandlers()); | 258 ASSERT_TRUE(rootScrollLayer->haveWheelEventHandlers()); |
| 272 } | 259 } |
| 273 | 260 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 TEST_F(ScrollingCoordinatorChromiumTest, setupScrollbarLayerShouldNotCrash) | 449 TEST_F(ScrollingCoordinatorChromiumTest, setupScrollbarLayerShouldNotCrash) |
| 463 { | 450 { |
| 464 registerMockedHttpURLLoad("setup_scrollbar_layer_crash.html"); | 451 registerMockedHttpURLLoad("setup_scrollbar_layer_crash.html"); |
| 465 navigateTo(m_baseURL + "setup_scrollbar_layer_crash.html"); | 452 navigateTo(m_baseURL + "setup_scrollbar_layer_crash.html"); |
| 466 forceFullCompositingUpdate(); | 453 forceFullCompositingUpdate(); |
| 467 // This test document setup an iframe with scrollbars, then switch to | 454 // This test document setup an iframe with scrollbars, then switch to |
| 468 // an empty document by javascript. | 455 // an empty document by javascript. |
| 469 } | 456 } |
| 470 | 457 |
| 471 } // namespace | 458 } // namespace |
| OLD | NEW |