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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp

Issue 2355723005: Worker: Introduce WorkerReportingProxy::willEvaluateWorkerScript() (Closed)
Patch Set: fix comment Created 4 years, 3 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/core/workers/WorkerThreadTest.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp b/third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp
index 03322ed79abe776de72eb3681954f70dd6d74a2a..1c6a8e1b56f3a0112fda24c9b1bae99aa0049db5 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp
@@ -74,9 +74,9 @@ public:
protected:
void expectReportingCalls()
{
- EXPECT_CALL(*m_reportingProxy, didLoadWorkerScriptMock(_, _)).Times(1);
EXPECT_CALL(*m_reportingProxy, didCreateWorkerGlobalScope(_)).Times(1);
EXPECT_CALL(*m_reportingProxy, didInitializeWorkerContext()).Times(1);
+ EXPECT_CALL(*m_reportingProxy, willEvaluateWorkerScriptMock(_, _)).Times(1);
EXPECT_CALL(*m_reportingProxy, didEvaluateWorkerScript(true)).Times(1);
EXPECT_CALL(*m_reportingProxy, willDestroyWorkerGlobalScope()).Times(1);
EXPECT_CALL(*m_reportingProxy, didTerminateWorkerThread()).Times(1);
@@ -85,9 +85,9 @@ protected:
void expectReportingCallsForWorkerPossiblyTerminatedBeforeInitialization()
{
- EXPECT_CALL(*m_reportingProxy, didLoadWorkerScriptMock(_, _)).Times(AtMost(1));
EXPECT_CALL(*m_reportingProxy, didCreateWorkerGlobalScope(_)).Times(AtMost(1));
EXPECT_CALL(*m_reportingProxy, didInitializeWorkerContext()).Times(AtMost(1));
+ EXPECT_CALL(*m_reportingProxy, willEvaluateWorkerScriptMock(_, _)).Times(AtMost(1));
EXPECT_CALL(*m_reportingProxy, didEvaluateWorkerScript(_)).Times(AtMost(1));
EXPECT_CALL(*m_reportingProxy, willDestroyWorkerGlobalScope()).Times(AtMost(1));
EXPECT_CALL(*m_reportingProxy, didTerminateWorkerThread()).Times(1);
@@ -96,9 +96,9 @@ protected:
void expectReportingCallsForWorkerForciblyTerminated()
{
- EXPECT_CALL(*m_reportingProxy, didLoadWorkerScriptMock(_, _)).Times(1);
EXPECT_CALL(*m_reportingProxy, didCreateWorkerGlobalScope(_)).Times(1);
EXPECT_CALL(*m_reportingProxy, didInitializeWorkerContext()).Times(1);
+ EXPECT_CALL(*m_reportingProxy, willEvaluateWorkerScriptMock(_, _)).Times(1);
EXPECT_CALL(*m_reportingProxy, didEvaluateWorkerScript(false)).Times(1);
EXPECT_CALL(*m_reportingProxy, willDestroyWorkerGlobalScope()).Times(1);
EXPECT_CALL(*m_reportingProxy, didTerminateWorkerThread()).Times(1);
@@ -208,7 +208,7 @@ TEST_F(WorkerThreadTest, AsyncTerminate_WhileTaskIsRunning)
expectReportingCallsForWorkerForciblyTerminated();
startWithSourceCodeNotToFinish();
- m_reportingProxy->waitUntilScriptLoaded();
+ m_reportingProxy->waitUntilScriptEvaluation();
// terminate() schedules a force termination task.
m_workerThread->terminate();
@@ -230,7 +230,7 @@ TEST_F(WorkerThreadTest, SyncTerminate_WhileTaskIsRunning)
{
expectReportingCallsForWorkerForciblyTerminated();
startWithSourceCodeNotToFinish();
- m_reportingProxy->waitUntilScriptLoaded();
+ m_reportingProxy->waitUntilScriptEvaluation();
// terminateAndWait() synchronously terminates the worker execution.
m_workerThread->terminateAndWait();
@@ -244,7 +244,7 @@ TEST_F(WorkerThreadTest, AsyncTerminateAndThenSyncTerminate_WhileTaskIsRunning)
expectReportingCallsForWorkerForciblyTerminated();
startWithSourceCodeNotToFinish();
- m_reportingProxy->waitUntilScriptLoaded();
+ m_reportingProxy->waitUntilScriptEvaluation();
// terminate() schedules a force termination task.
m_workerThread->terminate();
@@ -259,7 +259,6 @@ TEST_F(WorkerThreadTest, AsyncTerminateAndThenSyncTerminate_WhileTaskIsRunning)
TEST_F(WorkerThreadTest, Terminate_WhileDebuggerTaskIsRunningOnInitialization)
{
- EXPECT_CALL(*m_reportingProxy, didLoadWorkerScriptMock(_, _)).Times(1);
EXPECT_CALL(*m_reportingProxy, didCreateWorkerGlobalScope(_)).Times(1);
EXPECT_CALL(*m_reportingProxy, willDestroyWorkerGlobalScope()).Times(1);
EXPECT_CALL(*m_reportingProxy, didTerminateWorkerThread()).Times(1);

Powered by Google App Engine
This is Rietveld 408576698