chromium/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc

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

#include <atomic>

#include "base/command_line.h"
#include "base/memory/weak_ptr.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/extensions/api/page_capture/page_capture_api.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "content/public/test/browser_test.h"
#include "net/dns/mock_host_resolver.h"
#include "third_party/blink/public/common/switches.h"

namespace extensions {

ContextType;

class PageCaptureSaveAsMHTMLDelegate
    : public PageCaptureSaveAsMHTMLFunction::TestDelegate {};

class ExtensionPageCaptureApiTest
    : public ExtensionApiTest,
      public testing::WithParamInterface<ContextType> {};

INSTANTIATE_TEST_SUITE_P();
INSTANTIATE_TEST_SUITE_P();

// TODO(crbug.com/326868086, crbug.com/342254075): Test is flaky on MSan and on
// Windows.
#if defined(MEMORY_SANITIZER) || BUILDFLAG(IS_WIN)
#define MAYBE_SaveAsMHTMLWithoutFileAccess
#else
#define MAYBE_SaveAsMHTMLWithoutFileAccess
#endif
IN_PROC_BROWSER_TEST_P(ExtensionPageCaptureApiTest,
                       MAYBE_SaveAsMHTMLWithoutFileAccess) {}

// TODO(crbug.com/326868086): Test is flaky.
IN_PROC_BROWSER_TEST_P(ExtensionPageCaptureApiTest,
                       DISABLED_SaveAsMHTMLWithFileAccess) {}

}  // namespace extensions