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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 186 } |
187 | 187 |
188 TEST_F(AutofillDialogViewsTest, ImeEventDoesntCrash) { | 188 TEST_F(AutofillDialogViewsTest, ImeEventDoesntCrash) { |
189 // IMEs create synthetic events with no backing native event. | 189 // IMEs create synthetic events with no backing native event. |
190 views::FocusManager* focus_manager = dialog()->GetWidget()->GetFocusManager(); | 190 views::FocusManager* focus_manager = dialog()->GetWidget()->GetFocusManager(); |
191 views::View* focused_view = focus_manager->GetFocusedView(); | 191 views::View* focused_view = focus_manager->GetFocusedView(); |
192 ASSERT_STREQ(DecoratedTextfield::kViewClassName, | 192 ASSERT_STREQ(DecoratedTextfield::kViewClassName, |
193 focused_view->GetClassName()); | 193 focused_view->GetClassName()); |
194 EXPECT_FALSE(dialog()->HandleKeyEvent( | 194 EXPECT_FALSE(dialog()->HandleKeyEvent( |
195 static_cast<views::Textfield*>(focused_view), | 195 static_cast<views::Textfield*>(focused_view), |
196 ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, false))); | 196 ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE))); |
197 } | 197 } |
198 | 198 |
199 } // namespace autofill | 199 } // namespace autofill |
OLD | NEW |