| Index: trunk/src/chrome/browser/chromeos/input_method/candidate_window_view_unittest.cc
|
| ===================================================================
|
| --- trunk/src/chrome/browser/chromeos/input_method/candidate_window_view_unittest.cc (revision 243783)
|
| +++ trunk/src/chrome/browser/chromeos/input_method/candidate_window_view_unittest.cc (working copy)
|
| @@ -39,19 +39,19 @@
|
| };
|
|
|
| void InitCandidateWindow(size_t page_size,
|
| - ui::CandidateWindow* candidate_window) {
|
| + CandidateWindow* candidate_window) {
|
| candidate_window->set_cursor_position(0);
|
| candidate_window->set_page_size(page_size);
|
| candidate_window->mutable_candidates()->clear();
|
| - candidate_window->set_orientation(ui::CandidateWindow::VERTICAL);
|
| + candidate_window->set_orientation(CandidateWindow::VERTICAL);
|
| }
|
|
|
| void InitCandidateWindowWithCandidatesFilled(
|
| size_t page_size,
|
| - ui::CandidateWindow* candidate_window) {
|
| + CandidateWindow* candidate_window) {
|
| InitCandidateWindow(page_size, candidate_window);
|
| for (size_t i = 0; i < page_size; ++i) {
|
| - ui::CandidateWindow::Entry entry;
|
| + CandidateWindow::Entry entry;
|
| entry.value = base::StringPrintf("value %lld",
|
| static_cast<unsigned long long>(i));
|
| entry.label = base::StringPrintf("%lld",
|
| @@ -94,8 +94,7 @@
|
| candidate_window_view_->SelectCandidateAt(index_in_page);
|
| }
|
|
|
| - void MaybeInitializeCandidateViews(
|
| - const ui::CandidateWindow& candidate_window) {
|
| + void MaybeInitializeCandidateViews(const CandidateWindow& candidate_window) {
|
| candidate_window_view_->MaybeInitializeCandidateViews(candidate_window);
|
| }
|
|
|
| @@ -117,7 +116,7 @@
|
|
|
| TEST_F(CandidateWindowViewTest, UpdateCandidatesTest_CursorVisibility) {
|
| // Visible (by default) cursor.
|
| - ui::CandidateWindow candidate_window;
|
| + CandidateWindow candidate_window;
|
| const int candidate_window_size = 9;
|
| InitCandidateWindowWithCandidatesFilled(candidate_window_size,
|
| &candidate_window);
|
| @@ -142,7 +141,7 @@
|
|
|
| TEST_F(CandidateWindowViewTest, SelectCandidateAtTest) {
|
| // Set 9 candidates.
|
| - ui::CandidateWindow candidate_window_large;
|
| + CandidateWindow candidate_window_large;
|
| const int candidate_window_large_size = 9;
|
| InitCandidateWindowWithCandidatesFilled(candidate_window_large_size,
|
| &candidate_window_large);
|
| @@ -153,7 +152,7 @@
|
| SelectCandidateAt(candidate_window_large_size - 1);
|
|
|
| // Reduce the number of candidates to 3.
|
| - ui::CandidateWindow candidate_window_small;
|
| + CandidateWindow candidate_window_small;
|
| const int candidate_window_small_size = 3;
|
| InitCandidateWindowWithCandidatesFilled(candidate_window_small_size,
|
| &candidate_window_small);
|
| @@ -173,7 +172,7 @@
|
| SCOPED_TRACE("candidate_views allocation test");
|
| const size_t kMaxPageSize = 16;
|
| for (size_t i = 1; i < kMaxPageSize; ++i) {
|
| - ui::CandidateWindow candidate_window;
|
| + CandidateWindow candidate_window;
|
| InitCandidateWindow(i, &candidate_window);
|
| candidate_window_view()->UpdateCandidates(candidate_window);
|
| EXPECT_EQ(i, GetCandidatesSize());
|
| @@ -182,12 +181,12 @@
|
| {
|
| SCOPED_TRACE("Empty string for each labels expects empty labels(vertical)");
|
| const size_t kPageSize = 3;
|
| - ui::CandidateWindow candidate_window;
|
| + CandidateWindow candidate_window;
|
| InitCandidateWindow(kPageSize, &candidate_window);
|
|
|
| - candidate_window.set_orientation(ui::CandidateWindow::VERTICAL);
|
| + candidate_window.set_orientation(CandidateWindow::VERTICAL);
|
| for (size_t i = 0; i < kPageSize; ++i) {
|
| - ui::CandidateWindow::Entry entry;
|
| + CandidateWindow::Entry entry;
|
| entry.value = kSampleCandidate[i];
|
| entry.annotation = kSampleAnnotation[i];
|
| entry.description_title = kSampleDescriptionTitle[i];
|
| @@ -208,12 +207,12 @@
|
| SCOPED_TRACE(
|
| "Empty string for each labels expect empty labels(horizontal)");
|
| const size_t kPageSize = 3;
|
| - ui::CandidateWindow candidate_window;
|
| + CandidateWindow candidate_window;
|
| InitCandidateWindow(kPageSize, &candidate_window);
|
|
|
| - candidate_window.set_orientation(ui::CandidateWindow::HORIZONTAL);
|
| + candidate_window.set_orientation(CandidateWindow::HORIZONTAL);
|
| for (size_t i = 0; i < kPageSize; ++i) {
|
| - ui::CandidateWindow::Entry entry;
|
| + CandidateWindow::Entry entry;
|
| entry.value = kSampleCandidate[i];
|
| entry.annotation = kSampleAnnotation[i];
|
| entry.description_title = kSampleDescriptionTitle[i];
|
| @@ -234,12 +233,12 @@
|
| {
|
| SCOPED_TRACE("Vertical customized label case");
|
| const size_t kPageSize = 3;
|
| - ui::CandidateWindow candidate_window;
|
| + CandidateWindow candidate_window;
|
| InitCandidateWindow(kPageSize, &candidate_window);
|
|
|
| - candidate_window.set_orientation(ui::CandidateWindow::VERTICAL);
|
| + candidate_window.set_orientation(CandidateWindow::VERTICAL);
|
| for (size_t i = 0; i < kPageSize; ++i) {
|
| - ui::CandidateWindow::Entry entry;
|
| + CandidateWindow::Entry entry;
|
| entry.value = kSampleCandidate[i];
|
| entry.annotation = kSampleAnnotation[i];
|
| entry.description_title = kSampleDescriptionTitle[i];
|
| @@ -262,12 +261,12 @@
|
| {
|
| SCOPED_TRACE("Horizontal customized label case");
|
| const size_t kPageSize = 3;
|
| - ui::CandidateWindow candidate_window;
|
| + CandidateWindow candidate_window;
|
| InitCandidateWindow(kPageSize, &candidate_window);
|
|
|
| - candidate_window.set_orientation(ui::CandidateWindow::HORIZONTAL);
|
| + candidate_window.set_orientation(CandidateWindow::HORIZONTAL);
|
| for (size_t i = 0; i < kPageSize; ++i) {
|
| - ui::CandidateWindow::Entry entry;
|
| + CandidateWindow::Entry entry;
|
| entry.value = kSampleCandidate[i];
|
| entry.annotation = kSampleAnnotation[i];
|
| entry.description_title = kSampleDescriptionTitle[i];
|
| @@ -291,8 +290,8 @@
|
|
|
| TEST_F(CandidateWindowViewTest, DoNotChangeRowHeightWithLabelSwitchTest) {
|
| const size_t kPageSize = 10;
|
| - ui::CandidateWindow candidate_window;
|
| - ui::CandidateWindow no_shortcut_candidate_window;
|
| + CandidateWindow candidate_window;
|
| + CandidateWindow no_shortcut_candidate_window;
|
|
|
| const char kSampleCandidate1[] = "Sample String 1";
|
| const char kSampleCandidate2[] = "\xE3\x81\x82"; // multi byte string.
|
| @@ -312,10 +311,10 @@
|
| candidate_window.set_cursor_position(0);
|
| candidate_window.set_page_size(3);
|
| candidate_window.mutable_candidates()->clear();
|
| - candidate_window.set_orientation(ui::CandidateWindow::VERTICAL);
|
| + candidate_window.set_orientation(CandidateWindow::VERTICAL);
|
| no_shortcut_candidate_window.CopyFrom(candidate_window);
|
|
|
| - ui::CandidateWindow::Entry entry;
|
| + CandidateWindow::Entry entry;
|
| entry.value = kSampleCandidate1;
|
| entry.annotation = kSampleAnnotation1;
|
| candidate_window.mutable_candidates()->push_back(entry);
|
|
|