OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/ui/cocoa/passwords/manage_passwords_controller_test.h" | |
6 | |
7 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" | |
8 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" | |
9 #include "content/public/test/web_contents_tester.h" | |
10 | |
11 ManagePasswordsControllerTest:: | |
12 ManagePasswordsControllerTest() { | |
13 } | |
14 | |
15 ManagePasswordsControllerTest:: | |
16 ~ManagePasswordsControllerTest() { | |
17 } | |
18 | |
19 void ManagePasswordsControllerTest::SetUp() { | |
20 CocoaProfileTest::SetUp(); | |
21 // Create the test UIController here so that it's bound to and owned by | |
22 // |test_web_contents_| and therefore accessible to the model. | |
23 test_web_contents_.reset( | |
24 content::WebContentsTester::CreateTestWebContents(profile(), NULL)); | |
25 ui_controller_ = | |
26 new ManagePasswordsUIControllerMock(test_web_contents_.get()); | |
27 } | |
28 | |
29 ManagePasswordsBubbleModel* | |
30 ManagePasswordsControllerTest::model() { | |
31 if (!model_) { | |
32 model_.reset(new ManagePasswordsBubbleModel( | |
33 test_web_contents_.get(), ManagePasswordsBubbleModel::AUTOMATIC)); | |
34 } | |
35 return model_.get(); | |
36 } | |
37 | |
38 @implementation ContentViewDelegateMock | |
39 | |
40 @synthesize dismissed = _dismissed; | |
41 | |
42 - (void)viewShouldDismiss { | |
43 _dismissed = YES; | |
44 } | |
45 | |
46 @end | |
OLD | NEW |