chromium/pdf/pdfium/pdfium_engine_exports_unittest.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.

#include <optional>
#include <utility>

#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/path_service.h"
#include "base/test/mock_callback.h"
#include "pdf/pdf.h"
#include "pdf/pdfium/pdfium_engine.h"
#include "services/screen_ai/buildflags/buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/pdfium/public/cpp/fpdf_scopers.h"
#include "third_party/pdfium/public/fpdf_text.h"
#include "third_party/pdfium/public/fpdfview.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/geometry/size_f.h"
#include "ui/gfx/geometry/test/geometry_util.h"

#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
#include <memory>
#include <string>

#include "base/check_op.h"
#include "base/strings/utf_string_conversions.h"
#include "pdf/pdf_progressive_searchifier.h"
#include "services/screen_ai/public/mojom/screen_ai_service.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/skia/include/core/SkBitmap.h"
#endif  // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)

namespace chrome_pdf {

namespace {

class ScopedLibraryInitializer {};

class PDFiumEngineExportsTest : public testing::Test {};

// Returns all characters in the page.
std::string GetText(base::span<const uint8_t> pdf, int page_index) {}

std::vector<gfx::RectF> GetTextPositions(base::span<const uint8_t> pdf,
                                         int page_index) {}

}  // namespace

TEST_F(PDFiumEngineExportsTest, GetPDFDocInfo) {}

TEST_F(PDFiumEngineExportsTest, GetPDFPageSizeByIndex) {}

TEST_F(PDFiumEngineExportsTest, ConvertPdfPagesToNupPdf) {}

TEST_F(PDFiumEngineExportsTest, ConvertPdfDocumentToNupPdf) {}

#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
constexpr char kExpectedText[] =;

TEST_F(PDFiumEngineExportsTest, Searchify) {}

TEST_F(PDFiumEngineExportsTest, SearchifyBroken) {}

TEST_F(PDFiumEngineExportsTest, SearchifyBigImage) {}

TEST_F(PDFiumEngineExportsTest, PdfProgressiveSearchifier) {}

TEST_F(PDFiumEngineExportsTest, PdfProgressiveSearchifierText) {}

#endif  // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)

}  // namespace chrome_pdf