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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 324 |
325 ASSERT_EQ(WebEventListenerProperties::Passive, webLayerTreeView()->eventList
enerProperties(WebEventListenerClass::Touch)); | 325 ASSERT_EQ(WebEventListenerProperties::Passive, webLayerTreeView()->eventList
enerProperties(WebEventListenerClass::Touch)); |
326 } | 326 } |
327 | 327 |
328 TEST_F(ScrollingCoordinatorTest, touchEventHandlerBoth) | 328 TEST_F(ScrollingCoordinatorTest, touchEventHandlerBoth) |
329 { | 329 { |
330 registerMockedHttpURLLoad("touch-event-handler-both.html"); | 330 registerMockedHttpURLLoad("touch-event-handler-both.html"); |
331 navigateTo(m_baseURL + "touch-event-handler-both.html"); | 331 navigateTo(m_baseURL + "touch-event-handler-both.html"); |
332 forceFullCompositingUpdate(); | 332 forceFullCompositingUpdate(); |
333 | 333 |
334 ASSERT_EQ(WebEventListenerProperties::Blocking, webLayerTreeView()->eventLis
tenerProperties(WebEventListenerClass::Touch)); | 334 ASSERT_EQ(WebEventListenerProperties::BlockingAndPassive, webLayerTreeView()
->eventListenerProperties(WebEventListenerClass::Touch)); |
335 } | 335 } |
336 | 336 |
337 TEST_F(ScrollingCoordinatorTest, wheelEventHandler) | 337 TEST_F(ScrollingCoordinatorTest, wheelEventHandler) |
338 { | 338 { |
339 registerMockedHttpURLLoad("wheel-event-handler.html"); | 339 registerMockedHttpURLLoad("wheel-event-handler.html"); |
340 navigateTo(m_baseURL + "wheel-event-handler.html"); | 340 navigateTo(m_baseURL + "wheel-event-handler.html"); |
341 forceFullCompositingUpdate(); | 341 forceFullCompositingUpdate(); |
342 | 342 |
343 ASSERT_EQ(WebEventListenerProperties::Blocking, webLayerTreeView()->eventLis
tenerProperties(WebEventListenerClass::MouseWheel)); | 343 ASSERT_EQ(WebEventListenerProperties::Blocking, webLayerTreeView()->eventLis
tenerProperties(WebEventListenerClass::MouseWheel)); |
344 } | 344 } |
345 | 345 |
346 TEST_F(ScrollingCoordinatorTest, wheelEventHandlerPassive) | 346 TEST_F(ScrollingCoordinatorTest, wheelEventHandlerPassive) |
347 { | 347 { |
348 registerMockedHttpURLLoad("wheel-event-handler-passive.html"); | 348 registerMockedHttpURLLoad("wheel-event-handler-passive.html"); |
349 navigateTo(m_baseURL + "wheel-event-handler-passive.html"); | 349 navigateTo(m_baseURL + "wheel-event-handler-passive.html"); |
350 forceFullCompositingUpdate(); | 350 forceFullCompositingUpdate(); |
351 | 351 |
352 ASSERT_EQ(WebEventListenerProperties::Passive, webLayerTreeView()->eventList
enerProperties(WebEventListenerClass::MouseWheel)); | 352 ASSERT_EQ(WebEventListenerProperties::Passive, webLayerTreeView()->eventList
enerProperties(WebEventListenerClass::MouseWheel)); |
353 } | 353 } |
354 | 354 |
355 TEST_F(ScrollingCoordinatorTest, wheelEventHandlerBoth) | 355 TEST_F(ScrollingCoordinatorTest, wheelEventHandlerBoth) |
356 { | 356 { |
357 registerMockedHttpURLLoad("wheel-event-handler-both.html"); | 357 registerMockedHttpURLLoad("wheel-event-handler-both.html"); |
358 navigateTo(m_baseURL + "wheel-event-handler-both.html"); | 358 navigateTo(m_baseURL + "wheel-event-handler-both.html"); |
359 forceFullCompositingUpdate(); | 359 forceFullCompositingUpdate(); |
360 | 360 |
361 ASSERT_EQ(WebEventListenerProperties::Blocking, webLayerTreeView()->eventLis
tenerProperties(WebEventListenerClass::MouseWheel)); | 361 ASSERT_EQ(WebEventListenerProperties::BlockingAndPassive, webLayerTreeView()
->eventListenerProperties(WebEventListenerClass::MouseWheel)); |
362 } | 362 } |
363 | 363 |
364 TEST_F(ScrollingCoordinatorTest, scrollEventHandler) | 364 TEST_F(ScrollingCoordinatorTest, scrollEventHandler) |
365 { | 365 { |
366 registerMockedHttpURLLoad("scroll-event-handler.html"); | 366 registerMockedHttpURLLoad("scroll-event-handler.html"); |
367 navigateTo(m_baseURL + "scroll-event-handler.html"); | 367 navigateTo(m_baseURL + "scroll-event-handler.html"); |
368 forceFullCompositingUpdate(); | 368 forceFullCompositingUpdate(); |
369 | 369 |
370 ASSERT_TRUE(webLayerTreeView()->haveScrollEventHandlers()); | 370 ASSERT_TRUE(webLayerTreeView()->haveScrollEventHandlers()); |
371 } | 371 } |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 EXPECT_FALSE(scrollLayer->shouldScrollOnMainThread()); | 643 EXPECT_FALSE(scrollLayer->shouldScrollOnMainThread()); |
644 | 644 |
645 fixedPos->setInlineStyleProperty(CSSPropertyTransform, CSSValueNone); | 645 fixedPos->setInlineStyleProperty(CSSPropertyTransform, CSSValueNone); |
646 forceFullCompositingUpdate(); | 646 forceFullCompositingUpdate(); |
647 | 647 |
648 EXPECT_FALSE(static_cast<LayoutBoxModelObject*>(fixedPos->layoutObject())->l
ayer()->hasCompositedLayerMapping()); | 648 EXPECT_FALSE(static_cast<LayoutBoxModelObject*>(fixedPos->layoutObject())->l
ayer()->hasCompositedLayerMapping()); |
649 EXPECT_TRUE(scrollLayer->shouldScrollOnMainThread()); | 649 EXPECT_TRUE(scrollLayer->shouldScrollOnMainThread()); |
650 } | 650 } |
651 | 651 |
652 } // namespace blink | 652 } // namespace blink |
OLD | NEW |