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 fec898363838d730d6e890f74d44c5b538007292..98528e1e05e33adcaf804dccc7bd20f292e5f340 100644 |
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp |
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp |
@@ -94,7 +94,7 @@ class CompositorWorkerThreadTest : public ::testing::Test { |
public: |
void SetUp() override |
{ |
- CompositorWorkerThread::resetSharedBackingThreadForTest(); |
+ CompositorWorkerThread::createSharedBackingThreadForTest(); |
m_page = DummyPageHolder::create(); |
m_objectProxy = TestCompositorWorkerObjectProxy::create(&m_page->document()); |
m_securityOrigin = SecurityOrigin::create(KURL(ParsedURLString, "http://fake.url/")); |
@@ -103,7 +103,8 @@ public: |
void TearDown() override |
{ |
m_page.reset(); |
- CompositorWorkerThread::resetSharedBackingThreadForTest(); |
+ CompositorWorkerThread::terminateExecution(); |
+ CompositorWorkerThread::clearSharedBackingThread(); |
} |
PassOwnPtr<CompositorWorkerThread> createCompositorWorker() |
@@ -196,17 +197,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(); |
} |
@@ -221,7 +222,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 |