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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 dbus::ObjectProxy::EmptyResponseCallback()); | 278 dbus::ObjectProxy::EmptyResponseCallback()); |
279 // Post a delayed task to quit the message loop. | 279 // Post a delayed task to quit the message loop. |
280 message_loop_.PostDelayedTask(FROM_HERE, | 280 message_loop_.PostDelayedTask(FROM_HERE, |
281 MessageLoop::QuitClosure(), | 281 MessageLoop::QuitClosure(), |
282 TestTimeouts::tiny_timeout_ms()); | 282 TestTimeouts::tiny_timeout_ms()); |
283 message_loop_.Run(); | 283 message_loop_.Run(); |
284 // We cannot tell if the empty callback is called, but at least we can | 284 // We cannot tell if the empty callback is called, but at least we can |
285 // check if the test does not crash. | 285 // check if the test does not crash. |
286 } | 286 } |
287 | 287 |
288 TEST_F(EndToEndAsyncTest, TestSignal) { | 288 // Flaky, http://crbug.com/107301 |
| 289 TEST_F(EndToEndAsyncTest, FLAKY_TestSignal) { |
289 const char kMessage[] = "hello, world"; | 290 const char kMessage[] = "hello, world"; |
290 // Send the test signal from the exported object. | 291 // Send the test signal from the exported object. |
291 test_service_->SendTestSignal(kMessage); | 292 test_service_->SendTestSignal(kMessage); |
292 // Receive the signal with the object proxy. The signal is handled in | 293 // Receive the signal with the object proxy. The signal is handled in |
293 // EndToEndAsyncTest::OnTestSignal() in the main thread. | 294 // EndToEndAsyncTest::OnTestSignal() in the main thread. |
294 WaitForTestSignal(); | 295 WaitForTestSignal(); |
295 ASSERT_EQ(kMessage, test_signal_string_); | 296 ASSERT_EQ(kMessage, test_signal_string_); |
296 } | 297 } |
297 | 298 |
298 // Flaky, http://crbug.com/106796 | 299 // Flaky, http://crbug.com/106796 |
299 TEST_F(EndToEndAsyncTest, FLAKY_TestSignalFromRoot) { | 300 TEST_F(EndToEndAsyncTest, FLAKY_TestSignalFromRoot) { |
300 const char kMessage[] = "hello, world"; | 301 const char kMessage[] = "hello, world"; |
301 // Send the test signal from the root object path, to see if we can | 302 // Send the test signal from the root object path, to see if we can |
302 // handle signals sent from "/", like dbus-send does. | 303 // handle signals sent from "/", like dbus-send does. |
303 test_service_->SendTestSignalFromRoot(kMessage); | 304 test_service_->SendTestSignalFromRoot(kMessage); |
304 // Receive the signal with the object proxy. The signal is handled in | 305 // Receive the signal with the object proxy. The signal is handled in |
305 // EndToEndAsyncTest::OnTestSignal() in the main thread. | 306 // EndToEndAsyncTest::OnTestSignal() in the main thread. |
306 WaitForTestSignal(); | 307 WaitForTestSignal(); |
307 ASSERT_EQ(kMessage, test_signal_string_); | 308 ASSERT_EQ(kMessage, test_signal_string_); |
308 } | 309 } |
OLD | NEW |