Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Unified Diff: ui/views/focus/focus_traversal_unittest.cc

Issue 108063004: Give up focus if the focused view becomes unfocusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Extracted to common code into FocusManager class Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/focus/focus_traversal_unittest.cc
diff --git a/ui/views/focus/focus_traversal_unittest.cc b/ui/views/focus/focus_traversal_unittest.cc
index e3f93e7f92361d35dd4752b5f846eea50b5eaedb..970f8af3668298f07340679b26471bb3e18f8c7e 100644
--- a/ui/views/focus/focus_traversal_unittest.cc
+++ b/ui/views/focus/focus_traversal_unittest.cc
@@ -134,7 +134,7 @@ class BorderView : public NativeViewHost {
public:
explicit BorderView(View* child) : child_(child), widget_(NULL) {
DCHECK(child);
- set_focusable(false);
+ SetFocusable(false);
}
virtual ~BorderView() {}
@@ -543,7 +543,7 @@ void FocusTraversalTest::InitContentView() {
y += 60;
contents = new View();
- contents->set_focusable(true);
+ contents->SetFocusable(true);
contents->set_background(Background::CreateSolidBackground(SK_ColorBLUE));
contents->set_id(kThumbnailContainerID);
button = new LabelButton(NULL, ASCIIToUTF16("Star"));
@@ -756,10 +756,10 @@ TEST_F(FocusTraversalTest, PaneTraversal) {
FocusSearch focus_search_right(right_container_, true, true);
right_container_->EnablePaneFocus(&focus_search_right);
- FindViewByID(kRosettaLinkID)->set_focusable(false);
- FindViewByID(kStupeurEtTremblementLinkID)->set_focusable(false);
- FindViewByID(kDinerGameLinkID)->set_accessibility_focusable(true);
- FindViewByID(kDinerGameLinkID)->set_focusable(false);
+ FindViewByID(kRosettaLinkID)->SetFocusable(false);
+ FindViewByID(kStupeurEtTremblementLinkID)->SetFocusable(false);
+ FindViewByID(kDinerGameLinkID)->SetAccessibilityFocusable(true);
+ FindViewByID(kDinerGameLinkID)->SetFocusable(false);
FindViewByID(kAsterixLinkID)->RequestFocus();
// Traverse the focus hierarchy within the pane several times.

Powered by Google App Engine
This is Rietveld 408576698