Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / passwords / manage_passwords_controller_test.mm
blobef57ee7596cabc08c4554972666dce805eaa69eb
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.
5 #include "chrome/browser/ui/cocoa/passwords/manage_passwords_controller_test.h"
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"
11 ManagePasswordsControllerTest::
12     ManagePasswordsControllerTest() {
15 ManagePasswordsControllerTest::
16     ~ManagePasswordsControllerTest() {
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());
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();