Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: dbus/end_to_end_async_unittest.cc

Issue 9508005: dbus: verify object path of incoming signals (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dbus/object_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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.
OLDNEW
« no previous file with comments | « no previous file | dbus/object_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698