chromium/content/renderer/savable_resources_browsertest.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 "base/command_line.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "build/build_config.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
#include "net/base/filename_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/mojom/frame/frame.mojom.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/web/web_frame.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_savable_resources_test_support.h"

namespace content {

class SavableResourcesTest : public ContentBrowserTest {};

// Flaky on Linux MSan. See crbug.com/1423060.
#if BUILDFLAG(IS_LINUX) && defined(MEMORY_SANITIZER)
#define MAYBE_GetSavableResourceLinksWithPageHasValidStyleLink
#else
#define MAYBE_GetSavableResourceLinksWithPageHasValidStyleLink
#endif
IN_PROC_BROWSER_TEST_F(SavableResourcesTest,
                       MAYBE_GetSavableResourceLinksWithPageHasValidStyleLink) {}

// Test function GetAllSavableResourceLinksForCurrentPage with a web page
// which has valid savable resource links.
// Flaky on Linux MSan. See crbug.com/1423060.
#if BUILDFLAG(IS_LINUX) && defined(MEMORY_SANITIZER)
#define MAYBE_GetSavableResourceLinksWithPageHasValidLinks
#else
#define MAYBE_GetSavableResourceLinksWithPageHasValidLinks
#endif
IN_PROC_BROWSER_TEST_F(SavableResourcesTest,
                       MAYBE_GetSavableResourceLinksWithPageHasValidLinks) {}

// Test function GetAllSavableResourceLinksForCurrentPage with a web page
// which does not have valid savable resource links.
// Flaky on Linux MSan and Windows ASan. See crbug.com/1423060.
#if (BUILDFLAG(IS_LINUX) && defined(MEMORY_SANITIZER))
#define MAYBE_GetSavableResourceLinksWithPageHasInvalidLinks
#else
#define MAYBE_GetSavableResourceLinksWithPageHasInvalidLinks
#endif
IN_PROC_BROWSER_TEST_F(SavableResourcesTest,
                       MAYBE_GetSavableResourceLinksWithPageHasInvalidLinks) {}

}  // namespace content