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 | 4 |
5 #include "ui/views/focus/focus_manager.h" | 5 #include "ui/views/focus/focus_manager.h" |
6 | 6 |
7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "ui/base/models/combobox_model.h" | 9 #include "ui/base/models/combobox_model.h" |
10 #include "ui/views/controls/button/checkbox.h" | 10 #include "ui/views/controls/button/checkbox.h" |
11 #include "ui/views/controls/button/radio_button.h" | 11 #include "ui/views/controls/button/radio_button.h" |
12 #include "ui/views/controls/button/text_button.h" | 12 #include "ui/views/controls/button/text_button.h" |
13 #include "ui/views/controls/combobox/combobox.h" | 13 #include "ui/views/controls/combobox/combobox.h" |
14 #include "ui/views/controls/label.h" | 14 #include "ui/views/controls/label.h" |
15 #include "ui/views/controls/link.h" | 15 #include "ui/views/controls/link.h" |
16 #include "ui/views/controls/native/native_view_host.h" | 16 #include "ui/views/controls/native/native_view_host.h" |
17 #include "ui/views/controls/scroll_view.h" | 17 #include "ui/views/controls/scroll_view.h" |
| 18 #include "ui/views/controls/tabbed_pane/tabbed_pane.h" |
18 #include "ui/views/controls/textfield/textfield.h" | 19 #include "ui/views/controls/textfield/textfield.h" |
19 #include "ui/views/focus/focus_manager_test.h" | 20 #include "ui/views/focus/focus_manager_test.h" |
20 #include "ui/views/widget/root_view.h" | 21 #include "ui/views/widget/root_view.h" |
21 #include "ui/views/widget/widget.h" | 22 #include "ui/views/widget/widget.h" |
22 | 23 |
23 #if !defined(USE_AURA) | |
24 #include "ui/views/controls/tabbed_pane/tabbed_pane.h" | |
25 #endif | |
26 | |
27 namespace views { | 24 namespace views { |
28 | 25 |
29 namespace { | 26 namespace { |
30 | 27 |
31 int count = 1; | 28 int count = 1; |
32 | 29 |
33 const int kTopCheckBoxID = count++; // 1 | 30 const int kTopCheckBoxID = count++; // 1 |
34 const int kLeftContainerID = count++; | 31 const int kLeftContainerID = count++; |
35 const int kAppleLabelID = count++; | 32 const int kAppleLabelID = count++; |
36 const int kAppleTextfieldID = count++; | 33 const int kAppleTextfieldID = count++; |
(...skipping 24 matching lines...) Expand all Loading... |
61 const int kJoyeuxNoelLinkID = count++; | 58 const int kJoyeuxNoelLinkID = count++; |
62 const int kCampingLinkID = count++; | 59 const int kCampingLinkID = count++; |
63 const int kBriceDeNiceLinkID = count++; | 60 const int kBriceDeNiceLinkID = count++; |
64 const int kTaxiLinkID = count++; // 30 | 61 const int kTaxiLinkID = count++; // 30 |
65 const int kAsterixLinkID = count++; | 62 const int kAsterixLinkID = count++; |
66 | 63 |
67 const int kOKButtonID = count++; | 64 const int kOKButtonID = count++; |
68 const int kCancelButtonID = count++; | 65 const int kCancelButtonID = count++; |
69 const int kHelpButtonID = count++; | 66 const int kHelpButtonID = count++; |
70 | 67 |
71 #if !defined(USE_AURA) | |
72 const int kStyleContainerID = count++; // 35 | 68 const int kStyleContainerID = count++; // 35 |
73 const int kBoldCheckBoxID = count++; | 69 const int kBoldCheckBoxID = count++; |
74 const int kItalicCheckBoxID = count++; | 70 const int kItalicCheckBoxID = count++; |
75 const int kUnderlinedCheckBoxID = count++; | 71 const int kUnderlinedCheckBoxID = count++; |
76 const int kStyleHelpLinkID = count++; | 72 const int kStyleHelpLinkID = count++; |
77 const int kStyleTextEditID = count++; // 40 | 73 const int kStyleTextEditID = count++; // 40 |
78 #endif | |
79 | 74 |
80 const int kSearchContainerID = count++; | 75 const int kSearchContainerID = count++; |
81 const int kSearchTextfieldID = count++; | 76 const int kSearchTextfieldID = count++; |
82 const int kSearchButtonID = count++; | 77 const int kSearchButtonID = count++; |
83 const int kHelpLinkID = count++; | 78 const int kHelpLinkID = count++; |
84 | 79 |
85 const int kThumbnailContainerID = count++; // 45 | 80 const int kThumbnailContainerID = count++; // 45 |
86 const int kThumbnailStarID = count++; | 81 const int kThumbnailStarID = count++; |
87 const int kThumbnailSuperStarID = count++; | 82 const int kThumbnailSuperStarID = count++; |
88 | 83 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 185 |
191 virtual void InitContentView() OVERRIDE; | 186 virtual void InitContentView() OVERRIDE; |
192 | 187 |
193 protected: | 188 protected: |
194 FocusTraversalTest(); | 189 FocusTraversalTest(); |
195 | 190 |
196 View* FindViewByID(int id) { | 191 View* FindViewByID(int id) { |
197 View* view = GetContentsView()->GetViewByID(id); | 192 View* view = GetContentsView()->GetViewByID(id); |
198 if (view) | 193 if (view) |
199 return view; | 194 return view; |
200 #if !defined(USE_AURA) | |
201 if (style_tab_) | 195 if (style_tab_) |
202 view = style_tab_->GetSelectedTab()->GetViewByID(id); | 196 view = style_tab_->GetSelectedTab()->GetViewByID(id); |
203 #endif | |
204 if (view) | 197 if (view) |
205 return view; | 198 return view; |
206 view = search_border_view_->GetContentsRootView()->GetViewByID(id); | 199 view = search_border_view_->GetContentsRootView()->GetViewByID(id); |
207 if (view) | 200 if (view) |
208 return view; | 201 return view; |
209 return NULL; | 202 return NULL; |
210 } | 203 } |
211 | 204 |
212 protected: | 205 protected: |
213 #if !defined(USE_AURA) | |
214 TabbedPane* style_tab_; | 206 TabbedPane* style_tab_; |
215 #endif | |
216 BorderView* search_border_view_; | 207 BorderView* search_border_view_; |
217 DummyComboboxModel combobox_model_; | 208 DummyComboboxModel combobox_model_; |
218 PaneView* left_container_; | 209 PaneView* left_container_; |
219 PaneView* right_container_; | 210 PaneView* right_container_; |
220 | 211 |
221 DISALLOW_COPY_AND_ASSIGN(FocusTraversalTest); | 212 DISALLOW_COPY_AND_ASSIGN(FocusTraversalTest); |
222 }; | 213 }; |
223 | 214 |
224 FocusTraversalTest::FocusTraversalTest() | 215 FocusTraversalTest::FocusTraversalTest() |
225 : | 216 : style_tab_(NULL), |
226 #if !defined(USE_AURA) | |
227 style_tab_(NULL), | |
228 #endif | |
229 search_border_view_(NULL) { | 217 search_border_view_(NULL) { |
230 } | 218 } |
231 | 219 |
232 FocusTraversalTest::~FocusTraversalTest() { | 220 FocusTraversalTest::~FocusTraversalTest() { |
233 } | 221 } |
234 | 222 |
235 void FocusTraversalTest::InitContentView() { | 223 void FocusTraversalTest::InitContentView() { |
236 // Create a complicated view hierarchy with lots of control types for | 224 // Create a complicated view hierarchy with lots of control types for |
237 // use by all of the focus traversal tests. | 225 // use by all of the focus traversal tests. |
238 // | 226 // |
(...skipping 28 matching lines...) Expand all Loading... |
267 // Link * kVisitingLinkID | 255 // Link * kVisitingLinkID |
268 // Link * kAmelieLinkID | 256 // Link * kAmelieLinkID |
269 // Link * kJoyeuxNoelLinkID | 257 // Link * kJoyeuxNoelLinkID |
270 // Link * kCampingLinkID | 258 // Link * kCampingLinkID |
271 // Link * kBriceDeNiceLinkID | 259 // Link * kBriceDeNiceLinkID |
272 // Link * kTaxiLinkID | 260 // Link * kTaxiLinkID |
273 // Link * kAsterixLinkID | 261 // Link * kAsterixLinkID |
274 // NativeButton * kOKButtonID | 262 // NativeButton * kOKButtonID |
275 // NativeButton * kCancelButtonID | 263 // NativeButton * kCancelButtonID |
276 // NativeButton * kHelpButtonID | 264 // NativeButton * kHelpButtonID |
277 // #if !defined(USE_AURA) | |
278 // TabbedPane * kStyleContainerID | 265 // TabbedPane * kStyleContainerID |
279 // View | 266 // View |
280 // Checkbox * kBoldCheckBoxID | 267 // Checkbox * kBoldCheckBoxID |
281 // Checkbox * kItalicCheckBoxID | 268 // Checkbox * kItalicCheckBoxID |
282 // Checkbox * kUnderlinedCheckBoxID | 269 // Checkbox * kUnderlinedCheckBoxID |
283 // Link * kStyleHelpLinkID | 270 // Link * kStyleHelpLinkID |
284 // Textfield * kStyleTextEditID | 271 // Textfield * kStyleTextEditID |
285 // Other | 272 // Other |
286 // #endif | |
287 // BorderView kSearchContainerID | 273 // BorderView kSearchContainerID |
288 // View | 274 // View |
289 // Textfield * kSearchTextfieldID | 275 // Textfield * kSearchTextfieldID |
290 // NativeButton * kSearchButtonID | 276 // NativeButton * kSearchButtonID |
291 // Link * kHelpLinkID | 277 // Link * kHelpLinkID |
292 // View * kThumbnailContainerID | 278 // View * kThumbnailContainerID |
293 // NativeButton * kThumbnailStarID | 279 // NativeButton * kThumbnailStarID |
294 // NativeButton * kThumbnailSuperStarID | 280 // NativeButton * kThumbnailSuperStarID |
295 | 281 |
296 GetContentsView()->set_background( | 282 GetContentsView()->set_background( |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 button = new NativeTextButton(NULL, ASCIIToUTF16("Help")); | 466 button = new NativeTextButton(NULL, ASCIIToUTF16("Help")); |
481 button->set_id(kHelpButtonID); | 467 button->set_id(kHelpButtonID); |
482 GetContentsView()->AddChildView(button); | 468 GetContentsView()->AddChildView(button); |
483 button->SetBounds(290, y, width, 30); | 469 button->SetBounds(290, y, width, 30); |
484 | 470 |
485 y += 40; | 471 y += 40; |
486 | 472 |
487 View* contents = NULL; | 473 View* contents = NULL; |
488 Link* link = NULL; | 474 Link* link = NULL; |
489 | 475 |
490 #if !defined(USE_AURA) | |
491 // Left bottom box with style checkboxes. | 476 // Left bottom box with style checkboxes. |
492 contents = new View(); | 477 contents = new View(); |
493 contents->set_background(Background::CreateSolidBackground(SK_ColorWHITE)); | 478 contents->set_background(Background::CreateSolidBackground(SK_ColorWHITE)); |
494 cb = new Checkbox(ASCIIToUTF16("Bold")); | 479 cb = new Checkbox(ASCIIToUTF16("Bold")); |
495 contents->AddChildView(cb); | 480 contents->AddChildView(cb); |
496 cb->SetBounds(10, 10, 50, 20); | 481 cb->SetBounds(10, 10, 50, 20); |
497 cb->set_id(kBoldCheckBoxID); | 482 cb->set_id(kBoldCheckBoxID); |
498 | 483 |
499 cb = new Checkbox(ASCIIToUTF16("Italic")); | 484 cb = new Checkbox(ASCIIToUTF16("Italic")); |
500 contents->AddChildView(cb); | 485 contents->AddChildView(cb); |
(...skipping 14 matching lines...) Expand all Loading... |
515 contents->AddChildView(text_field); | 500 contents->AddChildView(text_field); |
516 text_field->SetBounds(10, 50, 100, 20); | 501 text_field->SetBounds(10, 50, 100, 20); |
517 text_field->set_id(kStyleTextEditID); | 502 text_field->set_id(kStyleTextEditID); |
518 | 503 |
519 style_tab_ = new TabbedPane(); | 504 style_tab_ = new TabbedPane(); |
520 style_tab_->set_id(kStyleContainerID); | 505 style_tab_->set_id(kStyleContainerID); |
521 GetContentsView()->AddChildView(style_tab_); | 506 GetContentsView()->AddChildView(style_tab_); |
522 style_tab_->SetBounds(10, y, 210, 100); | 507 style_tab_->SetBounds(10, y, 210, 100); |
523 style_tab_->AddTab(ASCIIToUTF16("Style"), contents); | 508 style_tab_->AddTab(ASCIIToUTF16("Style"), contents); |
524 style_tab_->AddTab(ASCIIToUTF16("Other"), new View()); | 509 style_tab_->AddTab(ASCIIToUTF16("Other"), new View()); |
525 #endif | |
526 | 510 |
527 // Right bottom box with search. | 511 // Right bottom box with search. |
528 contents = new View(); | 512 contents = new View(); |
529 contents->set_background(Background::CreateSolidBackground(SK_ColorWHITE)); | 513 contents->set_background(Background::CreateSolidBackground(SK_ColorWHITE)); |
530 text_field = new Textfield(); | 514 text_field = new Textfield(); |
531 contents->AddChildView(text_field); | 515 contents->AddChildView(text_field); |
532 text_field->SetBounds(10, 10, 100, 20); | 516 text_field->SetBounds(10, 10, 100, 20); |
533 text_field->set_id(kSearchTextfieldID); | 517 text_field->set_id(kSearchTextfieldID); |
534 | 518 |
535 button = new NativeTextButton(NULL, ASCIIToUTF16("Search")); | 519 button = new NativeTextButton(NULL, ASCIIToUTF16("Search")); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 } | 556 } |
573 | 557 |
574 TEST_F(FocusTraversalTest, NormalTraversal) { | 558 TEST_F(FocusTraversalTest, NormalTraversal) { |
575 const int kTraversalIDs[] = { kTopCheckBoxID, kAppleTextfieldID, | 559 const int kTraversalIDs[] = { kTopCheckBoxID, kAppleTextfieldID, |
576 kOrangeTextfieldID, kBananaTextfieldID, kKiwiTextfieldID, | 560 kOrangeTextfieldID, kBananaTextfieldID, kKiwiTextfieldID, |
577 kFruitButtonID, kFruitCheckBoxID, kComboboxID, kBroccoliButtonID, | 561 kFruitButtonID, kFruitCheckBoxID, kComboboxID, kBroccoliButtonID, |
578 kRosettaLinkID, kStupeurEtTremblementLinkID, | 562 kRosettaLinkID, kStupeurEtTremblementLinkID, |
579 kDinerGameLinkID, kRidiculeLinkID, kClosetLinkID, kVisitingLinkID, | 563 kDinerGameLinkID, kRidiculeLinkID, kClosetLinkID, kVisitingLinkID, |
580 kAmelieLinkID, kJoyeuxNoelLinkID, kCampingLinkID, kBriceDeNiceLinkID, | 564 kAmelieLinkID, kJoyeuxNoelLinkID, kCampingLinkID, kBriceDeNiceLinkID, |
581 kTaxiLinkID, kAsterixLinkID, kOKButtonID, kCancelButtonID, kHelpButtonID, | 565 kTaxiLinkID, kAsterixLinkID, kOKButtonID, kCancelButtonID, kHelpButtonID, |
582 #if !defined(USE_AURA) | |
583 kStyleContainerID, kBoldCheckBoxID, kItalicCheckBoxID, | 566 kStyleContainerID, kBoldCheckBoxID, kItalicCheckBoxID, |
584 kUnderlinedCheckBoxID, kStyleHelpLinkID, kStyleTextEditID, | 567 kUnderlinedCheckBoxID, kStyleHelpLinkID, kStyleTextEditID, |
585 #endif | |
586 kSearchTextfieldID, kSearchButtonID, kHelpLinkID, | 568 kSearchTextfieldID, kSearchButtonID, kHelpLinkID, |
587 kThumbnailContainerID, kThumbnailStarID, kThumbnailSuperStarID }; | 569 kThumbnailContainerID, kThumbnailStarID, kThumbnailSuperStarID }; |
588 | 570 |
589 // Uncomment the following line if you want to test manually the UI of this | 571 // Uncomment the following line if you want to test manually the UI of this |
590 // test. | 572 // test. |
591 // MessageLoopForUI::current()->RunWithDispatcher(new AcceleratorHandler()); | 573 // MessageLoopForUI::current()->RunWithDispatcher(new AcceleratorHandler()); |
592 | 574 |
593 // Let's traverse the whole focus hierarchy (several times, to make sure it | 575 // Let's traverse the whole focus hierarchy (several times, to make sure it |
594 // loops OK). | 576 // loops OK). |
595 GetFocusManager()->ClearFocus(); | 577 GetFocusManager()->ClearFocus(); |
(...skipping 17 matching lines...) Expand all Loading... |
613 if (focused_view) | 595 if (focused_view) |
614 EXPECT_EQ(kTraversalIDs[j], focused_view->id()); | 596 EXPECT_EQ(kTraversalIDs[j], focused_view->id()); |
615 } | 597 } |
616 } | 598 } |
617 } | 599 } |
618 | 600 |
619 TEST_F(FocusTraversalTest, TraversalWithNonEnabledViews) { | 601 TEST_F(FocusTraversalTest, TraversalWithNonEnabledViews) { |
620 const int kDisabledIDs[] = { | 602 const int kDisabledIDs[] = { |
621 kBananaTextfieldID, kFruitCheckBoxID, kComboboxID, kAsparagusButtonID, | 603 kBananaTextfieldID, kFruitCheckBoxID, kComboboxID, kAsparagusButtonID, |
622 kCauliflowerButtonID, kClosetLinkID, kVisitingLinkID, kBriceDeNiceLinkID, | 604 kCauliflowerButtonID, kClosetLinkID, kVisitingLinkID, kBriceDeNiceLinkID, |
623 kTaxiLinkID, kAsterixLinkID, kHelpButtonID, | 605 kTaxiLinkID, kAsterixLinkID, kHelpButtonID, kBoldCheckBoxID, |
624 #if !defined(USE_AURA) | |
625 kBoldCheckBoxID, | |
626 #endif | |
627 kSearchTextfieldID, kHelpLinkID }; | 606 kSearchTextfieldID, kHelpLinkID }; |
628 | 607 |
629 const int kTraversalIDs[] = { kTopCheckBoxID, kAppleTextfieldID, | 608 const int kTraversalIDs[] = { kTopCheckBoxID, kAppleTextfieldID, |
630 kOrangeTextfieldID, kKiwiTextfieldID, kFruitButtonID, kBroccoliButtonID, | 609 kOrangeTextfieldID, kKiwiTextfieldID, kFruitButtonID, kBroccoliButtonID, |
631 kRosettaLinkID, kStupeurEtTremblementLinkID, kDinerGameLinkID, | 610 kRosettaLinkID, kStupeurEtTremblementLinkID, kDinerGameLinkID, |
632 kRidiculeLinkID, kAmelieLinkID, kJoyeuxNoelLinkID, kCampingLinkID, | 611 kRidiculeLinkID, kAmelieLinkID, kJoyeuxNoelLinkID, kCampingLinkID, |
633 kOKButtonID, kCancelButtonID, | 612 kOKButtonID, kCancelButtonID, kStyleContainerID, kItalicCheckBoxID, |
634 #if !defined(USE_AURA) | 613 kUnderlinedCheckBoxID, kStyleHelpLinkID, kStyleTextEditID, |
635 kStyleContainerID, kItalicCheckBoxID, kUnderlinedCheckBoxID, | |
636 kStyleHelpLinkID, kStyleTextEditID, | |
637 #endif | |
638 kSearchButtonID, kThumbnailContainerID, kThumbnailStarID, | 614 kSearchButtonID, kThumbnailContainerID, kThumbnailStarID, |
639 kThumbnailSuperStarID }; | 615 kThumbnailSuperStarID }; |
640 | 616 |
641 // Let's disable some views. | 617 // Let's disable some views. |
642 for (size_t i = 0; i < arraysize(kDisabledIDs); i++) { | 618 for (size_t i = 0; i < arraysize(kDisabledIDs); i++) { |
643 View* v = FindViewByID(kDisabledIDs[i]); | 619 View* v = FindViewByID(kDisabledIDs[i]); |
644 ASSERT_TRUE(v != NULL); | 620 ASSERT_TRUE(v != NULL); |
645 v->SetEnabled(false); | 621 v->SetEnabled(false); |
646 } | 622 } |
647 | 623 |
(...skipping 30 matching lines...) Expand all Loading... |
678 TEST_F(FocusTraversalTest, TraversalWithInvisibleViews) { | 654 TEST_F(FocusTraversalTest, TraversalWithInvisibleViews) { |
679 const int kInvisibleIDs[] = { kTopCheckBoxID, kOKButtonID, | 655 const int kInvisibleIDs[] = { kTopCheckBoxID, kOKButtonID, |
680 kThumbnailContainerID }; | 656 kThumbnailContainerID }; |
681 | 657 |
682 const int kTraversalIDs[] = { kAppleTextfieldID, kOrangeTextfieldID, | 658 const int kTraversalIDs[] = { kAppleTextfieldID, kOrangeTextfieldID, |
683 kBananaTextfieldID, kKiwiTextfieldID, kFruitButtonID, kFruitCheckBoxID, | 659 kBananaTextfieldID, kKiwiTextfieldID, kFruitButtonID, kFruitCheckBoxID, |
684 kComboboxID, kBroccoliButtonID, kRosettaLinkID, | 660 kComboboxID, kBroccoliButtonID, kRosettaLinkID, |
685 kStupeurEtTremblementLinkID, kDinerGameLinkID, kRidiculeLinkID, | 661 kStupeurEtTremblementLinkID, kDinerGameLinkID, kRidiculeLinkID, |
686 kClosetLinkID, kVisitingLinkID, kAmelieLinkID, kJoyeuxNoelLinkID, | 662 kClosetLinkID, kVisitingLinkID, kAmelieLinkID, kJoyeuxNoelLinkID, |
687 kCampingLinkID, kBriceDeNiceLinkID, kTaxiLinkID, kAsterixLinkID, | 663 kCampingLinkID, kBriceDeNiceLinkID, kTaxiLinkID, kAsterixLinkID, |
688 kCancelButtonID, kHelpButtonID, | 664 kCancelButtonID, kHelpButtonID, kStyleContainerID, kBoldCheckBoxID, |
689 #if !defined(USE_AURA) | 665 kItalicCheckBoxID, kUnderlinedCheckBoxID, kStyleHelpLinkID, |
690 kStyleContainerID, kBoldCheckBoxID, kItalicCheckBoxID, | 666 kStyleTextEditID, kSearchTextfieldID, kSearchButtonID, kHelpLinkID }; |
691 kUnderlinedCheckBoxID, kStyleHelpLinkID, kStyleTextEditID, | |
692 #endif | |
693 kSearchTextfieldID, kSearchButtonID, kHelpLinkID }; | |
694 | 667 |
695 | 668 |
696 // Let's make some views invisible. | 669 // Let's make some views invisible. |
697 for (size_t i = 0; i < arraysize(kInvisibleIDs); i++) { | 670 for (size_t i = 0; i < arraysize(kInvisibleIDs); i++) { |
698 View* v = FindViewByID(kInvisibleIDs[i]); | 671 View* v = FindViewByID(kInvisibleIDs[i]); |
699 ASSERT_TRUE(v != NULL); | 672 ASSERT_TRUE(v != NULL); |
700 v->SetVisible(false); | 673 v->SetVisible(false); |
701 } | 674 } |
702 | 675 |
703 // Uncomment the following line if you want to test manually the UI of this | 676 // Uncomment the following line if you want to test manually the UI of this |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 GetFocusManager()->AdvanceFocus(true); | 774 GetFocusManager()->AdvanceFocus(true); |
802 View* focused_view = GetFocusManager()->GetFocusedView(); | 775 View* focused_view = GetFocusManager()->GetFocusedView(); |
803 EXPECT_TRUE(focused_view != NULL); | 776 EXPECT_TRUE(focused_view != NULL); |
804 if (focused_view) | 777 if (focused_view) |
805 EXPECT_EQ(kRightTraversalIDs[j], focused_view->id()); | 778 EXPECT_EQ(kRightTraversalIDs[j], focused_view->id()); |
806 } | 779 } |
807 } | 780 } |
808 } | 781 } |
809 | 782 |
810 } // namespace views | 783 } // namespace views |
OLD | NEW |