Index: test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc |
diff --git a/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc b/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc |
index ca9f44725b88b2468fc54ebd7ea1fd30d29f13e9..538a5ebb120d8d9c68a1cdcc038bc461442835b8 100644 |
--- a/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc |
+++ b/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc |
@@ -112,7 +112,9 @@ TEST_F(CompilerDispatcherJobTest, StateTransitions) { |
job->Parse(); |
ASSERT_TRUE(job->status() == CompileJobStatus::kParsed); |
ASSERT_TRUE(job->FinalizeParsingOnMainThread()); |
- ASSERT_TRUE(job->status() == CompileJobStatus::kReadyToAnalyse); |
+ ASSERT_TRUE(job->status() == CompileJobStatus::kReadyToAnalyze); |
+ ASSERT_TRUE(job->AnalyzeOnMainThread()); |
+ ASSERT_TRUE(job->status() == CompileJobStatus::kAnalyzed); |
ASSERT_TRUE(job->PrepareToCompileOnMainThread()); |
ASSERT_TRUE(job->status() == CompileJobStatus::kReadyToCompile); |
job->Compile(); |
@@ -153,6 +155,7 @@ TEST_F(CompilerDispatcherJobTest, ScopeChain) { |
job->PrepareToParseOnMainThread(); |
job->Parse(); |
ASSERT_TRUE(job->FinalizeParsingOnMainThread()); |
+ ASSERT_TRUE(job->AnalyzeOnMainThread()); |
ASSERT_TRUE(job->PrepareToCompileOnMainThread()); |
ASSERT_TRUE(job->status() == CompileJobStatus::kReadyToCompile); |
@@ -189,6 +192,7 @@ TEST_F(CompilerDispatcherJobTest, CompileAndRun) { |
job->PrepareToParseOnMainThread(); |
job->Parse(); |
job->FinalizeParsingOnMainThread(); |
+ job->AnalyzeOnMainThread(); |
job->PrepareToCompileOnMainThread(); |
job->Compile(); |
ASSERT_TRUE(job->FinalizeCompilingOnMainThread()); |
@@ -201,7 +205,7 @@ TEST_F(CompilerDispatcherJobTest, CompileAndRun) { |
ASSERT_TRUE(job->status() == CompileJobStatus::kInitial); |
} |
-TEST_F(CompilerDispatcherJobTest, CompileFailureToPrepare) { |
+TEST_F(CompilerDispatcherJobTest, CompileFailureToAnalyse) { |
std::string raw_script("() { var a = "); |
for (int i = 0; i < 100000; i++) { |
raw_script += "'x' + "; |
@@ -215,7 +219,7 @@ TEST_F(CompilerDispatcherJobTest, CompileFailureToPrepare) { |
job->PrepareToParseOnMainThread(); |
job->Parse(); |
job->FinalizeParsingOnMainThread(); |
- ASSERT_FALSE(job->PrepareToCompileOnMainThread()); |
+ ASSERT_FALSE(job->AnalyzeOnMainThread()); |
ASSERT_TRUE(job->status() == CompileJobStatus::kFailed); |
ASSERT_TRUE(i_isolate()->has_pending_exception()); |
@@ -238,6 +242,7 @@ TEST_F(CompilerDispatcherJobTest, CompileFailureToFinalize) { |
job->PrepareToParseOnMainThread(); |
job->Parse(); |
job->FinalizeParsingOnMainThread(); |
+ job->AnalyzeOnMainThread(); |
job->PrepareToCompileOnMainThread(); |
job->Compile(); |
ASSERT_FALSE(job->FinalizeCompilingOnMainThread()); |
@@ -282,6 +287,7 @@ TEST_F(CompilerDispatcherJobTest, CompileOnBackgroundThread) { |
job->PrepareToParseOnMainThread(); |
job->Parse(); |
job->FinalizeParsingOnMainThread(); |
+ job->AnalyzeOnMainThread(); |
job->PrepareToCompileOnMainThread(); |
base::Semaphore semaphore(0); |
@@ -314,6 +320,7 @@ TEST_F(CompilerDispatcherJobTest, LazyInnerFunctions) { |
job->PrepareToParseOnMainThread(); |
job->Parse(); |
ASSERT_TRUE(job->FinalizeParsingOnMainThread()); |
+ ASSERT_TRUE(job->AnalyzeOnMainThread()); |
ASSERT_TRUE(job->PrepareToCompileOnMainThread()); |
job->Compile(); |
ASSERT_TRUE(job->FinalizeCompilingOnMainThread()); |