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

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

Issue 1955693003: compositor-worker: Keep worker backing thread alive for the lifetime of the compositor thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded scheduler changes. Created 4 years, 7 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 dd55032545cc9bbd9d40510acd53574475899928..26cfa226772c23ba1077fee9ac7281419fb02f8e 100644
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
@@ -91,7 +91,7 @@ public:
void TearDown() override
{
m_page.clear();
- CompositorWorkerThread::resetSharedBackingThreadForTest();
+ CompositorWorkerThread::clearSharedBackingThread();
}
PassOwnPtr<CompositorWorkerThread> createCompositorWorker()
@@ -183,17 +183,17 @@ TEST_F(CompositorWorkerThreadTest, TerminateFirstAndCreateSecond)
WebThreadSupportingGC* firstThread = &compositorWorker->workerBackingThread().backingThread();
checkWorkerCanExecuteScript(compositorWorker.get());
- ASSERT_EQ(1u, workerBackingThread->workerScriptCount());
+ ASSERT_EQ(2u, workerBackingThread->workerScriptCount());
compositorWorker->terminateAndWait();
- ASSERT_EQ(0u, workerBackingThread->workerScriptCount());
+ ASSERT_EQ(1u, workerBackingThread->workerScriptCount());
// Create the second worker. The backing thread is same.
compositorWorker = createCompositorWorker();
WebThreadSupportingGC* secondThread = &compositorWorker->workerBackingThread().backingThread();
EXPECT_EQ(firstThread, secondThread);
checkWorkerCanExecuteScript(compositorWorker.get());
- ASSERT_EQ(1u, workerBackingThread->workerScriptCount());
+ ASSERT_EQ(2u, workerBackingThread->workerScriptCount());
compositorWorker->terminateAndWait();
}
@@ -208,7 +208,7 @@ TEST_F(CompositorWorkerThreadTest, CreatingSecondDuringTerminationOfFirst)
// Request termination of the first worker and create the second worker
// as soon as possible.
- EXPECT_EQ(1u, firstWorker->workerBackingThread().workerScriptCount());
+ EXPECT_EQ(2u, firstWorker->workerBackingThread().workerScriptCount());
firstWorker->terminate();
// We don't wait for its termination.
// Note: We rely on the assumption that the termination steps don't run

Powered by Google App Engine
This is Rietveld 408576698