#include <stddef.h>
#include <stdint.h>
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/containers/contains.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/current_thread.h"
#include "base/test/bind.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/public/browser/render_view_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/public/test/frame_load_waiter.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
#include "content/shell/browser/shell.h"
#include "net/base/filename_util.h"
#include "third_party/blink/public/platform/web_data.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/public/test/test_web_frame_content_dumper.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_element.h"
#include "third_party/blink/public/web/web_element_collection.h"
#include "third_party/blink/public/web/web_frame_serializer.h"
#include "third_party/blink/public/web/web_frame_serializer_client.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_meta_element.h"
#include "third_party/blink/public/web/web_node.h"
#include "third_party/blink/public/web/web_savable_resources_test_support.h"
#include "third_party/blink/public/web/web_view.h"
WebData;
WebDocument;
WebElement;
WebElementCollection;
WebFrame;
WebFrameSerializer;
WebFrameSerializerClient;
WebLocalFrame;
WebMetaElement;
WebNode;
WebString;
WebURL;
WebVector;
WebView;
namespace content {
bool HasDocType(const WebDocument& doc) { … }
#if BUILDFLAG(IS_ANDROID) && defined(ADDRESS_SANITIZER)
#define MAYBE_DomSerializerTests …
#elif defined(THREAD_SANITIZER) || defined(MEMORY_SANITIZER) || \
defined(ADDRESS_SANITIZER)
#define MAYBE_DomSerializerTests …
#else
#define MAYBE_DomSerializerTests …
#endif
class MAYBE_DomSerializerTests : public ContentBrowserTest,
public WebFrameSerializerClient { … };
IN_PROC_BROWSER_TEST_F(MAYBE_DomSerializerTests,
DISABLED_SerializeHTMLDOMWithDocType) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_DomSerializerTests,
SerializeHTMLDOMWithoutDocType) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_DomSerializerTests,
SerializeXMLDocWithBuiltInEntities) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_DomSerializerTests,
SerializeHTMLDOMWithAddingMOTW) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_DomSerializerTests,
SerializeOffTheRecordHTMLDOMWithAddingMOTW) { … }
IN_PROC_BROWSER_TEST_F(
MAYBE_DomSerializerTests,
DISABLED_SerializeHTMLDOMWithNoMetaCharsetInOriginalDoc) { … }
IN_PROC_BROWSER_TEST_F(
MAYBE_DomSerializerTests,
DISABLED_SerializeHTMLDOMWithMultipleMetaCharsetInOriginalDoc) { … }
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_SerializeHTMLDOMWithEntitiesInText …
#else
#define MAYBE_SerializeHTMLDOMWithEntitiesInText …
#endif
IN_PROC_BROWSER_TEST_F(MAYBE_DomSerializerTests,
MAYBE_SerializeHTMLDOMWithEntitiesInText) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_DomSerializerTests,
SerializeHTMLDOMWithEntitiesInAttributeValue) { … }
#if BUILDFLAG(IS_LINUX)
#define MAYBE_SerializeHTMLDOMWithNonStandardEntities …
#else
#define MAYBE_SerializeHTMLDOMWithNonStandardEntities …
#endif
IN_PROC_BROWSER_TEST_F(MAYBE_DomSerializerTests,
MAYBE_SerializeHTMLDOMWithNonStandardEntities) { … }
#if BUILDFLAG(IS_LINUX)
#define MAYBE_SerializeHTMLDOMWithBaseTag …
#else
#define MAYBE_SerializeHTMLDOMWithBaseTag …
#endif
IN_PROC_BROWSER_TEST_F(MAYBE_DomSerializerTests,
MAYBE_SerializeHTMLDOMWithBaseTag) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_DomSerializerTests,
SerializeHTMLDOMWithEmptyHead) { … }
#if BUILDFLAG(IS_WIN) && defined(ADDRESS_SANITIZER)
#define MAYBE_SubResourceForElementsInNonHTMLNamespace …
#else
#define MAYBE_SubResourceForElementsInNonHTMLNamespace …
#endif
IN_PROC_BROWSER_TEST_F(MAYBE_DomSerializerTests,
MAYBE_SubResourceForElementsInNonHTMLNamespace) { … }
}