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

Unified Diff: chrome/browser/ui/cocoa/passwords/manage_passwords_controller_test.mm

Issue 438893002: Add ManagePasswordItemViewController and unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix constants in test Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/passwords/manage_passwords_controller_test.mm
diff --git a/chrome/browser/ui/cocoa/passwords/manage_passwords_controller_test.mm b/chrome/browser/ui/cocoa/passwords/manage_passwords_controller_test.mm
new file mode 100644
index 0000000000000000000000000000000000000000..ef57ee7596cabc08c4554972666dce805eaa69eb
--- /dev/null
+++ b/chrome/browser/ui/cocoa/passwords/manage_passwords_controller_test.mm
@@ -0,0 +1,36 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/cocoa/passwords/manage_passwords_controller_test.h"
+
+#include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
+#include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h"
+#include "content/public/test/web_contents_tester.h"
+
+ManagePasswordsControllerTest::
+ ManagePasswordsControllerTest() {
+}
+
+ManagePasswordsControllerTest::
+ ~ManagePasswordsControllerTest() {
+}
+
+void ManagePasswordsControllerTest::SetUp() {
+ CocoaProfileTest::SetUp();
+ // Create the test UIController here so that it's bound to and owned by
+ // |test_web_contents_| and therefore accessible to the model.
+ test_web_contents_.reset(
+ content::WebContentsTester::CreateTestWebContents(profile(), NULL));
+ ui_controller_ =
+ new ManagePasswordsUIControllerMock(test_web_contents_.get());
+}
+
+ManagePasswordsBubbleModel*
+ManagePasswordsControllerTest::model() {
+ if (!model_) {
+ model_.reset(new ManagePasswordsBubbleModel(test_web_contents_.get()));
+ model_->set_state(password_manager::ui::PENDING_PASSWORD_STATE);
+ }
+ return model_.get();
+}

Powered by Google App Engine
This is Rietveld 408576698