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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_dialog_views_unittest.cc

Issue 103493005: Rename View::set_focusable and View::set_accessibility_focusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a few missing files 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/views/autofill/autofill_dialog_views.h" 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h" 10 #include "chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 TestWithBrowserView::TearDown(); 84 TestWithBrowserView::TearDown();
85 } 85 }
86 86
87 MockAutofillDialogViewDelegate* delegate() { return &view_delegate_; } 87 MockAutofillDialogViewDelegate* delegate() { return &view_delegate_; }
88 88
89 TestAutofillDialogViews* dialog() { return dialog_.get(); } 89 TestAutofillDialogViews* dialog() { return dialog_.get(); }
90 90
91 protected: 91 protected:
92 void SetSectionsFocusable() { 92 void SetSectionsFocusable() {
93 dialog()->GetLoadingShieldForTesting()->set_focusable(true); 93 dialog()->GetLoadingShieldForTesting()->SetFocusable(true);
94 // The sign in web view is not focusable until a web contents is created. 94 // The sign in web view is not focusable until a web contents is created.
95 // TODO(dbeam): figure out how to create a web contents on the right thread. 95 // TODO(dbeam): figure out how to create a web contents on the right thread.
96 dialog()->GetNotificationAreaForTesting()->set_focusable(true); 96 dialog()->GetNotificationAreaForTesting()->SetFocusable(true);
97 dialog()->GetScrollableAreaForTesting()->set_focusable(true); 97 dialog()->GetScrollableAreaForTesting()->SetFocusable(true);
98 } 98 }
99 99
100 private: 100 private:
101 // Fake dialog delegate and host to isolate test behavior. 101 // Fake dialog delegate and host to isolate test behavior.
102 web_modal::TestWebContentsModalDialogManagerDelegate dialog_delegate_; 102 web_modal::TestWebContentsModalDialogManagerDelegate dialog_delegate_;
103 scoped_ptr<web_modal::TestWebContentsModalDialogHost> dialog_host_; 103 scoped_ptr<web_modal::TestWebContentsModalDialogHost> dialog_host_;
104 104
105 // Mock view delegate as this file only tests the view. 105 // Mock view delegate as this file only tests the view.
106 testing::NiceMock<MockAutofillDialogViewDelegate> view_delegate_; 106 testing::NiceMock<MockAutofillDialogViewDelegate> view_delegate_;
107 107
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 EXPECT_CALL(*delegate(), ShouldShowSpinner()).WillRepeatedly(Return(false)); 178 EXPECT_CALL(*delegate(), ShouldShowSpinner()).WillRepeatedly(Return(false));
179 dialog()->UpdateAccountChooser(); 179 dialog()->UpdateAccountChooser();
180 180
181 EXPECT_TRUE(notification_area->IsFocusable()); 181 EXPECT_TRUE(notification_area->IsFocusable());
182 EXPECT_TRUE(scrollable_area->IsFocusable()); 182 EXPECT_TRUE(scrollable_area->IsFocusable());
183 EXPECT_FALSE(loading_shield->IsFocusable()); 183 EXPECT_FALSE(loading_shield->IsFocusable());
184 EXPECT_FALSE(sign_in_web_view->IsFocusable()); 184 EXPECT_FALSE(sign_in_web_view->IsFocusable());
185 } 185 }
186 186
187 } // namespace autofill 187 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_dialog_views.cc ('k') | chrome/browser/ui/views/autofill/tooltip_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698