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

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

Issue 1402363013: Update location bar bubble/icon behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/views/passwords/manage_passwords_icon_view_browsertest.cc
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_icon_view_browsertest.cc b/chrome/browser/ui/views/passwords/manage_passwords_icon_view_browsertest.cc
index 7244c4614d3ce091d041b9c6cae4da77559553c9..00dcb726991a64ac2a458d97fd1a2edaa030caec 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_icon_view_browsertest.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_view_browsertest.cc
@@ -31,7 +31,6 @@ class ManagePasswordsIconViewTest : public ManagePasswordsTest {
}
password_manager::ui::State ViewState() { return GetView()->state_; }
- bool ViewIsActive() { return GetView()->active(); }
ManagePasswordsIconViews* GetView() {
return static_cast<ManagePasswordsIconViews*>(view());
@@ -56,14 +55,9 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsIconViewTest, PendingState) {
SetupPendingPassword();
EXPECT_EQ(password_manager::ui::PENDING_PASSWORD_STATE, ViewState());
EXPECT_TRUE(GetView()->visible());
- EXPECT_TRUE(ViewIsActive());
// No tooltip because the bubble is showing.
EXPECT_EQ(base::string16(), GetTooltipText());
const gfx::ImageSkia active_image = GetView()->GetImage();
-
- GetView()->SetActive(false);
- EXPECT_FALSE(active_image.BackedBySameObjectAs(GetView()->GetImage()));
- EXPECT_FALSE(ViewIsActive());
}
IN_PROC_BROWSER_TEST_F(ManagePasswordsIconViewTest, ManageState) {
@@ -72,28 +66,15 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsIconViewTest, ManageState) {
EXPECT_TRUE(GetView()->visible());
EXPECT_EQ(l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_TOOLTIP_MANAGE),
GetTooltipText());
- const gfx::ImageSkia inactive_image = GetView()->GetImage();
-
- GetView()->SetActive(true);
- const gfx::ImageSkia active_image = GetView()->GetImage();
- EXPECT_FALSE(active_image.BackedBySameObjectAs(inactive_image));
- EXPECT_TRUE(ViewIsActive());
-
- GetView()->SetActive(false);
- EXPECT_FALSE(active_image.BackedBySameObjectAs(GetView()->GetImage()));
- EXPECT_TRUE(inactive_image.BackedBySameObjectAs(GetView()->GetImage()));
- EXPECT_FALSE(ViewIsActive());
}
IN_PROC_BROWSER_TEST_F(ManagePasswordsIconViewTest, CloseOnClick) {
SetupPendingPassword();
EXPECT_TRUE(GetView()->visible());
- EXPECT_TRUE(ViewIsActive());
ui::MouseEvent mouse_down(ui::ET_MOUSE_PRESSED, gfx::Point(10, 10),
gfx::Point(900, 60), ui::EventTimeForNow(),
ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
GetView()->OnMousePressed(mouse_down);
// Wait for the command execution to close the bubble.
content::RunAllPendingInMessageLoop();
- EXPECT_FALSE(ViewIsActive());
}

Powered by Google App Engine
This is Rietveld 408576698