Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp

Issue 2015783002: Invalidate touchEventTargetRects in ScrollingCoordinator when toggling touch emulation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 EXPECT_TRUE(static_cast<LayoutBoxModelObject*>(fixedPos->layoutObject())->la yer()->hasCompositedLayerMapping()); 623 EXPECT_TRUE(static_cast<LayoutBoxModelObject*>(fixedPos->layoutObject())->la yer()->hasCompositedLayerMapping());
624 EXPECT_FALSE(scrollLayer->shouldScrollOnMainThread()); 624 EXPECT_FALSE(scrollLayer->shouldScrollOnMainThread());
625 625
626 fixedPos->setInlineStyleProperty(CSSPropertyTransform, CSSValueNone); 626 fixedPos->setInlineStyleProperty(CSSPropertyTransform, CSSValueNone);
627 forceFullCompositingUpdate(); 627 forceFullCompositingUpdate();
628 628
629 EXPECT_FALSE(static_cast<LayoutBoxModelObject*>(fixedPos->layoutObject())->l ayer()->hasCompositedLayerMapping()); 629 EXPECT_FALSE(static_cast<LayoutBoxModelObject*>(fixedPos->layoutObject())->l ayer()->hasCompositedLayerMapping());
630 EXPECT_TRUE(scrollLayer->shouldScrollOnMainThread()); 630 EXPECT_TRUE(scrollLayer->shouldScrollOnMainThread());
631 } 631 }
632 632
633 TEST_F(ScrollingCoordinatorTest, TouchEventTargetRectsWithEmulatedTouch)
634 {
635 RuntimeEnabledFeatures::setTouchEnabled(false);
636
637 registerMockedHttpURLLoad("touch-event-target-rects.html");
638 navigateTo(m_baseURL + "touch-event-target-rects.html");
639 forceFullCompositingUpdate();
640 ScrollingCoordinator* coordinator = webViewImpl()->page()->scrollingCoordina tor();
641
642 EXPECT_EQ(0u, coordinator->touchEventTargetLayersCountForTest());
643 webViewImpl()->setTouchEventEmulationEnabled(true);
644 EXPECT_EQ(1u, coordinator->touchEventTargetLayersCountForTest());
645 webViewImpl()->setTouchEventEmulationEnabled(false);
646 EXPECT_EQ(0u, coordinator->touchEventTargetLayersCountForTest());
647 }
648
633 } // namespace blink 649 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/tests/data/touch-event-target-rects.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698