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

Unified Diff: base/message_loop_proxy_impl_unittest.cc

Issue 9086002: base::Bind: Remove Task. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style fix. Created 8 years, 12 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/message_loop_proxy_impl.cc ('k') | base/task.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop_proxy_impl_unittest.cc
diff --git a/base/message_loop_proxy_impl_unittest.cc b/base/message_loop_proxy_impl_unittest.cc
index 2935911f1a5c8d157ba2be05cdcebd998ec70d8d..ae03e318ef5c1eba017114a2ddf48da94073cfee 100644
--- a/base/message_loop_proxy_impl_unittest.cc
+++ b/base/message_loop_proxy_impl_unittest.cc
@@ -58,21 +58,6 @@ class MessageLoopProxyImplTest : public testing::Test {
FAIL() << "Callback Should not get executed.";
}
- class DummyTask : public Task {
- public:
- explicit DummyTask(bool* deleted) : deleted_(deleted) { }
- ~DummyTask() {
- *deleted_ = true;
- }
-
- void Run() {
- FAIL();
- }
-
- private:
- bool* deleted_;
- };
-
class DeletedOnFile {
public:
explicit DeletedOnFile(MessageLoopProxyImplTest* test) : test_(test) {}
@@ -105,35 +90,6 @@ TEST_F(MessageLoopProxyImplTest, Delete) {
MessageLoop::current()->Run();
}
-TEST_F(MessageLoopProxyImplTest, LegacyPostTaskAfterThreadExits) {
- scoped_ptr<base::Thread> test_thread(
- new base::Thread("MessageLoopProxyImplTest_Dummy"));
- test_thread->Start();
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy =
- test_thread->message_loop_proxy();
- test_thread->Stop();
-
- bool deleted = false;
- bool ret = message_loop_proxy->PostTask(
- FROM_HERE, new DummyTask(&deleted));
- EXPECT_FALSE(ret);
- EXPECT_TRUE(deleted);
-}
-
-TEST_F(MessageLoopProxyImplTest, LegacyPostTaskAfterThreadIsDeleted) {
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy;
- {
- scoped_ptr<base::Thread> test_thread(
- new base::Thread("MessageLoopProxyImplTest_Dummy"));
- test_thread->Start();
- message_loop_proxy = test_thread->message_loop_proxy();
- }
- bool deleted = false;
- bool ret = message_loop_proxy->PostTask(FROM_HERE, new DummyTask(&deleted));
- EXPECT_FALSE(ret);
- EXPECT_TRUE(deleted);
-}
-
TEST_F(MessageLoopProxyImplTest, PostTask) {
EXPECT_TRUE(file_thread_->message_loop_proxy()->PostTask(
FROM_HERE, base::Bind(&MessageLoopProxyImplTest::BasicFunction,
« no previous file with comments | « base/message_loop_proxy_impl.cc ('k') | base/task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698