Chromium Code Reviews| 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..75b654dc0a822819d4a49ebad6a414d2637a1cc8 100644 |
| --- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp |
| +++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp |
| @@ -82,7 +82,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/")); |
| @@ -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()); |
|
kinuko
2016/05/23 09:53:55
(yhirano: are we going to remove worker script cou
yhirano
2016/05/23 11:18:34
Yes, unless threaded worklets require otherwise.
|
| 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 |