#include "components/zoom/zoom_controller.h"
#include "base/memory/raw_ptr.h"
#include "base/process/kill.h"
#include "base/scoped_observation.h"
#include "base/test/bind.h"
#include "build/build_config.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/tabs/tab_enums.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/webui/signin/login_ui_test_utils.h"
#include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/prefs/pref_service.h"
#include "components/zoom/test/zoom_test_utils.h"
#include "components/zoom/zoom_observer.h"
#include "content/public/browser/disallow_activation_reason.h"
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/page_type.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/prerender_test_util.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gmock/include/gmock/gmock.h"
ZoomChangedWatcher;
ZoomController;
ZoomObserver;
class ZoomControllerBrowserTest : public InProcessBrowserTest { … };
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_CrashedTabsDoNotChangeZoom …
#else
#define MAYBE_CrashedTabsDoNotChangeZoom …
#endif
IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest,
MAYBE_CrashedTabsDoNotChangeZoom) { … }
IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest, OnPreferenceChanged) { … }
IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest, ErrorPagesCanZoom) { … }
IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest,
ErrorPagesCanZoomAfterTabRestore) { … }
IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest, Observe) { … }
IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest, ObserveDisabledModeEvent) { … }
IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest, PerTabModeResetSendsEvent) { … }
IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest, NavigationResetsManualMode) { … }
#if !BUILDFLAG(IS_MAC)
IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest,
RestoredPageScaleFromNavigation) { … }
#endif
#if !BUILDFLAG(IS_CHROMEOS)
IN_PROC_BROWSER_TEST_F(ZoomControllerBrowserTest,
SettingsZoomAfterSigninWorks) { … }
#endif
class ZoomControllerForPrerenderingTest : public ZoomControllerBrowserTest,
public zoom::ZoomObserver { … };
IN_PROC_BROWSER_TEST_F(ZoomControllerForPrerenderingTest,
DontFireZoomChangedListenerOnPrerender) { … }