OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // TODO(nona): Add more tests. | 4 // TODO(nona): Add more tests. |
5 | 5 |
6 #include "chromeos/ime/candidate_window.h" | 6 #include "ui/base/ime/candidate_window.h" |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace ui { |
16 namespace input_method { | |
17 | 16 |
18 TEST(CandidateWindow, IsEqualTest) { | 17 TEST(CandidateWindow, IsEqualTest) { |
19 CandidateWindow cw1; | 18 CandidateWindow cw1; |
20 CandidateWindow cw2; | 19 CandidateWindow cw2; |
21 | 20 |
22 const char kSampleString1[] = "Sample 1"; | 21 const char kSampleString1[] = "Sample 1"; |
23 const char kSampleString2[] = "Sample 2"; | 22 const char kSampleString2[] = "Sample 2"; |
24 | 23 |
25 EXPECT_TRUE(cw1.IsEqual(cw2)); | 24 EXPECT_TRUE(cw1.IsEqual(cw2)); |
26 EXPECT_TRUE(cw2.IsEqual(cw1)); | 25 EXPECT_TRUE(cw2.IsEqual(cw1)); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 entry.label = kSampleString; | 128 entry.label = kSampleString; |
130 entry.annotation = kSampleString; | 129 entry.annotation = kSampleString; |
131 entry.description_title = kSampleString; | 130 entry.description_title = kSampleString; |
132 entry.description_body = kSampleString; | 131 entry.description_body = kSampleString; |
133 cw1.mutable_candidates()->push_back(entry); | 132 cw1.mutable_candidates()->push_back(entry); |
134 | 133 |
135 cw2.CopyFrom(cw1); | 134 cw2.CopyFrom(cw1); |
136 EXPECT_TRUE(cw1.IsEqual(cw2)); | 135 EXPECT_TRUE(cw1.IsEqual(cw2)); |
137 } | 136 } |
138 | 137 |
139 } // namespace input_method | 138 } // namespace ui |
140 } // namespace chromeos | |
OLD | NEW |