OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/autofill/password_generation_popup_view.h" | 5 #include "chrome/browser/ui/autofill/password_generation_popup_view.h" |
6 | 6 |
7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h
" | 8 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h
" |
9 #include "chrome/browser/ui/autofill/password_generation_popup_view_tester.h" | 9 #include "chrome/browser/ui/autofill/password_generation_popup_view_tester.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/browser_window.h" | 11 #include "chrome/browser/ui/browser_window.h" |
12 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
13 #include "chrome/test/base/in_process_browser_test.h" | 13 #include "chrome/test/base/in_process_browser_test.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "ui/events/event_utils.h" | 15 #include "ui/events/event_utils.h" |
16 | 16 |
17 namespace autofill { | 17 namespace autofill { |
18 | 18 |
19 class TestPasswordGenerationPopupController : | 19 class TestPasswordGenerationPopupController : |
20 public PasswordGenerationPopupControllerImpl { | 20 public PasswordGenerationPopupControllerImpl { |
21 public: | 21 public: |
22 TestPasswordGenerationPopupController(content::WebContents* web_contents, | 22 TestPasswordGenerationPopupController(content::WebContents* web_contents, |
23 gfx::NativeView native_view) | 23 gfx::NativeView native_view) |
24 : PasswordGenerationPopupControllerImpl( | 24 : PasswordGenerationPopupControllerImpl( |
25 gfx::RectF(0, 0, 10, 10), | 25 gfx::RectF(0, 0, 10, 10), |
26 PasswordForm(), | 26 PasswordForm(), |
27 10, | 27 10, |
28 NULL /* PasswordManager*/, | 28 nullptr /* PasswordManager*/, |
29 NULL /* PasswordGenerationPopupObserver*/, | 29 nullptr /* PasswordManagerDriver*/, |
| 30 nullptr /* PasswordGenerationPopupObserver*/, |
30 web_contents, | 31 web_contents, |
31 native_view) {} | 32 native_view) {} |
32 | 33 |
33 ~TestPasswordGenerationPopupController() override {} | 34 ~TestPasswordGenerationPopupController() override {} |
34 | 35 |
35 PasswordGenerationPopupView* view() { | 36 PasswordGenerationPopupView* view() { |
36 return view_; | 37 return view_; |
37 } | 38 } |
38 }; | 39 }; |
39 | 40 |
(...skipping 28 matching lines...) Expand all Loading... |
68 static_cast<PasswordGenerationPopupController*>( | 69 static_cast<PasswordGenerationPopupController*>( |
69 controller_)->popup_bounds().CenterPoint(); | 70 controller_)->popup_bounds().CenterPoint(); |
70 GetViewTester()->SimulateMouseMovementAt(center_point); | 71 GetViewTester()->SimulateMouseMovementAt(center_point); |
71 | 72 |
72 // Deletes |controller_|. | 73 // Deletes |controller_|. |
73 controller_->HideAndDestroy(); | 74 controller_->HideAndDestroy(); |
74 } | 75 } |
75 #endif | 76 #endif |
76 | 77 |
77 } // namespace autofill | 78 } // namespace autofill |
OLD | NEW |