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