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

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

Issue 1718563002: Convert location bar decorations to Material Design (Mac). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md_toolbar
Patch Set: Fix issue from browser test. Created 4 years, 9 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_unittest.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm b/chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm
index 1316ad61b7635304dd7cadb100dfeea3d571b3ea..4af730f07a31ffbca7965adb40211ec2b3dfbe91 100644
--- a/chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm
@@ -17,9 +17,12 @@ class MockZoomDecoration : public ZoomDecoration {
: ZoomDecoration(owner), update_ui_count_(0) {}
bool ShouldShowDecoration() const override { return true; }
void ShowAndUpdateUI(ui_zoom::ZoomController* zoom_controller,
- NSString* tooltip_string) override {
+ NSString* tooltip_string,
+ bool location_bar_is_dark) override {
++update_ui_count_;
- ZoomDecoration::ShowAndUpdateUI(zoom_controller, tooltip_string);
+ ZoomDecoration::ShowAndUpdateUI(zoom_controller,
+ tooltip_string,
+ location_bar_is_dark);
}
int update_ui_count_;
@@ -47,18 +50,26 @@ TEST_F(ZoomDecorationTest, ChangeZoomPercent) {
MockZoomController controller(web_contents());
controller.zoom_percent_ = 100;
- decoration.UpdateIfNecessary(&controller, /*default_zoom_changed=*/false);
+ decoration.UpdateIfNecessary(&controller,
+ /*default_zoom_changed=*/false,
+ false);
EXPECT_EQ(1, decoration.update_ui_count_);
- decoration.UpdateIfNecessary(&controller, /*default_zoom_changed=*/false);
+ decoration.UpdateIfNecessary(&controller,
+ /*default_zoom_changed=*/false,
+ false);
EXPECT_EQ(1, decoration.update_ui_count_);
controller.zoom_percent_ = 80;
- decoration.UpdateIfNecessary(&controller, /*default_zoom_changed=*/false);
+ decoration.UpdateIfNecessary(&controller,
+ /*default_zoom_changed=*/false,
+ false);
EXPECT_EQ(2, decoration.update_ui_count_);
// Always redraw if the default zoom changes.
- decoration.UpdateIfNecessary(&controller, /*default_zoom_changed=*/true);
+ decoration.UpdateIfNecessary(&controller,
+ /*default_zoom_changed=*/true,
+ false);
EXPECT_EQ(3, decoration.update_ui_count_);
}
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698