summaryrefslogtreecommitdiffstats
path: root/base/object_watcher_unittest.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-24 19:21:13 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-24 19:21:13 +0000
commit3cdb7af81de506be730544edcfe4a5547f0fdaea (patch)
tree223c1e000b0eccf637565345904fb4055e41c5ea /base/object_watcher_unittest.cc
parent8947da6c7cd943bcb4be80a258e263a84aa15006 (diff)
downloadchromium_src-3cdb7af81de506be730544edcfe4a5547f0fdaea.zip
chromium_src-3cdb7af81de506be730544edcfe4a5547f0fdaea.tar.gz
chromium_src-3cdb7af81de506be730544edcfe4a5547f0fdaea.tar.bz2
Make IPC::SyncChannel not duplicate the underlying MessageLoop implementation by pumping messages on its own. This fixes the problem of windowless plugins not painting on right click, and generally makes this class almost ported, other than using a generic version of events/locks.Through this change I've also cleaned up the class and hopefully made it more understandable.
Review URL: http://codereview.chromium.org/8001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3934 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/object_watcher_unittest.cc')
-rw-r--r--base/object_watcher_unittest.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/base/object_watcher_unittest.cc b/base/object_watcher_unittest.cc
index 3d2b068..06e7284 100644
--- a/base/object_watcher_unittest.cc
+++ b/base/object_watcher_unittest.cc
@@ -34,6 +34,7 @@ void RunTest_BasicSignal(MessageLoop::Type message_loop_type) {
MessageLoop message_loop(message_loop_type);
base::ObjectWatcher watcher;
+ EXPECT_EQ(NULL, watcher.GetWatchedObject());
// A manual-reset event that is not yet signaled.
HANDLE event = CreateEvent(NULL, TRUE, FALSE, NULL);
@@ -41,11 +42,13 @@ void RunTest_BasicSignal(MessageLoop::Type message_loop_type) {
QuitDelegate delegate;
bool ok = watcher.StartWatching(event, &delegate);
EXPECT_TRUE(ok);
+ EXPECT_EQ(event, watcher.GetWatchedObject());
SetEvent(event);
MessageLoop::current()->Run();
+ EXPECT_EQ(NULL, watcher.GetWatchedObject());
CloseHandle(event);
}