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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp

Issue 1780083002: Introduce Platform::setCurrentPlatformForTesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp b/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
index 4633bc4af8467013c9e5c4e428bab270a42f4ce9..ee962d9a767b5e24094048fbf2bae84d5d69160b 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
@@ -75,26 +75,22 @@ private:
class ScrollableAreaTest : public testing::Test {
public:
- ScrollableAreaTest() : m_oldPlatform(nullptr) { }
+ ScrollableAreaTest() { }
void SetUp() override
{
- m_oldPlatform = Platform::current();
TestingPlatformSupport::Config config;
- config.compositorSupport = m_oldPlatform->compositorSupport();
+ config.compositorSupport = Platform::current()->compositorSupport();
m_fakePlatform = adoptPtr(new TestingPlatformSupportWithMockScheduler(config));
- Platform::initialize(m_fakePlatform.get());
}
void TearDown() override
{
- Platform::initialize(m_oldPlatform);
m_fakePlatform = nullptr;
}
private:
OwnPtr<TestingPlatformSupportWithMockScheduler> m_fakePlatform;
- Platform* m_oldPlatform; // Not owned.
};
TEST_F(ScrollableAreaTest, ScrollAnimatorCurrentPositionShouldBeSync)
« no previous file with comments | « third_party/WebKit/Source/platform/exported/Platform.cpp ('k') | third_party/WebKit/Source/platform/testing/RunAllTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698