summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjochen <jochen@chromium.org>2015-05-06 08:10:29 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-06 15:10:52 +0000
commit198cfb67ce30c38a2948c80628ce055fcb06a9ef (patch)
treed22e0dbfd6a189216d1704e0006ef14f3343eb2a /content
parent661271755595fbe1b2abad7802ff37325e890e25 (diff)
downloadchromium_src-198cfb67ce30c38a2948c80628ce055fcb06a9ef.zip
chromium_src-198cfb67ce30c38a2948c80628ce055fcb06a9ef.tar.gz
chromium_src-198cfb67ce30c38a2948c80628ce055fcb06a9ef.tar.bz2
Revert of Adding task runner/ message loop to tests that use IsolateHolder. (patchset #4 id:60001 of https://codereview.chromium.org/1130433002/)
Reason for revert: speculative revert, gin unittests doesn't compile on mac builders anymore Original issue's description: > Adding task runner/ message loop to tests that use IsolateHolder. > > For adding v8 heap memory dump provider, the gin::IsolateHolder needs > to have a task runner at initialization. The tests which don't > initiallize task runner when initialization are changed in this CL to > have either the message loop initializaed earlier or a dummy task > runner. Refer crrev.com/1088683003 for the dump provider. > > BUG=476013 > > Committed: https://crrev.com/54d19441b064ae06604c6a26c3863a091a8bb8bb > Cr-Commit-Position: refs/heads/master@{#328531} TBR=primiano@chromium.org,skyostil@chromium.org,ssid@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=476013 Review URL: https://codereview.chromium.org/1129863002 Cr-Commit-Position: refs/heads/master@{#328538}
Diffstat (limited to 'content')
-rw-r--r--content/test/test_blink_web_unit_test_support.cc50
1 files changed, 0 insertions, 50 deletions
diff --git a/content/test/test_blink_web_unit_test_support.cc b/content/test/test_blink_web_unit_test_support.cc
index 8aa6618..7405be6 100644
--- a/content/test/test_blink_web_unit_test_support.cc
+++ b/content/test/test_blink_web_unit_test_support.cc
@@ -8,10 +8,7 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/path_service.h"
-#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
-#include "base/thread_task_runner_handle.h"
-#include "base/threading/platform_thread.h"
#include "components/scheduler/renderer/renderer_scheduler.h"
#include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h"
#include "content/test/mock_webclipboard_impl.h"
@@ -44,40 +41,6 @@
#include "gin/v8_initializer.h"
#endif
-namespace {
-
-class DummyTaskRunner : public base::SingleThreadTaskRunner {
- public:
- DummyTaskRunner() : thread_id_(base::PlatformThread::CurrentId()) {}
-
- bool PostDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) override {
- NOTREACHED();
- return false;
- }
-
- bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) override {
- NOTREACHED();
- return false;
- }
-
- bool RunsTasksOnCurrentThread() const override {
- return thread_id_ == base::PlatformThread::CurrentId();
- }
-
- protected:
- ~DummyTaskRunner() override {}
-
- base::PlatformThreadId thread_id_;
-
- DISALLOW_COPY_AND_ASSIGN(DummyTaskRunner);
-};
-
-} // namespace
-
namespace content {
TestBlinkWebUnitTestSupport::TestBlinkWebUnitTestSupport() {
@@ -92,23 +55,10 @@ TestBlinkWebUnitTestSupport::TestBlinkWebUnitTestSupport() {
gin::V8Initializer::LoadV8Snapshot();
#endif
- scoped_refptr<base::SingleThreadTaskRunner> dummy_task_runner;
- scoped_ptr<base::ThreadTaskRunnerHandle> dummy_task_runner_handle;
if (base::MessageLoopProxy::current()) {
renderer_scheduler_ = scheduler::RendererScheduler::Create();
web_thread_.reset(new scheduler::WebThreadImplForRendererScheduler(
renderer_scheduler_.get()));
- } else {
- // Dummy task runner is initialized here because the blink::initialize
- // creates IsolateHolder which needs the current task runner handle. There
- // should be no task posted to this task runner. The message loop is not
- // created before this initialization because some tests need specific kinds
- // of message loops, and their types are not known upfront. Some tests also
- // create their own thread bundles or message loops, and doing the same in
- // TestBlinkWebUnitTestSupport would introduce a conflict.
- dummy_task_runner = make_scoped_refptr(new DummyTaskRunner());
- dummy_task_runner_handle.reset(
- new base::ThreadTaskRunnerHandle(dummy_task_runner));
}
blink::initialize(this);