| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifdef HAVE_DBUS_GLIB | 11 #ifdef HAVE_DBUS_GLIB |
| 12 | 12 |
| 13 #include "webrtc/base/dbus.h" | 13 #include "webrtc/base/dbus.h" |
| 14 #include "webrtc/base/gunit.h" | 14 #include "webrtc/base/gunit.h" |
| 15 #include "webrtc/base/thread.h" | 15 #include "webrtc/base/thread.h" |
| 16 | 16 |
| 17 namespace rtc { | 17 namespace rtc { |
| 18 | 18 |
| 19 #define SIG_NAME "NameAcquired" | 19 #define SIG_NAME "NameAcquired" |
| 20 | 20 |
| 21 static const uint32 kTimeoutMs = 5000U; | 21 static const uint32_t kTimeoutMs = 5000U; |
| 22 | 22 |
| 23 class DBusSigFilterTest : public DBusSigFilter { | 23 class DBusSigFilterTest : public DBusSigFilter { |
| 24 public: | 24 public: |
| 25 // DBusSigFilterTest listens on DBus service itself for "NameAcquired" signal. | 25 // DBusSigFilterTest listens on DBus service itself for "NameAcquired" signal. |
| 26 // This signal should be received when the application connects to DBus | 26 // This signal should be received when the application connects to DBus |
| 27 // service and gains ownership of a name. | 27 // service and gains ownership of a name. |
| 28 // http://dbus.freedesktop.org/doc/dbus-specification.html | 28 // http://dbus.freedesktop.org/doc/dbus-specification.html |
| 29 DBusSigFilterTest() | 29 DBusSigFilterTest() |
| 30 : DBusSigFilter(GetFilter()), | 30 : DBusSigFilter(GetFilter()), |
| 31 message_received_(false) { | 31 message_received_(false) { |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 (DBUS_TYPE "='" DBUS_SIGNAL "'," DBUS_PATH "='p'," | 223 (DBUS_TYPE "='" DBUS_SIGNAL "'," DBUS_PATH "='p'," |
| 224 DBUS_INTERFACE "='i'")); | 224 DBUS_INTERFACE "='i'")); |
| 225 EXPECT_EQ(DBusSigFilter::BuildFilterString("p","i","m"), | 225 EXPECT_EQ(DBusSigFilter::BuildFilterString("p","i","m"), |
| 226 (DBUS_TYPE "='" DBUS_SIGNAL "'," DBUS_PATH "='p'," | 226 (DBUS_TYPE "='" DBUS_SIGNAL "'," DBUS_PATH "='p'," |
| 227 DBUS_INTERFACE "='i'," DBUS_MEMBER "='m'")); | 227 DBUS_INTERFACE "='i'," DBUS_MEMBER "='m'")); |
| 228 } | 228 } |
| 229 | 229 |
| 230 } // namespace rtc | 230 } // namespace rtc |
| 231 | 231 |
| 232 #endif // HAVE_DBUS_GLIB | 232 #endif // HAVE_DBUS_GLIB |
| OLD | NEW |