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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_view_test.cc

Issue 256333003: Revert of Password bubble: Introduce a command to open the bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_view_test.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/passwords/manage_passwords_view_test.cc
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_view_test.cc b/chrome/browser/ui/views/passwords/manage_passwords_view_test.cc
deleted file mode 100644
index c88ed223f08bdc51c030956a06e9879adaaf0f13..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/passwords/manage_passwords_view_test.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-// 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/views/passwords/manage_passwords_view_test.h"
-
-#include "chrome/app/chrome_command_ids.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_command_controller.h"
-#include "chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller_mock.h"
-#include "chrome/browser/ui/passwords/manage_passwords_icon.h"
-#include "chrome/browser/ui/tabs/tab_strip_model.h"
-#include "chrome/browser/ui/views/frame/browser_view.h"
-#include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h"
-#include "chrome/browser/ui/views/passwords/manage_passwords_icon_view.h"
-#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
-#include "chrome/test/base/in_process_browser_test.h"
-#include "chrome/test/base/interactive_test_utils.h"
-#include "components/autofill/core/common/password_form.h"
-#include "components/password_manager/core/browser/mock_password_manager_driver.h"
-#include "components/password_manager/core/browser/password_form_manager.h"
-#include "components/password_manager/core/browser/password_manager_driver.h"
-#include "components/password_manager/core/browser/password_manager_metrics_util.h"
-#include "components/password_manager/core/browser/stub_password_manager_client.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-void ManagePasswordsViewTest::SetUpOnMainThread() {
- // Create the test UIController here so that it's bound to the currently
- // active WebContents.
- new ManagePasswordsBubbleUIControllerMock(
- browser()->tab_strip_model()->GetActiveWebContents());
-}
-
-ManagePasswordsBubbleUIControllerMock* ManagePasswordsViewTest::controller() {
- return static_cast<ManagePasswordsBubbleUIControllerMock*>(
- ManagePasswordsBubbleUIController::FromWebContents(
- browser()->tab_strip_model()->GetActiveWebContents()));
-}
-
-ManagePasswordsIconView* ManagePasswordsViewTest::view() {
- BrowserView* browser_view = static_cast<BrowserView*>(browser()->window());
- return browser_view->GetToolbarView()->location_bar()->
- manage_passwords_icon_view();
-}
-
-void ManagePasswordsViewTest::ExecuteManagePasswordsCommand() {
- CommandUpdater* updater = browser()->command_controller()->command_updater();
- EXPECT_TRUE(updater->IsCommandEnabled(IDC_MANAGE_PASSWORDS_FOR_PAGE));
- EXPECT_TRUE(updater->ExecuteCommand(IDC_MANAGE_PASSWORDS_FOR_PAGE));
-}
-
-void ManagePasswordsViewTest::SetupManagingPasswords() {
- base::string16 kTestUsername = base::ASCIIToUTF16("test_username");
- autofill::PasswordFormMap map;
- map[kTestUsername] = test_form();
- controller()->OnPasswordAutofilled(map);
- controller()->UpdateIconAndBubbleState(view());
-}
-
-void ManagePasswordsViewTest::SetupPendingPassword() {
- password_manager::StubPasswordManagerClient client;
- password_manager::MockPasswordManagerDriver driver;
- scoped_ptr<password_manager::PasswordFormManager> test_form_manager(
- new password_manager::PasswordFormManager(
- NULL, &client, &driver, *test_form(), false));
- controller()->OnPasswordSubmitted(test_form_manager.release());
- controller()->UpdateIconAndBubbleState(view());
-}
-
-void ManagePasswordsViewTest::SetupBlackistedPassword() {
- controller()->OnBlacklistBlockedAutofill();
- controller()->UpdateIconAndBubbleState(view());
-}
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_view_test.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698