// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chromeos/dbus/introspectable_client.h" #include "testing/gtest/include/gtest/gtest.h" namespace { const char kXmlData[] = "\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" ""; } // namespace namespace chromeos { TEST(IntrospectableClientTest, GetInterfacesFromIntrospectResult) { std::vector interfaces = IntrospectableClient::GetInterfacesFromIntrospectResult(kXmlData); ASSERT_EQ(3U, interfaces.size()); EXPECT_EQ("org.freedesktop.DBus.Introspectable", interfaces[0]); EXPECT_EQ("org.bluez.Device", interfaces[1]); EXPECT_EQ("org.bluez.Input", interfaces[2]); } } // namespace chromeos