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 #include "chromeos/dbus/ibus/ibus_property.h" | 4 #include "chromeos/dbus/ibus/ibus_property.h" |
5 | 5 |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "chromeos/dbus/ibus/ibus_object.h" | 12 #include "chromeos/dbus/ibus/ibus_object.h" |
13 #include "dbus/message.h" | 13 #include "dbus/message.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace chromeos { | 17 namespace chromeos { |
18 namespace { | 18 namespace { |
19 | 19 |
20 const char kSampleKey[] = "Key"; | 20 const char kSampleKey[] = "Key"; |
21 const IBusProperty::IBusPropertyType kSampleType = | 21 const IBusProperty::IBusPropertyType kSampleType = |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 EXPECT_TRUE(CheckProperty("Root_", target_property)); | 110 EXPECT_TRUE(CheckProperty("Root_", target_property)); |
111 const IBusPropertyList& sub_properties = target_property.sub_properties(); | 111 const IBusPropertyList& sub_properties = target_property.sub_properties(); |
112 ASSERT_EQ(kSubPropertyCount, sub_properties.size()); | 112 ASSERT_EQ(kSubPropertyCount, sub_properties.size()); |
113 for (size_t i = 0; i < kSubPropertyCount; ++i) { | 113 for (size_t i = 0; i < kSubPropertyCount; ++i) { |
114 const std::string prefix = "Sub" + base::Uint64ToString(i); | 114 const std::string prefix = "Sub" + base::Uint64ToString(i); |
115 EXPECT_TRUE(CheckProperty(prefix, *(sub_properties[i]))); | 115 EXPECT_TRUE(CheckProperty(prefix, *(sub_properties[i]))); |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 } // namespace chromeos | 119 } // namespace chromeos |
OLD | NEW |