| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 227 |
| 228 TEST_F(EndToEndAsyncTest, TestSignal) { | 228 TEST_F(EndToEndAsyncTest, TestSignal) { |
| 229 const char kMessage[] = "hello, world"; | 229 const char kMessage[] = "hello, world"; |
| 230 // Send the test signal from the exported object. | 230 // Send the test signal from the exported object. |
| 231 test_service_->SendTestSignal(kMessage); | 231 test_service_->SendTestSignal(kMessage); |
| 232 // Receive the signal with the object proxy. The signal is handled in | 232 // Receive the signal with the object proxy. The signal is handled in |
| 233 // EndToEndAsyncTest::OnTestSignal() in the main thread. | 233 // EndToEndAsyncTest::OnTestSignal() in the main thread. |
| 234 WaitForTestSignal(); | 234 WaitForTestSignal(); |
| 235 ASSERT_EQ(kMessage, test_signal_string_); | 235 ASSERT_EQ(kMessage, test_signal_string_); |
| 236 } | 236 } |
| 237 |
| 238 TEST_F(EndToEndAsyncTest, TestSignalFromRoot) { |
| 239 const char kMessage[] = "hello, world"; |
| 240 // Send the test signal from the root object path, to see if we can |
| 241 // handle signals sent from "/", like dbus-send does. |
| 242 test_service_->SendTestSignalFromRoot(kMessage); |
| 243 // Receive the signal with the object proxy. The signal is handled in |
| 244 // EndToEndAsyncTest::OnTestSignal() in the main thread. |
| 245 WaitForTestSignal(); |
| 246 ASSERT_EQ(kMessage, test_signal_string_); |
| 247 } |
| OLD | NEW |