OLD | NEW |
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 16 matching lines...) Expand all Loading... |
27 namespace { | 27 namespace { |
28 | 28 |
29 using testing::Return; | 29 using testing::Return; |
30 using web_modal::WebContentsModalDialogManager; | 30 using web_modal::WebContentsModalDialogManager; |
31 | 31 |
32 // A views implementation of the Autofill dialog with slightly more testability. | 32 // A views implementation of the Autofill dialog with slightly more testability. |
33 class TestAutofillDialogViews : public AutofillDialogViews { | 33 class TestAutofillDialogViews : public AutofillDialogViews { |
34 public: | 34 public: |
35 explicit TestAutofillDialogViews(AutofillDialogViewDelegate* delegate) | 35 explicit TestAutofillDialogViews(AutofillDialogViewDelegate* delegate) |
36 : AutofillDialogViews(delegate) {} | 36 : AutofillDialogViews(delegate) {} |
37 virtual ~TestAutofillDialogViews() {} | 37 ~TestAutofillDialogViews() override {} |
38 | 38 |
39 using AutofillDialogViews::GetLoadingShieldForTesting; | 39 using AutofillDialogViews::GetLoadingShieldForTesting; |
40 using AutofillDialogViews::GetSignInWebViewForTesting; | 40 using AutofillDialogViews::GetSignInWebViewForTesting; |
41 using AutofillDialogViews::GetNotificationAreaForTesting; | 41 using AutofillDialogViews::GetNotificationAreaForTesting; |
42 using AutofillDialogViews::GetScrollableAreaForTesting; | 42 using AutofillDialogViews::GetScrollableAreaForTesting; |
43 | 43 |
44 private: | 44 private: |
45 DISALLOW_COPY_AND_ASSIGN(TestAutofillDialogViews); | 45 DISALLOW_COPY_AND_ASSIGN(TestAutofillDialogViews); |
46 }; | 46 }; |
47 | 47 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 views::FocusManager* focus_manager = dialog()->GetWidget()->GetFocusManager(); | 191 views::FocusManager* focus_manager = dialog()->GetWidget()->GetFocusManager(); |
192 views::View* focused_view = focus_manager->GetFocusedView(); | 192 views::View* focused_view = focus_manager->GetFocusedView(); |
193 ASSERT_STREQ(DecoratedTextfield::kViewClassName, | 193 ASSERT_STREQ(DecoratedTextfield::kViewClassName, |
194 focused_view->GetClassName()); | 194 focused_view->GetClassName()); |
195 EXPECT_FALSE(dialog()->HandleKeyEvent( | 195 EXPECT_FALSE(dialog()->HandleKeyEvent( |
196 static_cast<views::Textfield*>(focused_view), | 196 static_cast<views::Textfield*>(focused_view), |
197 ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE))); | 197 ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE))); |
198 } | 198 } |
199 | 199 |
200 } // namespace autofill | 200 } // namespace autofill |
OLD | NEW |