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

Side by Side Diff: chrome/browser/ui/zoom/zoom_controller_unittest.cc

Issue 310913002: Issue 32919: Update the Zoom NSMenuItems (Zoom-In/Zoom-out/Actual-Size) when the zoom state changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved the unit tests to browser_commands_unittest since its independent of ZoomController Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5
5 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
6 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/chrome_page_zoom.h"
7 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_command_controller.h"
12 #include "chrome/browser/ui/browser_commands.h"
8 #include "chrome/browser/ui/browser_finder.h" 13 #include "chrome/browser/ui/browser_finder.h"
14 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "chrome/browser/ui/zoom/zoom_controller.h" 15 #include "chrome/browser/ui/zoom/zoom_controller.h"
10 #include "chrome/browser/ui/zoom/zoom_observer.h" 16 #include "chrome/browser/ui/zoom/zoom_observer.h"
11 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
18 #include "chrome/test/base/browser_with_test_window_test.h"
12 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 19 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
13 #include "chrome/test/base/testing_profile.h" 20 #include "chrome/test/base/testing_profile.h"
14 #include "content/public/browser/host_zoom_map.h" 21 #include "content/public/browser/host_zoom_map.h"
15 #include "content/public/browser/navigation_details.h" 22 #include "content/public/browser/navigation_details.h"
23 #include "content/public/browser/site_instance.h"
24 #include "content/public/browser/web_contents.h"
Alexei Svitkine (slow) 2014/08/04 15:49:15 Can you revert these changes to this file? Right n
16 #include "content/public/common/frame_navigate_params.h" 25 #include "content/public/common/frame_navigate_params.h"
17 #include "content/public/test/test_utils.h" 26 #include "content/public/test/test_utils.h"
18 #include "testing/gmock/include/gmock/gmock.h" 27 #include "testing/gmock/include/gmock/gmock.h"
19 #include "testing/gtest/include/gtest/gtest.h" 28 #include "testing/gtest/include/gtest/gtest.h"
20 29
21 bool operator==(const ZoomController::ZoomChangedEventData& lhs, 30 bool operator==(const ZoomController::ZoomChangedEventData& lhs,
22 const ZoomController::ZoomChangedEventData& rhs) { 31 const ZoomController::ZoomChangedEventData& rhs) {
23 return lhs.web_contents == rhs.web_contents && 32 return lhs.web_contents == rhs.web_contents &&
24 lhs.old_zoom_level == rhs.old_zoom_level && 33 lhs.old_zoom_level == rhs.old_zoom_level &&
25 lhs.new_zoom_level == rhs.new_zoom_level && 34 lhs.new_zoom_level == rhs.new_zoom_level &&
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 ZoomController::ZoomChangedEventData zoom_change_data2( 127 ZoomController::ZoomChangedEventData zoom_change_data2(
119 web_contents(), 128 web_contents(),
120 old_zoom_level, 129 old_zoom_level,
121 new_zoom_level, 130 new_zoom_level,
122 ZoomController::ZOOM_MODE_ISOLATED, 131 ZoomController::ZOOM_MODE_ISOLATED,
123 false /* can_show_bubble */); 132 false /* can_show_bubble */);
124 EXPECT_CALL(zoom_observer_, OnZoomChanged(zoom_change_data2)).Times(1); 133 EXPECT_CALL(zoom_observer_, OnZoomChanged(zoom_change_data2)).Times(1);
125 134
126 zoom_controller_->SetZoomLevel(new_zoom_level); 135 zoom_controller_->SetZoomLevel(new_zoom_level);
127 } 136 }
OLDNEW
« chrome/browser/browser_commands_unittest.cc ('K') | « chrome/browser/ui/browser_commands.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698