| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |