Index: content/browser/browser_thread_unittest.cc |
diff --git a/content/browser/browser_thread_unittest.cc b/content/browser/browser_thread_unittest.cc |
index 59ec5f7057a078bed8b931c0f4a4be15f3cb3c26..7bfe039f90d5d50ff2bedd9e8700363dc12708aa 100644 |
--- a/content/browser/browser_thread_unittest.cc |
+++ b/content/browser/browser_thread_unittest.cc |
@@ -41,21 +41,6 @@ class BrowserThreadTest : public testing::Test { |
static void DoNothing() { |
} |
- class DummyTask : public Task { |
- public: |
- explicit DummyTask(bool* deleted) : deleted_(deleted) { } |
- ~DummyTask() { |
- *deleted_ = true; |
- } |
- |
- void Run() { |
- CHECK(false); |
- } |
- |
- private: |
- bool* deleted_; |
- }; |
- |
class DeletedOnFile |
: public base::RefCountedThreadSafe< |
DeletedOnFile, BrowserThread::DeleteOnFileThread> { |
@@ -101,14 +86,6 @@ TEST_F(BrowserThreadTest, Release) { |
MessageLoop::current()->Run(); |
} |
-TEST_F(BrowserThreadTest, TaskToNonExistentThreadIsDeleted) { |
- bool deleted = false; |
- BrowserThread::PostTask( |
- BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, |
- new DummyTask(&deleted)); |
- EXPECT_TRUE(deleted); |
-} |
- |
TEST_F(BrowserThreadTest, ReleasedOnCorrectThread) { |
{ |
scoped_refptr<DeletedOnFile> test( |
@@ -148,42 +125,4 @@ TEST_F(BrowserThreadTest, PostTaskAndReply) { |
MessageLoop::current()->Run(); |
} |
- |
-TEST_F(BrowserThreadTest, TaskToNonExistentThreadIsDeletedViaMessageLoopProxy) { |
- bool deleted = false; |
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy = |
- BrowserThread::GetMessageLoopProxyForThread( |
- BrowserThread::WEBKIT_DEPRECATED); |
- message_loop_proxy->PostTask(FROM_HERE, new DummyTask(&deleted)); |
- EXPECT_TRUE(deleted); |
-} |
- |
-TEST_F(BrowserThreadTest, PostTaskViaMessageLoopProxyAfterThreadExits) { |
- scoped_ptr<BrowserThreadImpl> io_thread( |
- new BrowserThreadImpl(BrowserThread::IO)); |
- io_thread->Start(); |
- io_thread->Stop(); |
- |
- bool deleted = false; |
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy = |
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
- bool ret = message_loop_proxy->PostTask(FROM_HERE, new DummyTask(&deleted)); |
- EXPECT_FALSE(ret); |
- EXPECT_TRUE(deleted); |
-} |
- |
-TEST_F(BrowserThreadTest, PostTaskViaMessageLoopProxyAfterThreadIsDeleted) { |
- { |
- scoped_ptr<BrowserThreadImpl> io_thread( |
- new BrowserThreadImpl(BrowserThread::IO)); |
- io_thread->Start(); |
- } |
- bool deleted = false; |
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy = |
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
- bool ret = message_loop_proxy->PostTask(FROM_HERE, new DummyTask(&deleted)); |
- EXPECT_FALSE(ret); |
- EXPECT_TRUE(deleted); |
-} |
- |
} |