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

Unified Diff: third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp

Issue 2613743002: Clip related property and border radius are now recorded for UMA (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp b/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
index 10551bdfd3adc7563b3cdbd6931c2252f6f189b5..af4a31244d541a1848f6cfbfcfa09888e32cbd33 100644
--- a/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
+++ b/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
@@ -1078,10 +1078,13 @@ class StyleRelatedMainThreadScrollingReasonTest
ASSERT_TRUE(frameView->mainThreadScrollingReasons() & reason);
- webViewImpl()->settings()->setPreferCompositingToLCDTextEnabled(true);
- forceFullCompositingUpdate();
-
- ASSERT_FALSE(frameView->mainThreadScrollingReasons());
+ if (reason & (MainThreadScrollingReason::kHasOpacity |
+ MainThreadScrollingReason::kHasTransform |
+ MainThreadScrollingReason::kBackgroundNotOpaqueInRect)) {
bokan 2017/01/05 14:05:48 You should also check that there aren't any of the
yigu 2017/01/05 14:46:51 Done.
+ webViewImpl()->settings()->setPreferCompositingToLCDTextEnabled(true);
+ forceFullCompositingUpdate();
+ ASSERT_FALSE(frameView->mainThreadScrollingReasons());
+ }
}
};
@@ -1098,4 +1101,16 @@ TEST_F(StyleRelatedMainThreadScrollingReasonTest, BackgroundNotOpaqueTest) {
MainThreadScrollingReason::kBackgroundNotOpaqueInRect);
}
+TEST_F(StyleRelatedMainThreadScrollingReasonTest, BorderRadiusTest) {
+ testStyle("border-radius", MainThreadScrollingReason::kHasBorderRadius);
+}
+
+TEST_F(StyleRelatedMainThreadScrollingReasonTest, ClipTest) {
+ testStyle("clip", MainThreadScrollingReason::kHasClipRelatedProperty);
+}
+
+TEST_F(StyleRelatedMainThreadScrollingReasonTest, ClipPathTest) {
+ testStyle("clip-path", MainThreadScrollingReason::kHasClipRelatedProperty);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698