chromium/content/browser/font_unique_name_lookup/font_unique_name_browsertest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/342213636): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include <memory>

#include "base/test/scoped_feature_list.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "content/browser/devtools/protocol/devtools_protocol_test_support.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/features.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/shell/browser/shell.h"

#if BUILDFLAG(IS_WIN)
#include "base/files/scoped_temp_dir.h"
#endif

namespace content {
namespace {

#if BUILDFLAG(IS_ANDROID)
const char* const kExpectedFontFamilyNames[] = {
    "AndroidClock",     "Droid Sans Mono",  "Roboto",
    "Noto Color Emoji", "Noto Sans Lao UI", "Noto Sans Lao UI",
    "Noto Sans Thai",   "Noto Sans Thai",   "Noto Sans Thai UI",
    "Noto Sans Thai UI"};
#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
const char* const kExpectedFontFamilyNames[] =;
#elif BUILDFLAG(IS_APPLE)
const char* const kExpectedFontFamilyNames[] = {"American Typewriter",
                                                "Arial Narrow",
                                                "Baskerville",
                                                "Devanagari MT",
                                                "DIN Alternate",
                                                "Gill Sans",
                                                "Iowan Old Style",
                                                "Malayalam Sangam MN",
                                                "Hiragino Maru Gothic Pro",
                                                "Hiragino Kaku Gothic StdN"};
#elif BUILDFLAG(IS_WIN)
const char* const kExpectedFontFamilyNames[] = {
    "Cambria Math", "MingLiU_HKSCS-ExtB", "NSimSun", "Calibri"};
#endif

}  // namespace

class FontUniqueNameBrowserTest : public DevToolsProtocolTest {};

// TODO(crbug.com/42050634): Make this work on Fuchsia.
#if !BUILDFLAG(IS_FUCHSIA)
IN_PROC_BROWSER_TEST_F(FontUniqueNameBrowserTest,
                       ContentLocalFontsMatching) {}
#endif

}  // namespace content