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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/password_generation_popup_view_cocoa_unittest.mm

Issue 2727233003: Uses child views in Autofill Popup so we can trigger (Closed)
Patch Set: (int) to NSInteger Created 3 years, 9 months 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
OLDNEW
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 #import "chrome/browser/ui/cocoa/autofill/password_generation_popup_view_cocoa.h " 5 #import "chrome/browser/ui/cocoa/autofill/password_generation_popup_view_cocoa.h "
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void Hide() override {} 55 void Hide() override {}
56 MOCK_METHOD0(ViewDestroyed, void()); 56 MOCK_METHOD0(ViewDestroyed, void());
57 void SetSelectionAtPoint(const gfx::Point&) override {} 57 void SetSelectionAtPoint(const gfx::Point&) override {}
58 bool AcceptSelectedLine() override { return true; } 58 bool AcceptSelectedLine() override { return true; }
59 void SelectionCleared() override {} 59 void SelectionCleared() override {}
60 gfx::Rect popup_bounds() const override { return popup_bounds_; } 60 gfx::Rect popup_bounds() const override { return popup_bounds_; }
61 MOCK_METHOD0(container_view, gfx::NativeView()); 61 MOCK_METHOD0(container_view, gfx::NativeView());
62 MOCK_CONST_METHOD0(element_bounds, gfx::RectF&()); 62 MOCK_CONST_METHOD0(element_bounds, gfx::RectF&());
63 MOCK_CONST_METHOD0(IsRTL, bool()); 63 MOCK_CONST_METHOD0(IsRTL, bool());
64 MOCK_METHOD0(GetSuggestions, const std::vector<autofill::Suggestion>()); 64 MOCK_METHOD0(GetSuggestions, const std::vector<autofill::Suggestion>());
65 MOCK_METHOD1(GetElidedValueWidthForRow, int(size_t)); 65 MOCK_METHOD1(GetElidedValueWidthForRow, int(int));
66 MOCK_METHOD1(GetElidedLabelWidthForRow, int(size_t)); 66 MOCK_METHOD1(GetElidedLabelWidthForRow, int(int));
67 67
68 private: 68 private:
69 base::string16 help_text_; 69 base::string16 help_text_;
70 gfx::Range link_range_; 70 gfx::Range link_range_;
71 71
72 const gfx::Rect popup_bounds_; 72 const gfx::Rect popup_bounds_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(MockPasswordGenerationPopupController); 74 DISALLOW_COPY_AND_ASSIGN(MockPasswordGenerationPopupController);
75 }; 75 };
76 76
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // popup is hidden. 120 // popup is hidden.
121 TEST_F(PasswordGenerationPopupViewCocoaTest, ControllerDestroyed) { 121 TEST_F(PasswordGenerationPopupViewCocoaTest, ControllerDestroyed) {
122 [view_ showPopup]; 122 [view_ showPopup];
123 mock_controller_.reset(); 123 mock_controller_.reset();
124 [view_ controllerDestroyed]; 124 [view_ controllerDestroyed];
125 [view_ display]; 125 [view_ display];
126 [view_ hidePopup]; 126 [view_ hidePopup];
127 } 127 }
128 128
129 } // namespace 129 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698