Index: chrome/browser/ui/passwords/manage_passwords_test.cc |
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_view_test.cc b/chrome/browser/ui/passwords/manage_passwords_test.cc |
similarity index 77% |
rename from chrome/browser/ui/views/passwords/manage_passwords_view_test.cc |
rename to chrome/browser/ui/passwords/manage_passwords_test.cc |
index 618217de520510c6ccc86c386b15b35146ef6a3d..e3abdc6876abc97629469b48813778c916989eb1 100644 |
--- a/chrome/browser/ui/views/passwords/manage_passwords_view_test.cc |
+++ b/chrome/browser/ui/passwords/manage_passwords_test.cc |
@@ -2,18 +2,16 @@ |
// 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/browser/ui/passwords/manage_passwords_test.h" |
+#include "base/strings/utf_string_conversions.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/browser_window.h" |
#include "chrome/browser/ui/passwords/manage_passwords_icon.h" |
#include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.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" |
@@ -23,7 +21,7 @@ |
#include "components/password_manager/core/browser/stub_password_manager_driver.h" |
#include "testing/gtest/include/gtest/gtest.h" |
-void ManagePasswordsViewTest::SetUpOnMainThread() { |
+void ManagePasswordsTest::SetUpOnMainThread() { |
AddTabAtIndex(0, GURL("http://example.com/"), content::PAGE_TRANSITION_TYPED); |
// Create the test UIController here so that it's bound to the currently |
// active WebContents. |
@@ -31,19 +29,13 @@ void ManagePasswordsViewTest::SetUpOnMainThread() { |
browser()->tab_strip_model()->GetActiveWebContents()); |
} |
-ManagePasswordsUIControllerMock* ManagePasswordsViewTest::controller() { |
+ManagePasswordsUIControllerMock* ManagePasswordsTest::controller() { |
return static_cast<ManagePasswordsUIControllerMock*>( |
ManagePasswordsUIController::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() { |
+void ManagePasswordsTest::ExecuteManagePasswordsCommand() { |
// Show the window to ensure that it's active. |
browser()->window()->Show(); |
@@ -55,7 +47,7 @@ void ManagePasswordsViewTest::ExecuteManagePasswordsCommand() { |
content::RunAllPendingInMessageLoop(); |
} |
-void ManagePasswordsViewTest::SetupManagingPasswords() { |
+void ManagePasswordsTest::SetupManagingPasswords() { |
base::string16 kTestUsername = base::ASCIIToUTF16("test_username"); |
autofill::PasswordFormMap map; |
map[kTestUsername] = test_form(); |
@@ -63,7 +55,7 @@ void ManagePasswordsViewTest::SetupManagingPasswords() { |
controller()->UpdateIconAndBubbleState(view()); |
} |
-void ManagePasswordsViewTest::SetupPendingPassword() { |
+void ManagePasswordsTest::SetupPendingPassword() { |
password_manager::StubPasswordManagerClient client; |
password_manager::StubPasswordManagerDriver driver; |
scoped_ptr<password_manager::PasswordFormManager> test_form_manager( |
@@ -77,7 +69,7 @@ void ManagePasswordsViewTest::SetupPendingPassword() { |
controller()->UpdateIconAndBubbleState(view()); |
} |
-void ManagePasswordsViewTest::SetupAutomaticPassword() { |
+void ManagePasswordsTest::SetupAutomaticPassword() { |
password_manager::StubPasswordManagerClient client; |
password_manager::StubPasswordManagerDriver driver; |
scoped_ptr<password_manager::PasswordFormManager> test_form_manager( |
@@ -91,7 +83,7 @@ void ManagePasswordsViewTest::SetupAutomaticPassword() { |
controller()->UpdateIconAndBubbleState(view()); |
} |
-void ManagePasswordsViewTest::SetupBlackistedPassword() { |
+void ManagePasswordsTest::SetupBlackistedPassword() { |
base::string16 kTestUsername = base::ASCIIToUTF16("test_username"); |
autofill::PasswordFormMap map; |
map[kTestUsername] = test_form(); |
@@ -99,7 +91,7 @@ void ManagePasswordsViewTest::SetupBlackistedPassword() { |
controller()->UpdateIconAndBubbleState(view()); |
} |
-base::HistogramSamples* ManagePasswordsViewTest::GetSamples( |
+base::HistogramSamples* ManagePasswordsTest::GetSamples( |
const char* histogram) { |
// Ensure that everything has been properly recorded before pulling samples. |
content::RunAllPendingInMessageLoop(); |