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

Side by Side Diff: dbus/property_unittest.cc

Issue 1559873005: dbus: Use randomly generated string as a TestService's service name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « dbus/object_proxy_unittest.cc ('k') | dbus/signal_sender_verification_unittest.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 "dbus/property.h" 5 #include "dbus/property.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 ASSERT_TRUE(test_service_->WaitUntilServiceIsStarted()); 70 ASSERT_TRUE(test_service_->WaitUntilServiceIsStarted());
71 ASSERT_TRUE(test_service_->HasDBusThread()); 71 ASSERT_TRUE(test_service_->HasDBusThread());
72 72
73 // Create the client, using the D-Bus thread. 73 // Create the client, using the D-Bus thread.
74 Bus::Options bus_options; 74 Bus::Options bus_options;
75 bus_options.bus_type = Bus::SESSION; 75 bus_options.bus_type = Bus::SESSION;
76 bus_options.connection_type = Bus::PRIVATE; 76 bus_options.connection_type = Bus::PRIVATE;
77 bus_options.dbus_task_runner = dbus_thread_->task_runner(); 77 bus_options.dbus_task_runner = dbus_thread_->task_runner();
78 bus_ = new Bus(bus_options); 78 bus_ = new Bus(bus_options);
79 object_proxy_ = bus_->GetObjectProxy( 79 object_proxy_ = bus_->GetObjectProxy(
80 "org.chromium.TestService", 80 test_service_->service_name(),
81 ObjectPath("/org/chromium/TestObject")); 81 ObjectPath("/org/chromium/TestObject"));
82 ASSERT_TRUE(bus_->HasDBusThread()); 82 ASSERT_TRUE(bus_->HasDBusThread());
83 83
84 // Create the properties structure 84 // Create the properties structure
85 properties_.reset(new Properties( 85 properties_.reset(new Properties(
86 object_proxy_, 86 object_proxy_,
87 base::Bind(&PropertyTest::OnPropertyChanged, 87 base::Bind(&PropertyTest::OnPropertyChanged,
88 base::Unretained(this)))); 88 base::Unretained(this))));
89 properties_->ConnectSignals(); 89 properties_->ConnectSignals();
90 properties_->GetAll(); 90 properties_->GetAll();
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 Property<std::vector<std::pair<std::vector<uint8_t>, uint16_t>>> ip_list; 425 Property<std::vector<std::pair<std::vector<uint8_t>, uint16_t>>> ip_list;
426 ip_list.ReplaceSetValueForTesting(test_list); 426 ip_list.ReplaceSetValueForTesting(test_list);
427 ip_list.AppendSetValueToWriter(&writer); 427 ip_list.AppendSetValueToWriter(&writer);
428 428
429 MessageReader reader(message.get()); 429 MessageReader reader(message.get());
430 EXPECT_TRUE(ip_list.PopValueFromReader(&reader)); 430 EXPECT_TRUE(ip_list.PopValueFromReader(&reader));
431 EXPECT_EQ(test_list, ip_list.value()); 431 EXPECT_EQ(test_list, ip_list.value());
432 } 432 }
433 433
434 } // namespace dbus 434 } // namespace dbus
OLDNEW
« no previous file with comments | « dbus/object_proxy_unittest.cc ('k') | dbus/signal_sender_verification_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698