chromium/third_party/pdfium/fpdfsdk/fpdf_text_embeddertest.cpp

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

#include <algorithm>
#include <array>
#include <utility>
#include <vector>

#include "build/build_config.h"
#include "core/fxcrt/compiler_specific.h"
#include "core/fxcrt/stl_util.h"
#include "core/fxge/fx_font.h"
#include "public/cpp/fpdf_scopers.h"
#include "public/fpdf_doc.h"
#include "public/fpdf_text.h"
#include "public/fpdf_transformpage.h"
#include "public/fpdfview.h"
#include "testing/embedder_test.h"
#include "testing/fx_string_testhelpers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

ElementsAreArray;

namespace {

constexpr char kHelloGoodbyeText[] =;
constexpr int kHelloGoodbyeTextSize =;

bool check_unsigned_shorts(const char* expected,
                           const unsigned short* actual,
                           size_t length) {}

}  // namespace

class FPDFTextEmbedderTest : public EmbedderTest {};

TEST_F(FPDFTextEmbedderTest, Text) {}

TEST_F(FPDFTextEmbedderTest, TextVertical) {}

TEST_F(FPDFTextEmbedderTest, TextHebrewMirrored) {}

TEST_F(FPDFTextEmbedderTest, TextSearch) {}

TEST_F(FPDFTextEmbedderTest, TextSearchConsecutive) {}

TEST_F(FPDFTextEmbedderTest, TextSearchTermAtEnd) {}

TEST_F(FPDFTextEmbedderTest, TextSearchLeadingSpace) {}

TEST_F(FPDFTextEmbedderTest, TextSearchTrailingSpace) {}

TEST_F(FPDFTextEmbedderTest, TextSearchSpaceInSearchTerm) {}

// Fails on Windows. https://crbug.com/pdfium/1370
#if BUILDFLAG(IS_WIN)
#define MAYBE_TextSearchLatinExtended
#else
#define MAYBE_TextSearchLatinExtended
#endif
TEST_F(FPDFTextEmbedderTest, MAYBE_TextSearchLatinExtended) {}

// Test that the page has characters despite a bad stream length.
TEST_F(FPDFTextEmbedderTest, StreamLengthPastEndOfFile) {}

TEST_F(FPDFTextEmbedderTest, WebLinks) {}

TEST_F(FPDFTextEmbedderTest, WebLinksAcrossLines) {}

TEST_F(FPDFTextEmbedderTest, WebLinksAcrossLinesBug) {}

TEST_F(FPDFTextEmbedderTest, WebLinksCharRanges) {}

TEST_F(FPDFTextEmbedderTest, AnnotLinks) {}

TEST_F(FPDFTextEmbedderTest, GetFontSize) {}

TEST_F(FPDFTextEmbedderTest, GetFontInfo) {}

TEST_F(FPDFTextEmbedderTest, ToUnicode) {}

TEST_F(FPDFTextEmbedderTest, IsGenerated) {}

TEST_F(FPDFTextEmbedderTest, IsHyphen) {}

TEST_F(FPDFTextEmbedderTest, IsInvalidUnicode) {}

TEST_F(FPDFTextEmbedderTest, Bug921) {}

TEST_F(FPDFTextEmbedderTest, GetTextWithHyphen) {}

TEST_F(FPDFTextEmbedderTest, Bug782596) {}

TEST_F(FPDFTextEmbedderTest, ControlCharacters) {}

// Testing that hyphen makers (0x0002) are replacing hard hyphens when
// the word contains non-ASCII characters.
TEST_F(FPDFTextEmbedderTest, Bug1029) {}

TEST_F(FPDFTextEmbedderTest, CountRects) {}

TEST_F(FPDFTextEmbedderTest, GetText) {}

TEST_F(FPDFTextEmbedderTest, CroppedText) {}

TEST_F(FPDFTextEmbedderTest, Bug1139) {}

TEST_F(FPDFTextEmbedderTest, Bug642) {}

TEST_F(FPDFTextEmbedderTest, GetCharAngle) {}

TEST_F(FPDFTextEmbedderTest, GetFontWeight) {}

TEST_F(FPDFTextEmbedderTest, GetTextRenderMode) {}

TEST_F(FPDFTextEmbedderTest, GetFillColor) {}

TEST_F(FPDFTextEmbedderTest, GetStrokeColor) {}

TEST_F(FPDFTextEmbedderTest, GetMatrix) {}

TEST_F(FPDFTextEmbedderTest, CharBox) {}

TEST_F(FPDFTextEmbedderTest, SmallType3Glyph) {}

TEST_F(FPDFTextEmbedderTest, BigtableTextExtraction) {}

TEST_F(FPDFTextEmbedderTest, Bug1769) {}