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

Unified Diff: base/test/thread_test_helper.cc

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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 | « base/test/thread_test_helper.h ('k') | base/test/trace_event_analyzer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/thread_test_helper.cc
diff --git a/base/test/thread_test_helper.cc b/base/test/thread_test_helper.cc
deleted file mode 100644
index 6a12190898fab773d9c481df7b9b65ad20a0236f..0000000000000000000000000000000000000000
--- a/base/test/thread_test_helper.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/test/thread_test_helper.h"
-
-#include "base/bind.h"
-#include "base/location.h"
-#include "base/threading/thread_restrictions.h"
-
-namespace base {
-
-ThreadTestHelper::ThreadTestHelper(
- scoped_refptr<SingleThreadTaskRunner> target_thread)
- : test_result_(false),
- target_thread_(target_thread.Pass()),
- done_event_(false, false) {
-}
-
-bool ThreadTestHelper::Run() {
- if (!target_thread_->PostTask(
- FROM_HERE, base::Bind(&ThreadTestHelper::RunInThread, this))) {
- return false;
- }
- base::ThreadRestrictions::ScopedAllowWait allow_wait;
- done_event_.Wait();
- return test_result_;
-}
-
-void ThreadTestHelper::RunTest() { set_test_result(true); }
-
-ThreadTestHelper::~ThreadTestHelper() {}
-
-void ThreadTestHelper::RunInThread() {
- RunTest();
- done_event_.Signal();
-}
-
-} // namespace base
« no previous file with comments | « base/test/thread_test_helper.h ('k') | base/test/trace_event_analyzer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698