Skip to content
Permalink
Browse files

Backport some tests in /gin to SingleThreadTaskEnvironment

These tests were previously migrated from single-threaded MessageLoop to
a multi-threaded TaskEnvironment (then named ScopedTaskEnvironment) as
part of crbug.com/891670.

//base OWNERS decided in retrospect that it was better to keep a
single-threaded option for TaskEnvironment and introduced
SingleThreadTaskEnvironment. This CL retrofits that decision for
/gin.

This CL is a no-op if it passes CQ.

This CL was uploaded by git cl split.

R=jbroman@chromium.org

Bug: 891670
Change-Id: Idc0de22233bb1dfa72b0111d2dc5d24ba32208a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786942
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693724}
  • Loading branch information
Gabriel Charette Commit Bot
Gabriel Charette authored and Commit Bot committed Sep 5, 2019
1 parent 207cbb0 commit 30aa0969dfcec275d49baea804fde16e1b93adf4
Showing with 2 additions and 2 deletions.
  1. +1 −1 gin/shell_runner_unittest.cc
  2. +1 −1 gin/test/v8_test.h
@@ -25,7 +25,7 @@ using v8::String;
namespace gin {

TEST(RunnerTest, Run) {
base::test::TaskEnvironment task_environment;
base::test::SingleThreadTaskEnvironment task_environment;
std::string source = "this.result = 'PASS';\n";

#ifdef V8_USE_EXTERNAL_STARTUP_DATA
@@ -30,7 +30,7 @@ class V8Test : public testing::Test {
protected:
// This is used during SetUp() to initialize instance_.
virtual std::unique_ptr<IsolateHolder> CreateIsolateHolder() const;
base::test::TaskEnvironment task_environment_;
base::test::SingleThreadTaskEnvironment task_environment_;
std::unique_ptr<IsolateHolder> instance_;
v8::Persistent<v8::Context> context_;

0 comments on commit 30aa096

Please sign in to comment.
You can’t perform that action at this time.