Commit 418d948a authored by thomasvl@chromium.org's avatar thomasvl@chromium.org

Revert 72645 - Multi process notifications on linux (dbus)

BUG=none
TEST=unittests

Review URL: http://codereview.chromium.org/6320011

TBR=garykac@chromium.org
Review URL: http://codereview.chromium.org/6246020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72650 0039d316-1c4b-4281-b951-d872f2087c98
parent ae3522e8
......@@ -15,9 +15,9 @@
#include "base/time.h"
#include "testing/multiprocess_func_list.h"
#if defined(OS_POSIX)
// TODO(ajwong): Remove defined(OS_POSIX) restriction once
// MultiProcessNotification is implemented on Win.
#if defined(OS_MACOSX)
// TODO(dmaclach): Remove defined(OS_MACOSX) once
// MultiProcessNotification is implemented on Win/Linux.
namespace {
......@@ -244,46 +244,33 @@ void MultiProcessNotificationTest::CrossPostNotificationTest(
TEST_F(MultiProcessNotificationTest, BasicCreationTest) {
QuitterDelegate quitter;
MessageLoop* message_loop = IOMessageLoop();
multi_process_notification::Listener profile_listener(
"BasicCreationTest", multi_process_notification::ProfileDomain, &quitter);
ASSERT_TRUE(profile_listener.Start(message_loop));
SpinRunLoop(TestTimeouts::action_max_timeout_ms());
ASSERT_TRUE(quitter.WasStartedReceived());
multi_process_notification::Listener local_listener(
"BasicCreationTest", multi_process_notification::UserDomain, &quitter);
MessageLoop* message_loop = IOMessageLoop();
ASSERT_TRUE(local_listener.Start(message_loop));
SpinRunLoop(TestTimeouts::action_max_timeout_ms());
ASSERT_TRUE(quitter.WasStartedReceived());
multi_process_notification::Listener system_listener(
"BasicCreationTest", multi_process_notification::SystemDomain, &quitter);
ASSERT_TRUE(system_listener.Start(message_loop));
SpinRunLoop(TestTimeouts::action_max_timeout_ms());
ASSERT_TRUE(quitter.WasStartedReceived());
}
TEST_F(MultiProcessNotificationTest, ListenOnNonIoThread) {
QuitterDelegate quitter;
multi_process_notification::Listener local_listener(
"ListenOnNonIoThread", multi_process_notification::UserDomain, &quitter);
multi_process_notification::Listener local_listener2(
"BasicCreationTest", multi_process_notification::UserDomain, &quitter);
// Should fail because current message loop should not be an IOMessageLoop.
ASSERT_FALSE(local_listener.Start(MessageLoop::current()));
ASSERT_FALSE(local_listener2.Start(MessageLoop::current()));
}
TEST_F(MultiProcessNotificationTest, PostInProcessNotification) {
std::string local_notification("QuitLocalNotification");
QuitterDelegate quitter;
MessageLoop* message_loop = IOMessageLoop();
multi_process_notification::Listener listener(
local_notification, multi_process_notification::UserDomain, &quitter);
MessageLoop* message_loop = IOMessageLoop();
ASSERT_TRUE(listener.Start(message_loop));
SpinRunLoop(TestTimeouts::action_max_timeout_ms());
ASSERT_TRUE(quitter.WasStartedReceived());
ASSERT_TRUE(multi_process_notification::Post(
local_notification, multi_process_notification::UserDomain));
SpinRunLoop(TestTimeouts::action_max_timeout_ms());
......@@ -364,4 +351,4 @@ MULTIPROCESS_TEST_MAIN(MultiProcessSystemNotificationMain) {
return MultiProcessNotificationMain(multi_process_notification::SystemDomain);
}
#endif // defined(OS_POSIX)
#endif // defined(OS_MACOSX)
......@@ -393,7 +393,6 @@
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'dependencies': [
'../build/linux/system.gyp:dbus-glib',
'../build/linux/system.gyp:gtk',
],
'export_dependent_settings': [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment