| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 314 |
| 315 ASSERT_TRUE(webLayerTreeView()->haveWheelEventHandlers()); | 315 ASSERT_TRUE(webLayerTreeView()->haveWheelEventHandlers()); |
| 316 } | 316 } |
| 317 | 317 |
| 318 TEST_F(ScrollingCoordinatorTest, scrollEventHandler) | 318 TEST_F(ScrollingCoordinatorTest, scrollEventHandler) |
| 319 { | 319 { |
| 320 registerMockedHttpURLLoad("scroll-event-handler.html"); | 320 registerMockedHttpURLLoad("scroll-event-handler.html"); |
| 321 navigateTo(m_baseURL + "scroll-event-handler.html"); | 321 navigateTo(m_baseURL + "scroll-event-handler.html"); |
| 322 forceFullCompositingUpdate(); | 322 forceFullCompositingUpdate(); |
| 323 | 323 |
| 324 WebLayer* rootScrollLayer = getRootScrollLayer(); | 324 ASSERT_TRUE(webLayerTreeView()->haveScrollEventHandlers()); |
| 325 ASSERT_TRUE(rootScrollLayer->haveScrollEventHandlers()); | |
| 326 } | 325 } |
| 327 | 326 |
| 328 TEST_F(ScrollingCoordinatorTest, updateEventHandlersDuringTeardown) | 327 TEST_F(ScrollingCoordinatorTest, updateEventHandlersDuringTeardown) |
| 329 { | 328 { |
| 330 registerMockedHttpURLLoad("scroll-event-handler-window.html"); | 329 registerMockedHttpURLLoad("scroll-event-handler-window.html"); |
| 331 navigateTo(m_baseURL + "scroll-event-handler-window.html"); | 330 navigateTo(m_baseURL + "scroll-event-handler-window.html"); |
| 332 forceFullCompositingUpdate(); | 331 forceFullCompositingUpdate(); |
| 333 | 332 |
| 334 // Simulate detaching the document from its DOM window. This should not | 333 // Simulate detaching the document from its DOM window. This should not |
| 335 // cause a crash when the WebViewImpl is closed by the test runner. | 334 // cause a crash when the WebViewImpl is closed by the test runner. |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 EXPECT_FALSE(scrollLayer->shouldScrollOnMainThread()); | 597 EXPECT_FALSE(scrollLayer->shouldScrollOnMainThread()); |
| 599 | 598 |
| 600 fixedPos->setInlineStyleProperty(CSSPropertyTransform, CSSValueNone); | 599 fixedPos->setInlineStyleProperty(CSSPropertyTransform, CSSValueNone); |
| 601 forceFullCompositingUpdate(); | 600 forceFullCompositingUpdate(); |
| 602 | 601 |
| 603 EXPECT_FALSE(static_cast<LayoutBoxModelObject*>(fixedPos->layoutObject())->l
ayer()->hasCompositedLayerMapping()); | 602 EXPECT_FALSE(static_cast<LayoutBoxModelObject*>(fixedPos->layoutObject())->l
ayer()->hasCompositedLayerMapping()); |
| 604 EXPECT_TRUE(scrollLayer->shouldScrollOnMainThread()); | 603 EXPECT_TRUE(scrollLayer->shouldScrollOnMainThread()); |
| 605 } | 604 } |
| 606 | 605 |
| 607 } // namespace blink | 606 } // namespace blink |
| OLD | NEW |