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

Unified Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp

Issue 2588403002: TestingPlatformSupport: register Platform instance correctly (Closed)
Patch Set: review #32 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/modules/compositorworker/CompositorWorkerThreadTest.cpp
diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
index 1747a4f3d50375c3a9688beb22a43fe679c6aada..36f334ef5d4b78c80979a9c6dc3cd1242c136156 100644
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
@@ -143,10 +143,11 @@ class CompositorWorkerThreadTest : public ::testing::Test {
RefPtr<SecurityOrigin> m_securityOrigin;
std::unique_ptr<InProcessWorkerObjectProxy> m_objectProxy;
- CompositorWorkerTestPlatform m_testPlatform;
};
TEST_F(CompositorWorkerThreadTest, Basic) {
+ ScopedTestingPlatformSupport<CompositorWorkerTestPlatform> platform;
+
std::unique_ptr<CompositorWorkerThread> compositorWorker =
createCompositorWorker();
checkWorkerCanExecuteScript(compositorWorker.get());
@@ -156,6 +157,8 @@ TEST_F(CompositorWorkerThreadTest, Basic) {
// Tests that the same WebThread is used for new workers if the WebThread is
// still alive.
TEST_F(CompositorWorkerThreadTest, CreateSecondAndTerminateFirst) {
+ ScopedTestingPlatformSupport<CompositorWorkerTestPlatform> platform;
+
// Create the first worker and wait until it is initialized.
std::unique_ptr<CompositorWorkerThread> firstWorker =
createCompositorWorker();
@@ -191,6 +194,8 @@ TEST_F(CompositorWorkerThreadTest, CreateSecondAndTerminateFirst) {
// Tests that a new WebThread is created if all existing workers are terminated
// before a new worker is created.
TEST_F(CompositorWorkerThreadTest, TerminateFirstAndCreateSecond) {
+ ScopedTestingPlatformSupport<CompositorWorkerTestPlatform> platform;
+
// Create the first worker, wait until it is initialized, and terminate it.
std::unique_ptr<CompositorWorkerThread> compositorWorker =
createCompositorWorker();
@@ -215,6 +220,8 @@ TEST_F(CompositorWorkerThreadTest, TerminateFirstAndCreateSecond) {
// Tests that v8::Isolate and WebThread are correctly set-up if a worker is
// created while another is terminating.
TEST_F(CompositorWorkerThreadTest, CreatingSecondDuringTerminationOfFirst) {
+ ScopedTestingPlatformSupport<CompositorWorkerTestPlatform> platform;
+
std::unique_ptr<CompositorWorkerThread> firstWorker =
createCompositorWorker();
checkWorkerCanExecuteScript(firstWorker.get());

Powered by Google App Engine
This is Rietveld 408576698