#include "third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.h"
#include "components/ukm/test_ukm_recorder.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "third_party/blink/public/web/web_settings.h"
#include "third_party/blink/renderer/core/frame/frame_test_helpers.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/url_test_helpers.h"
namespace blink {
static constexpr char kBaseUrl[] = …;
static constexpr int kDeviceWidth = …;
static constexpr int kDeviceHeight = …;
static constexpr float kMinimumZoom = …;
static constexpr float kMaximumZoom = …;
class MobileFriendlinessCheckerTest : public testing::Test { … };
TEST_F(MobileFriendlinessCheckerTest, NoViewportSetting) { … }
TEST_F(MobileFriendlinessCheckerTest, DeviceWidth) { … }
TEST_F(MobileFriendlinessCheckerTest, HardcodedViewport) { … }
TEST_F(MobileFriendlinessCheckerTest, HardcodedViewportWithDeviceScale3) { … }
TEST_F(MobileFriendlinessCheckerTest, DeviceWidthWithInitialScale05) { … }
TEST_F(MobileFriendlinessCheckerTest, AllowUserScalableWithSmallMaxZoom) { … }
TEST_F(MobileFriendlinessCheckerTest, AllowUserScalableWithLargeMaxZoom) { … }
TEST_F(MobileFriendlinessCheckerTest,
AllowUserScalableWithLargeMaxZoomAndLargeInitialScale) { … }
TEST_F(MobileFriendlinessCheckerTest, UserZoom) { … }
TEST_F(MobileFriendlinessCheckerTest, NoText) { … }
TEST_F(MobileFriendlinessCheckerTest, NoSmallFonts) { … }
TEST_F(MobileFriendlinessCheckerTest, NoSmallFontsWithDeviceScaleFactor) { … }
TEST_F(MobileFriendlinessCheckerTest, OnlySmallFonts) { … }
TEST_F(MobileFriendlinessCheckerTest, OnlySmallFontsWithDeviceScaleFactor) { … }
TEST_F(MobileFriendlinessCheckerTest, MostlySmallFont) { … }
TEST_F(MobileFriendlinessCheckerTest, MostlySmallInSpan) { … }
TEST_F(MobileFriendlinessCheckerTest, MultipleDivs) { … }
TEST_F(MobileFriendlinessCheckerTest, DontCountInvisibleSmallFontArea) { … }
TEST_F(MobileFriendlinessCheckerTest, ScaleZoomedLegibleFont) { … }
TEST_F(MobileFriendlinessCheckerTest, ViewportZoomedOutIllegibleFont) { … }
TEST_F(MobileFriendlinessCheckerTest, TooWideViewportWidthIllegibleFont) { … }
TEST_F(MobileFriendlinessCheckerTest, CSSZoomedIllegibleFont) { … }
TEST_F(MobileFriendlinessCheckerTest, OnlySmallFontsClipped) { … }
TEST_F(MobileFriendlinessCheckerTest, NormalTextAndWideImage) { … }
TEST_F(MobileFriendlinessCheckerTest, SmallTextByWideTable) { … }
TEST_F(MobileFriendlinessCheckerTest,
NormalTextAndWideImageWithDeviceWidthViewport) { … }
TEST_F(MobileFriendlinessCheckerTest, ZIndex) { … }
TEST_F(MobileFriendlinessCheckerTest, NormalTextAndWideImageWithInitialScale) { … }
TEST_F(MobileFriendlinessCheckerTest,
NormalTextAndWideImageWithInitialScaleAndDeviceScale) { … }
TEST_F(MobileFriendlinessCheckerTest, FixedWidthTableTextSizeAdjustAuto) { … }
TEST_F(MobileFriendlinessCheckerTest, FixedWidthTableTextSizeAdjustNone) { … }
TEST_F(MobileFriendlinessCheckerTest, TextNarrow) { … }
TEST_F(MobileFriendlinessCheckerTest, TextTooWide) { … }
TEST_F(MobileFriendlinessCheckerTest, TextAbsolutePositioning) { … }
TEST_F(MobileFriendlinessCheckerTest, ImageAbsolutePositioning) { … }
TEST_F(MobileFriendlinessCheckerTest, SmallTextOutsideViewportCeiling) { … }
TEST_F(MobileFriendlinessCheckerTest, TextTooWideOverflowXHidden) { … }
TEST_F(MobileFriendlinessCheckerTest, TextTooWideHidden) { … }
TEST_F(MobileFriendlinessCheckerTest, TextTooWideHiddenInDiv) { … }
TEST_F(MobileFriendlinessCheckerTest, TextTooWideHiddenInDivDiv) { … }
TEST_F(MobileFriendlinessCheckerTest, ImageNarrow) { … }
TEST_F(MobileFriendlinessCheckerTest, ImageTooWide) { … }
TEST_F(MobileFriendlinessCheckerTest, ImageTooWide100) { … }
TEST_F(MobileFriendlinessCheckerTest, WideImageClipped) { … }
TEST_F(MobileFriendlinessCheckerTest, ImageTooWideTwoImages) { … }
TEST_F(MobileFriendlinessCheckerTest, ImageTooWideAbsolutePosition) { … }
TEST_F(MobileFriendlinessCheckerTest, ImageTooWideDisplayNone) { … }
TEST_F(MobileFriendlinessCheckerTest, ScaleTextOutsideViewport) { … }
TEST_F(MobileFriendlinessCheckerTest, ScrollerOutsideViewport) { … }
TEST_F(MobileFriendlinessCheckerTest, SubScroller) { … }
TEST_F(MobileFriendlinessCheckerTest, SubScrollerHalfOutByMargin) { … }
TEST_F(MobileFriendlinessCheckerTest, SubScrollerOutByTranslate) { … }
TEST_F(MobileFriendlinessCheckerTest, SubScrollerFitsWithinViewport) { … }
TEST_F(MobileFriendlinessCheckerTest, SubScrollerTwice) { … }
TEST_F(MobileFriendlinessCheckerTest, SubScrollerInSubScroller) { … }
TEST_F(MobileFriendlinessCheckerTest, ScrollableLayoutView) { … }
TEST_F(MobileFriendlinessCheckerTest, IFrame) { … }
TEST_F(MobileFriendlinessCheckerTest, IFrameVieportDeviceWidth) { … }
TEST_F(MobileFriendlinessCheckerTest, IFrameSmallTextRatio) { … }
}