Commit 88398012 authored by toyoshim's avatar toyoshim Committed by Commit bot

Remove ScrollbarTestSuite from platform/scroll

ScrollbarTestSuite registers Platform::current()->compositorSupport() to
TestingPlatformSupportWithMockScheduler, but
TestingPlatformSupportWithMockScheduler does the same thing internally.

So we can just remove ScrollbarTestSuite without any behavior change.

BUG=n/a
TEST=blink_platform_unittests

Review-Url: https://codereview.chromium.org/2621393003
Cr-Commit-Position: refs/heads/master@{#443509}
parent 17b4caf4
......@@ -32,12 +32,11 @@ class ScrollbarThemeWithMockInvalidation : public ScrollbarThemeMock {
} // namespace
class ScrollableAreaTest : public ScrollbarTestSuite {};
using ScrollableAreaTest = testing::Test;
TEST_F(ScrollableAreaTest, ScrollAnimatorCurrentPositionShouldBeSync) {
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
const TestingPlatformSupport::Config&>
platform(m_config);
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
platform;
MockScrollableArea* scrollableArea =
MockScrollableArea::create(ScrollOffset(0, 100));
......@@ -46,9 +45,8 @@ TEST_F(ScrollableAreaTest, ScrollAnimatorCurrentPositionShouldBeSync) {
}
TEST_F(ScrollableAreaTest, ScrollbarTrackAndThumbRepaint) {
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
const TestingPlatformSupport::Config&>
platform(m_config);
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
platform;
ScrollbarThemeWithMockInvalidation theme;
MockScrollableArea* scrollableArea =
......@@ -89,9 +87,8 @@ TEST_F(ScrollableAreaTest, ScrollbarTrackAndThumbRepaint) {
}
TEST_F(ScrollableAreaTest, ScrollbarGraphicsLayerInvalidation) {
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
const TestingPlatformSupport::Config&>
platform(m_config);
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
platform;
ScrollbarTheme::setMockScrollbarsEnabled(true);
MockScrollableArea* scrollableArea =
......@@ -116,9 +113,8 @@ TEST_F(ScrollableAreaTest, ScrollbarGraphicsLayerInvalidation) {
}
TEST_F(ScrollableAreaTest, InvalidatesNonCompositedScrollbarsWhenThumbMoves) {
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
const TestingPlatformSupport::Config&>
platform(m_config);
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
platform;
ScrollbarThemeWithMockInvalidation theme;
MockScrollableArea* scrollableArea =
......@@ -160,9 +156,8 @@ TEST_F(ScrollableAreaTest, InvalidatesNonCompositedScrollbarsWhenThumbMoves) {
}
TEST_F(ScrollableAreaTest, InvalidatesCompositedScrollbarsIfPartsNeedRepaint) {
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
const TestingPlatformSupport::Config&>
platform(m_config);
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
platform;
ScrollbarThemeWithMockInvalidation theme;
MockScrollableArea* scrollableArea =
......@@ -242,9 +237,8 @@ TEST_F(ScrollableAreaTest, InvalidatesCompositedScrollbarsIfPartsNeedRepaint) {
}
TEST_F(ScrollableAreaTest, RecalculatesScrollbarOverlayIfBackgroundChanges) {
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
const TestingPlatformSupport::Config&>
platform(m_config);
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
platform;
MockScrollableArea* scrollableArea =
MockScrollableArea::create(ScrollOffset(0, 100));
......
......@@ -9,7 +9,6 @@
#include "platform/scroll/ScrollableArea.h"
#include "platform/scroll/Scrollbar.h"
#include "platform/scroll/ScrollbarThemeMock.h"
#include "platform/testing/TestingPlatformSupport.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "wtf/PtrUtil.h"
#include <memory>
......@@ -82,18 +81,6 @@ class MockScrollableArea : public GarbageCollectedFinalized<MockScrollableArea>,
ScrollOffset m_maximumScrollOffset;
};
class ScrollbarTestSuite : public testing::Test {
public:
ScrollbarTestSuite() {}
void SetUp() override {
m_config.compositorSupport = Platform::current()->compositorSupport();
}
protected:
TestingPlatformSupport::Config m_config;
};
} // namespace blink
#endif
......@@ -5,6 +5,7 @@
#include "platform/scroll/ScrollbarThemeAura.h"
#include "platform/scroll/ScrollbarTestSuite.h"
#include "platform/testing/TestingPlatformSupport.h"
namespace blink {
......@@ -28,12 +29,11 @@ class ScrollbarThemeAuraButtonOverride final : public ScrollbarThemeAura {
} // namespace
class ScrollbarThemeAuraTest : public ScrollbarTestSuite {};
using ScrollbarThemeAuraTest = testing::Test;
TEST_F(ScrollbarThemeAuraTest, ButtonSizeHorizontal) {
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
const TestingPlatformSupport::Config&>
platform(m_config);
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
platform;
MockScrollableArea* mockScrollableArea = MockScrollableArea::create();
ScrollbarThemeMock mockTheme;
......@@ -57,9 +57,8 @@ TEST_F(ScrollbarThemeAuraTest, ButtonSizeHorizontal) {
}
TEST_F(ScrollbarThemeAuraTest, ButtonSizeVertical) {
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
const TestingPlatformSupport::Config&>
platform(m_config);
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
platform;
MockScrollableArea* mockScrollableArea = MockScrollableArea::create();
ScrollbarThemeMock mockTheme;
......@@ -83,9 +82,8 @@ TEST_F(ScrollbarThemeAuraTest, ButtonSizeVertical) {
}
TEST_F(ScrollbarThemeAuraTest, NoButtonsReturnsSize0) {
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
const TestingPlatformSupport::Config&>
platform(m_config);
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
platform;
MockScrollableArea* mockScrollableArea = MockScrollableArea::create();
ScrollbarThemeMock mockTheme;
......
......@@ -5,18 +5,18 @@
#include "platform/scroll/ScrollbarThemeOverlay.h"
#include "platform/scroll/ScrollbarTestSuite.h"
#include "platform/testing/TestingPlatformSupport.h"
namespace blink {
using testing::NiceMock;
using testing::Return;
class ScrollbarThemeOverlayTest : public ScrollbarTestSuite {};
using ScrollbarThemeOverlayTest = testing::Test;
TEST_F(ScrollbarThemeOverlayTest, PaintInvalidation) {
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler,
const TestingPlatformSupport::Config&>
platform(m_config);
ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
platform;
NiceMock<MockScrollableArea>* mockScrollableArea =
new NiceMock<MockScrollableArea>(ScrollOffset(100, 100));
......
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