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 "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h
" | 9 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h
" |
10 #include "chrome/browser/ui/autofill/password_generation_popup_view_tester.h" | 10 #include "chrome/browser/ui/autofill/password_generation_popup_view_tester.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 class PasswordGenerationPopupViewTest : public InProcessBrowserTest { | 42 class PasswordGenerationPopupViewTest : public InProcessBrowserTest { |
43 public: | 43 public: |
44 content::WebContents* GetWebContents() { | 44 content::WebContents* GetWebContents() { |
45 return browser()->tab_strip_model()->GetActiveWebContents(); | 45 return browser()->tab_strip_model()->GetActiveWebContents(); |
46 } | 46 } |
47 | 47 |
48 gfx::NativeView GetNativeView() { | 48 gfx::NativeView GetNativeView() { |
49 return GetWebContents()->GetNativeView(); | 49 return GetWebContents()->GetNativeView(); |
50 } | 50 } |
51 | 51 |
52 scoped_ptr<PasswordGenerationPopupViewTester> GetViewTester() { | 52 std::unique_ptr<PasswordGenerationPopupViewTester> GetViewTester() { |
53 return PasswordGenerationPopupViewTester::For(controller_->view()); | 53 return PasswordGenerationPopupViewTester::For(controller_->view()); |
54 } | 54 } |
55 | 55 |
56 protected: | 56 protected: |
57 TestPasswordGenerationPopupController* controller_; | 57 TestPasswordGenerationPopupController* controller_; |
58 }; | 58 }; |
59 | 59 |
60 // TODO(gcasto): Enable on Mac when UI is updated. (crbug.com/394303) | 60 // TODO(gcasto): Enable on Mac when UI is updated. (crbug.com/394303) |
61 #if !defined(OS_MACOSX) | 61 #if !defined(OS_MACOSX) |
62 // Regression test for crbug.com/400543. Verifying that moving the mouse in the | 62 // Regression test for crbug.com/400543. Verifying that moving the mouse in the |
(...skipping 17 matching lines...) Expand all Loading... |
80 // Regression test for crbug.com/439618. | 80 // Regression test for crbug.com/439618. |
81 IN_PROC_BROWSER_TEST_F(PasswordGenerationPopupViewTest, | 81 IN_PROC_BROWSER_TEST_F(PasswordGenerationPopupViewTest, |
82 InvalidContainerView) { | 82 InvalidContainerView) { |
83 controller_ = new autofill::TestPasswordGenerationPopupController( | 83 controller_ = new autofill::TestPasswordGenerationPopupController( |
84 GetWebContents(), NULL); | 84 GetWebContents(), NULL); |
85 controller_->Show(true /* display password */); | 85 controller_->Show(true /* display password */); |
86 } | 86 } |
87 #endif | 87 #endif |
88 | 88 |
89 } // namespace autofill | 89 } // namespace autofill |
OLD | NEW |