Commit b8300073 authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

Remove redundant paint test configurations

This patch removes two redundant paint test configurations:
INSTANTIATE_SCROLL_HIT_TEST_SUITE_P
INSTANTIATE_LAYER_LIST_TEST_SUITE_P

These were used for the rollouts of PaintNonFastScrollableRegions [1]
and BlinkGenPropertyTrees [2].

[1] https://docs.google.com/document/d/1IyYJ6bVF7KZq96b_s5NrAzGtVoBXn_LQnya9y4yT3iw
[2] https://docs.google.com/document/d/17GKr2uIH2O5GthdTyvJpv1qZjoHYoLgrzvCkbCHoID4

Change-Id: I4cb416b0acf296daa74c8ed526e1aa5a066fee32
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1986776Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Auto-Submit: Philip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728218}
parent 12917562
...@@ -35,12 +35,7 @@ TEST_P(BoxPainterTest, DontPaintEmptyDecorationBackground) { ...@@ -35,12 +35,7 @@ TEST_P(BoxPainterTest, DontPaintEmptyDecorationBackground) {
PaintPhase::kSelfOutlineOnly)))); PaintPhase::kSelfOutlineOnly))));
} }
using BoxPainterScrollHitTestTest = PaintControllerPaintTest; TEST_P(BoxPainterTest, ScrollHitTestOrderWithScrollBackgroundAttachment) {
INSTANTIATE_SCROLL_HIT_TEST_SUITE_P(BoxPainterScrollHitTestTest);
TEST_P(BoxPainterScrollHitTestTest,
ScrollHitTestOrderWithScrollBackgroundAttachment) {
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style> <style>
::-webkit-scrollbar { display: none; } ::-webkit-scrollbar { display: none; }
...@@ -94,8 +89,7 @@ TEST_P(BoxPainterScrollHitTestTest, ...@@ -94,8 +89,7 @@ TEST_P(BoxPainterScrollHitTestTest,
} }
} }
TEST_P(BoxPainterScrollHitTestTest, TEST_P(BoxPainterTest, ScrollHitTestOrderWithLocalBackgroundAttachment) {
ScrollHitTestOrderWithLocalBackgroundAttachment) {
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style> <style>
::-webkit-scrollbar { display: none; } ::-webkit-scrollbar { display: none; }
...@@ -152,7 +146,7 @@ TEST_P(BoxPainterScrollHitTestTest, ...@@ -152,7 +146,7 @@ TEST_P(BoxPainterScrollHitTestTest,
} }
} }
TEST_P(BoxPainterScrollHitTestTest, ScrollHitTestProperties) { TEST_P(BoxPainterTest, ScrollHitTestProperties) {
// This test depends on the CompositeAfterPaint behavior of painting solid // This test depends on the CompositeAfterPaint behavior of painting solid
// color backgrounds into both the non-scrolled and scrolled spaces. // color backgrounds into both the non-scrolled and scrolled spaces.
if (!RuntimeEnabledFeatures::CompositeAfterPaintEnabled()) if (!RuntimeEnabledFeatures::CompositeAfterPaintEnabled())
......
...@@ -92,7 +92,7 @@ class CompositingTest : public PaintTestConfigurations, public testing::Test { ...@@ -92,7 +92,7 @@ class CompositingTest : public PaintTestConfigurations, public testing::Test {
std::unique_ptr<frame_test_helpers::WebViewHelper> web_view_helper_; std::unique_ptr<frame_test_helpers::WebViewHelper> web_view_helper_;
}; };
INSTANTIATE_LAYER_LIST_TEST_SUITE_P(CompositingTest); INSTANTIATE_PAINT_TEST_SUITE_P(CompositingTest);
TEST_P(CompositingTest, DidScrollCallbackAfterScrollableAreaChanges) { TEST_P(CompositingTest, DidScrollCallbackAfterScrollableAreaChanges) {
InitializeWithHTML(*WebView()->MainFrameImpl()->GetFrame(), InitializeWithHTML(*WebView()->MainFrameImpl()->GetFrame(),
...@@ -259,7 +259,7 @@ class CompositingSimTest : public PaintTestConfigurations, public SimTest { ...@@ -259,7 +259,7 @@ class CompositingSimTest : public PaintTestConfigurations, public SimTest {
} }
}; };
INSTANTIATE_LAYER_LIST_TEST_SUITE_P(CompositingSimTest); INSTANTIATE_PAINT_TEST_SUITE_P(CompositingSimTest);
TEST_P(CompositingSimTest, LayerUpdatesDoNotInvalidateEarlierLayers) { TEST_P(CompositingSimTest, LayerUpdatesDoNotInvalidateEarlierLayers) {
InitializeWithHTML(R"HTML( InitializeWithHTML(R"HTML(
......
...@@ -24,10 +24,9 @@ class NGBoxFragmentPainterTest : public PaintControllerPaintTest, ...@@ -24,10 +24,9 @@ class NGBoxFragmentPainterTest : public PaintControllerPaintTest,
ScopedLayoutNGForTest(true) {} ScopedLayoutNGForTest(true) {}
}; };
using NGBoxFragmentPainterScrollHitTestTest = NGBoxFragmentPainterTest; INSTANTIATE_PAINT_TEST_SUITE_P(NGBoxFragmentPainterTest);
INSTANTIATE_SCROLL_HIT_TEST_SUITE_P(NGBoxFragmentPainterScrollHitTestTest);
TEST_P(NGBoxFragmentPainterScrollHitTestTest, ScrollHitTestOrder) { TEST_P(NGBoxFragmentPainterTest, ScrollHitTestOrder) {
GetPage().GetSettings().SetPreferCompositingToLCDTextEnabled(false); GetPage().GetSettings().SetPreferCompositingToLCDTextEnabled(false);
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<!DOCTYPE html> <!DOCTYPE html>
......
...@@ -15,14 +15,14 @@ using testing::ElementsAre; ...@@ -15,14 +15,14 @@ using testing::ElementsAre;
namespace blink { namespace blink {
class ViewPainterTest : public PaintControllerPaintTest { class ViewPainterFixedBackgroundTest : public PaintControllerPaintTest {
protected: protected:
void RunFixedBackgroundTest(bool prefer_compositing_to_lcd_text); void RunFixedBackgroundTest(bool prefer_compositing_to_lcd_text);
}; };
INSTANTIATE_PAINT_TEST_SUITE_P(ViewPainterTest); INSTANTIATE_PAINT_TEST_SUITE_P(ViewPainterFixedBackgroundTest);
void ViewPainterTest::RunFixedBackgroundTest( void ViewPainterFixedBackgroundTest::RunFixedBackgroundTest(
bool prefer_compositing_to_lcd_text) { bool prefer_compositing_to_lcd_text) {
if (prefer_compositing_to_lcd_text) { if (prefer_compositing_to_lcd_text) {
Settings* settings = GetDocument().GetFrame()->GetSettings(); Settings* settings = GetDocument().GetFrame()->GetSettings();
...@@ -108,19 +108,19 @@ void ViewPainterTest::RunFixedBackgroundTest( ...@@ -108,19 +108,19 @@ void ViewPainterTest::RunFixedBackgroundTest(
} }
} }
TEST_P(ViewPainterTest, DocumentFixedBackgroundLowDPI) { TEST_P(ViewPainterFixedBackgroundTest, DocumentFixedBackgroundLowDPI) {
RunFixedBackgroundTest(false); RunFixedBackgroundTest(false);
} }
TEST_P(ViewPainterTest, DocumentFixedBackgroundHighDPI) { TEST_P(ViewPainterFixedBackgroundTest, DocumentFixedBackgroundHighDPI) {
RunFixedBackgroundTest(true); RunFixedBackgroundTest(true);
} }
using ViewPainterScrollHitTestTest = PaintControllerPaintTest; using ViewPainterTest = PaintControllerPaintTest;
INSTANTIATE_SCROLL_HIT_TEST_SUITE_P(ViewPainterScrollHitTestTest); INSTANTIATE_PAINT_TEST_SUITE_P(ViewPainterTest);
TEST_P(ViewPainterScrollHitTestTest, DocumentBackgroundWithScroll) { TEST_P(ViewPainterTest, DocumentBackgroundWithScroll) {
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style>::-webkit-scrollbar { display: none }</style> <style>::-webkit-scrollbar { display: none }</style>
<div style='height: 5000px'></div> <div style='height: 5000px'></div>
...@@ -167,7 +167,7 @@ TEST_P(ViewPainterScrollHitTestTest, DocumentBackgroundWithScroll) { ...@@ -167,7 +167,7 @@ TEST_P(ViewPainterScrollHitTestTest, DocumentBackgroundWithScroll) {
} }
} }
TEST_P(ViewPainterScrollHitTestTest, FrameScrollHitTestProperties) { TEST_P(ViewPainterTest, FrameScrollHitTestProperties) {
// This test depends on the CompositeAfterPaint behavior of painting solid // This test depends on the CompositeAfterPaint behavior of painting solid
// color backgrounds into both the non-scrolled and scrolled spaces. // color backgrounds into both the non-scrolled and scrolled spaces.
if (!RuntimeEnabledFeatures::CompositeAfterPaintEnabled()) if (!RuntimeEnabledFeatures::CompositeAfterPaintEnabled())
......
...@@ -274,7 +274,7 @@ class PaintArtifactCompositorTest : public testing::Test, ...@@ -274,7 +274,7 @@ class PaintArtifactCompositorTest : public testing::Test,
std::unique_ptr<LayerTreeHostEmbedder> layer_tree_; std::unique_ptr<LayerTreeHostEmbedder> layer_tree_;
}; };
INSTANTIATE_LAYER_LIST_TEST_SUITE_P(PaintArtifactCompositorTest); INSTANTIATE_PAINT_TEST_SUITE_P(PaintArtifactCompositorTest);
const auto kNotScrollingOnMain = const auto kNotScrollingOnMain =
cc::MainThreadScrollingReason::kNotScrollingOnMain; cc::MainThreadScrollingReason::kNotScrollingOnMain;
......
...@@ -36,15 +36,6 @@ class PaintTestConfigurations ...@@ -36,15 +36,6 @@ class PaintTestConfigurations
INSTANTIATE_TEST_SUITE_P(All, test_class, \ INSTANTIATE_TEST_SUITE_P(All, test_class, \
::testing::Values(kCompositeAfterPaint)) ::testing::Values(kCompositeAfterPaint))
// TODO(pdr): Remove this in favor of INSTANTIATE_PAINT_TEST_SUITE_P.
#define INSTANTIATE_LAYER_LIST_TEST_SUITE_P(test_class) \
INSTANTIATE_TEST_SUITE_P(All, test_class, \
::testing::Values(0, kCompositeAfterPaint))
#define INSTANTIATE_SCROLL_HIT_TEST_SUITE_P(test_class) \
INSTANTIATE_TEST_SUITE_P(All, test_class, \
::testing::Values(0, kCompositeAfterPaint))
} // namespace blink } // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_TESTING_PAINT_TEST_CONFIGURATIONS_H_ #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_TESTING_PAINT_TEST_CONFIGURATIONS_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment