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 "chrome/browser/chromeos/dbus/introspect_util.h" | 5 #include "chromeos/dbus/introspectable_client.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
11 const char kXmlData[] = | 11 const char kXmlData[] = |
12 "<!DOCTYPE node PUBLIC " | 12 "<!DOCTYPE node PUBLIC " |
13 "\"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\" " | 13 "\"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\" " |
14 "\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n" | 14 "\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n" |
15 "<node>\n" | 15 "<node>\n" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 " <arg type=\"s\"/>\n" | 48 " <arg type=\"s\"/>\n" |
49 " <arg type=\"v\"/>\n" | 49 " <arg type=\"v\"/>\n" |
50 " </signal>\n" | 50 " </signal>\n" |
51 " </interface>\n" | 51 " </interface>\n" |
52 "</node>"; | 52 "</node>"; |
53 | 53 |
54 } // namespace | 54 } // namespace |
55 | 55 |
56 namespace chromeos { | 56 namespace chromeos { |
57 | 57 |
58 TEST(IntrospectUtilTest, GetInterfacesFromIntrospectResult) { | 58 TEST(IntrospectableClientTest, GetInterfacesFromIntrospectResult) { |
59 std::vector<std::string> interfaces = | 59 std::vector<std::string> interfaces = |
60 GetInterfacesFromIntrospectResult(kXmlData); | 60 IntrospectableClient::GetInterfacesFromIntrospectResult(kXmlData); |
61 | 61 |
62 ASSERT_EQ(3U, interfaces.size()); | 62 ASSERT_EQ(3U, interfaces.size()); |
63 EXPECT_EQ("org.freedesktop.DBus.Introspectable", interfaces[0]); | 63 EXPECT_EQ("org.freedesktop.DBus.Introspectable", interfaces[0]); |
64 EXPECT_EQ("org.bluez.Device", interfaces[1]); | 64 EXPECT_EQ("org.bluez.Device", interfaces[1]); |
65 EXPECT_EQ("org.bluez.Input", interfaces[2]); | 65 EXPECT_EQ("org.bluez.Input", interfaces[2]); |
66 } | 66 } |
67 | 67 |
68 } // namespace chromeos | 68 } // namespace chromeos |
OLD | NEW |