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

Unified Diff: content/browser/browser_thread_unittest.cc

Issue 8392042: Split BrowserThread into public API and private implementation, step 1. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 2 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 | « content/browser/browser_thread_impl.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_thread_unittest.cc
diff --git a/content/browser/browser_thread_unittest.cc b/content/browser/browser_thread_unittest.cc
index f5f6e478d029559f8ea229eaa22ee6f303c5ae1a..11cceccfd26ebc6378b137dfae5d59523a5b9875 100644
--- a/content/browser/browser_thread_unittest.cc
+++ b/content/browser/browser_thread_unittest.cc
@@ -6,10 +6,13 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/message_loop_proxy.h"
-#include "content/browser/browser_thread.h"
+#include "content/browser/browser_thread_impl.h"
+#include "content/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
+namespace content {
+
class BrowserThreadTest : public testing::Test {
public:
void Release() const {
@@ -19,8 +22,8 @@ class BrowserThreadTest : public testing::Test {
protected:
virtual void SetUp() {
- ui_thread_.reset(new BrowserThread(BrowserThread::UI));
- file_thread_.reset(new BrowserThread(BrowserThread::FILE));
+ ui_thread_.reset(new BrowserThreadImpl(BrowserThread::UI));
+ file_thread_.reset(new BrowserThreadImpl(BrowserThread::FILE));
ui_thread_->Start();
file_thread_->Start();
}
@@ -79,8 +82,8 @@ class BrowserThreadTest : public testing::Test {
};
private:
- scoped_ptr<BrowserThread> ui_thread_;
- scoped_ptr<BrowserThread> file_thread_;
+ scoped_ptr<BrowserThreadImpl> ui_thread_;
+ scoped_ptr<BrowserThreadImpl> file_thread_;
// It's kind of ugly to make this mutable - solely so we can post the Quit
// Task from Release(). This should be fixed.
mutable MessageLoop loop_;
@@ -156,7 +159,8 @@ TEST_F(BrowserThreadTest, TaskToNonExistentThreadIsDeletedViaMessageLoopProxy) {
}
TEST_F(BrowserThreadTest, PostTaskViaMessageLoopProxyAfterThreadExits) {
- scoped_ptr<BrowserThread> io_thread(new BrowserThread(BrowserThread::IO));
+ scoped_ptr<BrowserThreadImpl> io_thread(
+ new BrowserThreadImpl(BrowserThread::IO));
io_thread->Start();
io_thread->Stop();
@@ -170,7 +174,8 @@ TEST_F(BrowserThreadTest, PostTaskViaMessageLoopProxyAfterThreadExits) {
TEST_F(BrowserThreadTest, PostTaskViaMessageLoopProxyAfterThreadIsDeleted) {
{
- scoped_ptr<BrowserThread> io_thread(new BrowserThread(BrowserThread::IO));
+ scoped_ptr<BrowserThreadImpl> io_thread(
+ new BrowserThreadImpl(BrowserThread::IO));
io_thread->Start();
}
bool deleted = false;
@@ -180,3 +185,5 @@ TEST_F(BrowserThreadTest, PostTaskViaMessageLoopProxyAfterThreadIsDeleted) {
EXPECT_FALSE(ret);
EXPECT_TRUE(deleted);
}
+
+}
« no previous file with comments | « content/browser/browser_thread_impl.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698