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

Unified Diff: base/message_loop_proxy_impl_unittest.cc

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 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/observer_list_threadsafe.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 d635acb1a7c4b38d26206fcc6ccbe965bf06d3f1..1707b225463c33a5a337893ccf119562b15943f9 100644
--- a/base/message_loop_proxy_impl_unittest.cc
+++ b/base/message_loop_proxy_impl_unittest.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
+#include "base/message_loop_proxy.h"
#include "base/threading/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -25,10 +26,14 @@ class MessageLoopProxyImplTest : public testing::Test {
void AssertOnIOThread() const {
ASSERT_TRUE(io_thread_->message_loop_proxy()->BelongsToCurrentThread());
+ ASSERT_EQ(io_thread_->message_loop_proxy(),
+ base::MessageLoopProxy::current());
}
void AssertOnFileThread() const {
ASSERT_TRUE(file_thread_->message_loop_proxy()->BelongsToCurrentThread());
+ ASSERT_EQ(file_thread_->message_loop_proxy(),
+ base::MessageLoopProxy::current());
}
protected:
« no previous file with comments | « base/message_loop_proxy_impl.cc ('k') | base/observer_list_threadsafe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698