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

Unified Diff: chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm

Issue 940673002: No need to suppress ZoomBubble if !window_->IsActive(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-remove stale comment. Created 5 years, 10 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/location_bar/zoom_decoration_browsertest.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm b/chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm
index eef9f857a7e47be351d5b01124490862542bb890..0e4d425eb3c4a9b4767f62c3282ebd4872417fd1 100644
--- a/chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/zoom_decoration_browsertest.mm
@@ -14,6 +14,7 @@
#include "chrome/browser/ui/toolbar/test_toolbar_model.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/ui/zoom/page_zoom.h"
+#include "components/ui/zoom/zoom_controller.h"
#include "content/public/browser/host_zoom_map.h"
#include "content/public/test/test_utils.h"
@@ -78,6 +79,16 @@ class ZoomDecorationTest : public InProcessBrowserTest {
IN_PROC_BROWSER_TEST_F(ZoomDecorationTest, BubbleAtDefaultZoom) {
ZoomDecoration* zoom_decoration = GetZoomDecoration();
+ // TODO(wjmaclean): This shouldn't be necessary, but at present this test
+ // assumes the various Zoom() calls do not invoke a notification
+ // bubble, which prior to https://codereview.chromium.org/940673002/
+ // was accomplished by not showing the bubble for inactive windows.
+ // Since we now need to be able to show the zoom bubble as a notification
+ // on non-active pages, this test should be revised to account for
+ // these notifications.
+ ui_zoom::ZoomController::FromWebContents(
+ GetLocationBar()->GetWebContents())->SetShowsNotificationBubble(false);
+
// Zoom in and reset.
EXPECT_FALSE(zoom_decoration->IsVisible());
Zoom(content::PAGE_ZOOM_IN);
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm ('k') | chrome/browser/ui/zoom/zoom_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698