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

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

Issue 2766893002: Remove logic about recording style related main thread scroll reasons (Closed)
Patch Set: Add TODO comment Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 forceFullCompositingUpdate(); 1097 forceFullCompositingUpdate();
1098 ASSERT_FALSE(frameView->mainThreadScrollingReasons()); 1098 ASSERT_FALSE(frameView->mainThreadScrollingReasons());
1099 } 1099 }
1100 } 1100 }
1101 }; 1101 };
1102 1102
1103 INSTANTIATE_TEST_CASE_P(All, 1103 INSTANTIATE_TEST_CASE_P(All,
1104 StyleRelatedMainThreadScrollingReasonTest, 1104 StyleRelatedMainThreadScrollingReasonTest,
1105 ::testing::Bool()); 1105 ::testing::Bool());
1106 1106
1107 TEST_P(StyleRelatedMainThreadScrollingReasonTest, TransparentTest) { 1107 // TODO(yigu): This test and all other style realted main thread scrolling
1108 // reason tests below have been disabled due to https://crbug.com/701355.
1109 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_TransparentTest) {
1108 testStyle("transparent", MainThreadScrollingReason::kHasOpacityAndLCDText); 1110 testStyle("transparent", MainThreadScrollingReason::kHasOpacityAndLCDText);
1109 } 1111 }
1110 1112
1111 TEST_P(StyleRelatedMainThreadScrollingReasonTest, TransformTest) { 1113 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_TransformTest) {
1112 testStyle("transform", MainThreadScrollingReason::kHasTransformAndLCDText); 1114 testStyle("transform", MainThreadScrollingReason::kHasTransformAndLCDText);
1113 } 1115 }
1114 1116
1115 TEST_P(StyleRelatedMainThreadScrollingReasonTest, BackgroundNotOpaqueTest) { 1117 TEST_P(StyleRelatedMainThreadScrollingReasonTest,
1118 DISABLED_BackgroundNotOpaqueTest) {
1116 testStyle("background-not-opaque", 1119 testStyle("background-not-opaque",
1117 MainThreadScrollingReason::kBackgroundNotOpaqueInRectAndLCDText); 1120 MainThreadScrollingReason::kBackgroundNotOpaqueInRectAndLCDText);
1118 } 1121 }
1119 1122
1120 TEST_P(StyleRelatedMainThreadScrollingReasonTest, BorderRadiusTest) { 1123 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_BorderRadiusTest) {
1121 testStyle("border-radius", MainThreadScrollingReason::kHasBorderRadius); 1124 testStyle("border-radius", MainThreadScrollingReason::kHasBorderRadius);
1122 } 1125 }
1123 1126
1124 TEST_P(StyleRelatedMainThreadScrollingReasonTest, ClipTest) { 1127 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_ClipTest) {
1125 testStyle("clip", MainThreadScrollingReason::kHasClipRelatedProperty); 1128 testStyle("clip", MainThreadScrollingReason::kHasClipRelatedProperty);
1126 } 1129 }
1127 1130
1128 TEST_P(StyleRelatedMainThreadScrollingReasonTest, ClipPathTest) { 1131 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_ClipPathTest) {
1129 uint32_t reason = MainThreadScrollingReason::kHasClipRelatedProperty; 1132 uint32_t reason = MainThreadScrollingReason::kHasClipRelatedProperty;
1130 webViewImpl()->settings()->setPreferCompositingToLCDTextEnabled(false); 1133 webViewImpl()->settings()->setPreferCompositingToLCDTextEnabled(false);
1131 Document* document = frame()->document(); 1134 Document* document = frame()->document();
1132 // Test ancestor with ClipPath 1135 // Test ancestor with ClipPath
1133 Element* element = document->body(); 1136 Element* element = document->body();
1134 DCHECK(element); 1137 DCHECK(element);
1135 element->setAttribute(HTMLNames::styleAttr, 1138 element->setAttribute(HTMLNames::styleAttr,
1136 "clip-path:circle(115px at 20px 20px);"); 1139 "clip-path:circle(115px at 20px 20px);");
1137 forceFullCompositingUpdate(); 1140 forceFullCompositingUpdate();
1138 1141
(...skipping 14 matching lines...) Expand all
1153 "clip-path:circle(115px at 20px 20px);"); 1156 "clip-path:circle(115px at 20px 20px);");
1154 forceFullCompositingUpdate(); 1157 forceFullCompositingUpdate();
1155 ASSERT_TRUE(frameView->mainThreadScrollingReasons() & reason); 1158 ASSERT_TRUE(frameView->mainThreadScrollingReasons() & reason);
1156 1159
1157 // Remove clip path from descendant. 1160 // Remove clip path from descendant.
1158 element->removeAttribute(HTMLNames::styleAttr); 1161 element->removeAttribute(HTMLNames::styleAttr);
1159 forceFullCompositingUpdate(); 1162 forceFullCompositingUpdate();
1160 ASSERT_FALSE(frameView->mainThreadScrollingReasons() & reason); 1163 ASSERT_FALSE(frameView->mainThreadScrollingReasons() & reason);
1161 } 1164 }
1162 1165
1163 TEST_P(StyleRelatedMainThreadScrollingReasonTest, LCDTextEnabledTest) { 1166 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_LCDTextEnabledTest) {
1164 testStyle("transparent border-radius", 1167 testStyle("transparent border-radius",
1165 MainThreadScrollingReason::kHasOpacityAndLCDText | 1168 MainThreadScrollingReason::kHasOpacityAndLCDText |
1166 MainThreadScrollingReason::kHasBorderRadius); 1169 MainThreadScrollingReason::kHasBorderRadius);
1167 } 1170 }
1168 1171
1169 TEST_P(StyleRelatedMainThreadScrollingReasonTest, BoxShadowTest) { 1172 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_BoxShadowTest) {
1170 testStyle("box-shadow", 1173 testStyle("box-shadow",
1171 MainThreadScrollingReason::kHasBoxShadowFromNonRootLayer); 1174 MainThreadScrollingReason::kHasBoxShadowFromNonRootLayer);
1172 } 1175 }
1173 1176
1174 } // namespace blink 1177 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698