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(test_web_contents_.get())); |
| 33 model_->set_state(password_manager::ui::PENDING_PASSWORD_STATE); |
| 34 } |
| 35 return model_.get(); |
| 36 } |
OLD | NEW |