font_fallback_test_data.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef UI_GFX_TEST_FONT_FALLBACK_TEST_DATA_H_
  5. #define UI_GFX_TEST_FONT_FALLBACK_TEST_DATA_H_
  6. #include <string>
  7. #include <vector>
  8. #include "third_party/icu/source/common/unicode/uscript.h"
  9. namespace gfx {
  10. // A font test case for the parameterized unittests.
  11. struct FallbackFontTestCase {
  12. FallbackFontTestCase();
  13. FallbackFontTestCase(UScriptCode script_arg,
  14. std::string language_tag_arg,
  15. std::u16string text_arg,
  16. std::vector<std::string> fallback_fonts_arg,
  17. bool is_win10_arg = false);
  18. FallbackFontTestCase(const FallbackFontTestCase& other);
  19. ~FallbackFontTestCase();
  20. UScriptCode script;
  21. std::string language_tag;
  22. std::u16string text;
  23. std::vector<std::string> fallback_fonts;
  24. bool is_win10 = false;
  25. };
  26. extern std::vector<FallbackFontTestCase> kGetFontFallbackTests;
  27. } // namespace gfx
  28. #endif // UI_GFX_TEST_FONT_FALLBACK_TEST_DATA_H_