Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 | 292 |
| 293 TEST_F(EndToEndAsyncTest, TestSignal) { | 293 TEST_F(EndToEndAsyncTest, TestSignal) { |
| 294 const char kMessage[] = "hello, world"; | 294 const char kMessage[] = "hello, world"; |
| 295 // Send the test signal from the exported object. | 295 // Send the test signal from the exported object. |
| 296 test_service_->SendTestSignal(kMessage); | 296 test_service_->SendTestSignal(kMessage); |
| 297 // Receive the signal with the object proxy. The signal is handled in | 297 // Receive the signal with the object proxy. The signal is handled in |
| 298 // EndToEndAsyncTest::OnTestSignal() in the main thread. | 298 // EndToEndAsyncTest::OnTestSignal() in the main thread. |
| 299 WaitForTestSignal(); | 299 WaitForTestSignal(); |
| 300 ASSERT_EQ(kMessage, test_signal_string_); | 300 ASSERT_EQ(kMessage, test_signal_string_); |
| 301 } | 301 } |
| 302 | |
| 303 TEST_F(EndToEndAsyncTest, TestSignalFromRoot) { | |
| 304 const char kMessage[] = "hello, world"; | |
| 305 // Send the test signal from the root object path, to see if we can | |
| 306 // handle signals sent from "/", like dbus-send does. | |
| 307 test_service_->SendTestSignalFromRoot(kMessage); | |
| 308 // Receive the signal with the object proxy. The signal is handled in | |
| 309 // EndToEndAsyncTest::OnTestSignal() in the main thread. | |
| 310 WaitForTestSignal(); | |
| 311 ASSERT_EQ(kMessage, test_signal_string_); | |
| 312 } | |
|
satorux1
2012/02/29 06:18:24
Rather than removing it, can you write a test to m
keybuk
2012/03/01 00:10:45
Done.
| |
| OLD | NEW |