#include <vector>
#include "base/memory/raw_ptr.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "content/browser/renderer_host/frame_tree_node.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/shell/browser/shell.h"
#include "content/test/content_browser_test_utils_internal.h"
#include "net/dns/mock_host_resolver.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/page/page_zoom.h"
#include "url/gurl.h"
namespace content {
class ZoomBrowserTest : public ContentBrowserTest { … };
class IFrameZoomBrowserTest : public ContentBrowserTest { … };
namespace {
const double kTolerance = …;
double GetMainframeWindowBorder(const ToRenderFrameHost& adapter) { … }
double GetMainFrameZoomFactor(const ToRenderFrameHost& adapter, double border) { … }
double GetSubframeWidth(const ToRenderFrameHost& adapter) { … }
struct FrameResizeObserver { … };
struct ResizeObserver { … };
void WaitForResize(DOMMessageQueue& msg_queue, ResizeObserver& observer) { … }
void WaitAndCheckFrameZoom(
DOMMessageQueue& msg_queue,
std::vector<FrameResizeObserver>& frame_observers) { … }
}
IN_PROC_BROWSER_TEST_F(ZoomBrowserTest, DISABLED_ZoomPreservedOnReload) { … }
IN_PROC_BROWSER_TEST_F(IFrameZoomBrowserTest, DISABLED_SubframesZoomProperly) { … }
IN_PROC_BROWSER_TEST_F(IFrameZoomBrowserTest, SubframesDontZoomIndependently) { … }
IN_PROC_BROWSER_TEST_F(IFrameZoomBrowserTest,
DISABLED_AllFramesGetDefaultZoom) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_SiblingFramesZoom …
#else
#define MAYBE_SiblingFramesZoom …
#endif
IN_PROC_BROWSER_TEST_F(IFrameZoomBrowserTest, MAYBE_SiblingFramesZoom) { … }
IN_PROC_BROWSER_TEST_F(IFrameZoomBrowserTest, SubframeRetainsZoomOnNavigation) { … }
IN_PROC_BROWSER_TEST_F(IFrameZoomBrowserTest,
RedirectToPageWithSubframeZoomsCorrectly) { … }
IN_PROC_BROWSER_TEST_F(IFrameZoomBrowserTest,
SubframesDontBreakConnectionToRenderer) { … }
}