| OLD | NEW |
| 1 // Copyright 2014 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 | 4 |
| 5 #include "ash/ime/candidate_window_view.h" | 5 #include "ui/chromeos/ime/candidate_window_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "ash/ime/candidate_view.h" | |
| 10 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "ui/chromeos/ime/candidate_view.h" |
| 13 #include "ui/views/test/views_test_base.h" | 13 #include "ui/views/test/views_test_base.h" |
| 14 #include "ui/views/widget/widget.h" | 14 #include "ui/views/widget/widget.h" |
| 15 | 15 |
| 16 namespace ash { | 16 namespace ui { |
| 17 namespace ime { | 17 namespace ime { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 const char* kSampleCandidate[] = { | 20 const char* kSampleCandidate[] = { |
| 21 "Sample Candidate 1", | 21 "Sample Candidate 1", |
| 22 "Sample Candidate 2", | 22 "Sample Candidate 2", |
| 23 "Sample Candidate 3" | 23 "Sample Candidate 3" |
| 24 }; | 24 }; |
| 25 const char* kSampleAnnotation[] = { | 25 const char* kSampleAnnotation[] = { |
| 26 "Sample Annotation 1", | 26 "Sample Annotation 1", |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 ASSERT_EQ(3UL, GetCandidatesSize()); | 378 ASSERT_EQ(3UL, GetCandidatesSize()); |
| 379 // Check the selected index is invalidated. | 379 // Check the selected index is invalidated. |
| 380 EXPECT_EQ(-1, selected_candidate_index_in_page()); | 380 EXPECT_EQ(-1, selected_candidate_index_in_page()); |
| 381 EXPECT_EQ(before_height, GetCandidateAt(0)->GetContentsBounds().height()); | 381 EXPECT_EQ(before_height, GetCandidateAt(0)->GetContentsBounds().height()); |
| 382 // Checks all entry have same row height. | 382 // Checks all entry have same row height. |
| 383 for (size_t i = 1; i < GetCandidatesSize(); ++i) | 383 for (size_t i = 1; i < GetCandidatesSize(); ++i) |
| 384 EXPECT_EQ(before_height, GetCandidateAt(i)->GetContentsBounds().height()); | 384 EXPECT_EQ(before_height, GetCandidateAt(i)->GetContentsBounds().height()); |
| 385 } | 385 } |
| 386 | 386 |
| 387 } // namespace ime | 387 } // namespace ime |
| 388 } // namespace ash | 388 } // namespace ui |
| OLD | NEW |