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

Unified Diff: base/test/thread_test_helper.cc

Issue 7239023: Move the thread test helper to base/test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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') | chrome/browser/browsing_data_local_storage_helper_browsertest.cc » ('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/chrome/test/thread_test_helper.cc b/base/test/thread_test_helper.cc
similarity index 69%
rename from chrome/test/thread_test_helper.cc
rename to base/test/thread_test_helper.cc
index 6714310b80323e9b8bf5fb3782724a79ff24c2f1..e79ca92698e092ac0d16e161ac7eb1f07d665d6b 100644
--- a/chrome/test/thread_test_helper.cc
+++ b/base/test/thread_test_helper.cc
@@ -2,16 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/test/thread_test_helper.h"
+#include "base/test/thread_test_helper.h"
-ThreadTestHelper::ThreadTestHelper(BrowserThread::ID thread_id)
+namespace base {
+
+ThreadTestHelper::ThreadTestHelper(MessageLoopProxy* target_thread)
: test_result_(false),
- thread_id_(thread_id),
+ target_thread_(target_thread),
done_event_(false, false) {
}
bool ThreadTestHelper::Run() {
- if (!BrowserThread::PostTask(thread_id_, FROM_HERE, NewRunnableMethod(
+ if (!target_thread_->PostTask(FROM_HERE, NewRunnableMethod(
this, &ThreadTestHelper::RunInThread))) {
return false;
}
@@ -27,3 +29,5 @@ void ThreadTestHelper::RunInThread() {
RunTest();
done_event_.Signal();
}
+
+} // namespace base
« no previous file with comments | « base/test/thread_test_helper.h ('k') | chrome/browser/browsing_data_local_storage_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698