#include <memory>
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "chrome/browser/subresource_filter/subresource_filter_browser_test_harness.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/test/base/chrome_test_utils.h"
#include "components/infobars/content/content_infobar_manager.h"
#include "components/infobars/core/infobar.h"
#include "components/infobars/core/infobar_delegate.h"
#include "components/infobars/core/infobar_manager.h"
#include "components/page_load_metrics/browser/page_load_metrics_test_waiter.h"
#include "components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h"
#include "components/subresource_filter/core/common/common_features.h"
#include "components/subresource_filter/core/common/test_ruleset_utils.h"
#include "components/subresource_filter/core/mojom/subresource_filter.mojom.h"
#include "components/ukm/test_ukm_recorder.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace {
const char kAdsInterventionRecordedHistogram[] = …;
int GetDocumentHeight(content::WebContents* web_contents) { … }
}
class AdDensityViolationBrowserTest
: public subresource_filter::SubresourceFilterBrowserTest { … };
#if BUILDFLAG(IS_MAC)
#define MAYBE_DesktopPageAdDensityByHeightAbove30_AdInterventionNotTriggered …
#else
#define MAYBE_DesktopPageAdDensityByHeightAbove30_AdInterventionNotTriggered …
#endif
IN_PROC_BROWSER_TEST_F(
AdDensityViolationBrowserTest,
MAYBE_DesktopPageAdDensityByHeightAbove30_AdInterventionNotTriggered) { … }