chromium/chrome/browser/page_load_metrics/integration_tests/image_loading_uma_browsertest.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/test/metrics/histogram_tester.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/metrics/content/subprocess_metrics_provider.h"
#include "components/page_load_metrics/browser/page_load_metrics_test_waiter.h"
#include "content/public/common/content_paths.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "net/test/embedded_test_server/controllable_http_response.h"
#include "net/test/embedded_test_server/embedded_test_server.h"

class ImageLoadingUMATest : public InProcessBrowserTest {};

IN_PROC_BROWSER_TEST_F(ImageLoadingUMATest, NoAttributeImage) {}

IN_PROC_BROWSER_TEST_F(ImageLoadingUMATest, StyledImage) {}

IN_PROC_BROWSER_TEST_F(ImageLoadingUMATest, ImageWithWidthAttribute) {}

IN_PROC_BROWSER_TEST_F(ImageLoadingUMATest, ImageWithCorrectSizesAttribute) {}

IN_PROC_BROWSER_TEST_F(ImageLoadingUMATest, ImageWithIncorrectSizesAttribute) {}

// TODO(crbug.com/40916617): Fix this test on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_PictureWithIncorrectSizesAttribute
#else
#define MAYBE_PictureWithIncorrectSizesAttribute
#endif
IN_PROC_BROWSER_TEST_F(ImageLoadingUMATest,
                       MAYBE_PictureWithIncorrectSizesAttribute) {}

class ImageLoadingUMAHighDPITest : public ImageLoadingUMATest {};

IN_PROC_BROWSER_TEST_F(ImageLoadingUMAHighDPITest,
                       PictureWithIncorrectSizesAttribute) {}