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

Unified Diff: base/message_loop/message_loop_unittest.cc

Issue 17567007: Made MessagePump a non-thread safe class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved incoming_queue_ to MessageLoopProxyImpl Created 7 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
Index: base/message_loop/message_loop_unittest.cc
diff --git a/base/message_loop/message_loop_unittest.cc b/base/message_loop/message_loop_unittest.cc
index 504c8e30b6b72c7093ea211469c82306dbe5eeba..55e7ca7726eb30f0fd3e57fe14aaf7e3eed99a63 100644
--- a/base/message_loop/message_loop_unittest.cc
+++ b/base/message_loop/message_loop_unittest.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
+#include "base/message_loop/message_loop_proxy_impl.h"
#include "base/pending_task.h"
#include "base/posix/eintr_wrapper.h"
#include "base/run_loop.h"
@@ -32,10 +33,10 @@ class MessageLoopLockTest {
WaitableEvent* caller_wait,
WaitableEvent* caller_signal) {
- loop->incoming_queue_lock_.Acquire();
+ loop->message_loop_proxy_->incoming_queue_lock_.Acquire();
caller_wait->Signal();
caller_signal->Wait();
- loop->incoming_queue_lock_.Release();
+ loop->message_loop_proxy_->incoming_queue_lock_.Release();
}
};
@@ -1895,20 +1896,20 @@ TEST(MessageLoopTest, HighResolutionTimer) {
const TimeDelta kFastTimer = TimeDelta::FromMilliseconds(5);
const TimeDelta kSlowTimer = TimeDelta::FromMilliseconds(100);
- EXPECT_FALSE(loop.high_resolution_timers_enabled());
+ EXPECT_FALSE(loop.IsHishResolutionTimersEnabledForTest());
// Post a fast task to enable the high resolution timers.
loop.PostDelayedTask(FROM_HERE, Bind(&PostNTasksThenQuit, 1),
kFastTimer);
loop.Run();
- EXPECT_TRUE(loop.high_resolution_timers_enabled());
+ EXPECT_TRUE(loop.IsHishResolutionTimersEnabledForTest());
// Post a slow task and verify high resolution timers
// are still enabled.
loop.PostDelayedTask(FROM_HERE, Bind(&PostNTasksThenQuit, 1),
kSlowTimer);
loop.Run();
- EXPECT_TRUE(loop.high_resolution_timers_enabled());
+ EXPECT_TRUE(loop.IsHishResolutionTimersEnabledForTest());
// Wait for a while so that high-resolution mode elapses.
PlatformThread::Sleep(TimeDelta::FromMilliseconds(
@@ -1918,7 +1919,7 @@ TEST(MessageLoopTest, HighResolutionTimer) {
loop.PostDelayedTask(FROM_HERE, Bind(&PostNTasksThenQuit, 1),
kSlowTimer);
loop.Run();
- EXPECT_FALSE(loop.high_resolution_timers_enabled());
+ EXPECT_FALSE(loop.IsHishResolutionTimersEnabledForTest());
}
#endif // defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698