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

Unified Diff: test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc

Issue 2625413004: [compiler-dispatcher] make it so that we can always parse on bg threads (Closed)
Patch Set: updates Created 3 years, 11 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
« no previous file with comments | « src/objects.h ('k') | test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e1101dfe31f6c49bec3b44c50fd401c34cdebf23..ca9f44725b88b2468fc54ebd7ea1fd30d29f13e9 100644
--- a/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc
+++ b/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc
@@ -29,17 +29,6 @@ class CompilerDispatcherJobTest : public TestWithContext {
CompilerDispatcherTracer* tracer() { return &tracer_; }
- private:
- CompilerDispatcherTracer tracer_;
-
- DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherJobTest);
-};
-
-class IgnitionCompilerDispatcherJobTest : public CompilerDispatcherJobTest {
- public:
- IgnitionCompilerDispatcherJobTest() {}
- ~IgnitionCompilerDispatcherJobTest() override {}
-
static void SetUpTestCase() {
old_flag_ = i::FLAG_ignition;
i::FLAG_ignition = true;
@@ -52,11 +41,13 @@ class IgnitionCompilerDispatcherJobTest : public CompilerDispatcherJobTest {
}
private:
+ CompilerDispatcherTracer tracer_;
static bool old_flag_;
- DISALLOW_COPY_AND_ASSIGN(IgnitionCompilerDispatcherJobTest);
+
+ DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherJobTest);
};
-bool IgnitionCompilerDispatcherJobTest::old_flag_;
+bool CompilerDispatcherJobTest::old_flag_;
namespace {
@@ -110,22 +101,6 @@ TEST_F(CompilerDispatcherJobTest, Construct) {
FLAG_stack_size));
}
-TEST_F(CompilerDispatcherJobTest, CanParseOnBackgroundThread) {
- {
- std::unique_ptr<CompilerDispatcherJob> job(new CompilerDispatcherJob(
- i_isolate(), tracer(), CreateSharedFunctionInfo(i_isolate(), nullptr),
- FLAG_stack_size));
- ASSERT_FALSE(job->can_parse_on_background_thread());
- }
- {
- ScriptResource script(test_script, strlen(test_script));
- std::unique_ptr<CompilerDispatcherJob> job(new CompilerDispatcherJob(
- i_isolate(), tracer(), CreateSharedFunctionInfo(i_isolate(), &script),
- FLAG_stack_size));
- ASSERT_TRUE(job->can_parse_on_background_thread());
- }
-}
-
TEST_F(CompilerDispatcherJobTest, StateTransitions) {
std::unique_ptr<CompilerDispatcherJob> job(new CompilerDispatcherJob(
i_isolate(), tracer(), CreateSharedFunctionInfo(i_isolate(), nullptr),
@@ -291,7 +266,7 @@ class CompileTask : public Task {
DISALLOW_COPY_AND_ASSIGN(CompileTask);
};
-TEST_F(IgnitionCompilerDispatcherJobTest, CompileOnBackgroundThread) {
+TEST_F(CompilerDispatcherJobTest, CompileOnBackgroundThread) {
const char* raw_script =
"(a, b) {\n"
" var c = a + b;\n"
@@ -308,7 +283,6 @@ TEST_F(IgnitionCompilerDispatcherJobTest, CompileOnBackgroundThread) {
job->Parse();
job->FinalizeParsingOnMainThread();
job->PrepareToCompileOnMainThread();
- ASSERT_TRUE(job->can_compile_on_background_thread());
base::Semaphore semaphore(0);
CompileTask* background_task = new CompileTask(job.get(), &semaphore);
« no previous file with comments | « src/objects.h ('k') | test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698