chromium/pdf/pdfium/accessibility_unittest.cc

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

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

#include "pdf/accessibility.h"

#include <string>

#include "pdf/accessibility_structs.h"
#include "pdf/pdfium/pdfium_engine.h"
#include "pdf/pdfium/pdfium_test_base.h"
#include "pdf/test/test_client.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/vector2d.h"

namespace chrome_pdf {

AccessibilityTest;

float GetExpectedBoundsWidth(bool using_test_fonts, size_t i, float expected) {}

double GetExpectedCharWidth(bool using_test_fonts, size_t i, double expected) {}

// NOTE: This test is sensitive to font metrics from the underlying platform.
// If changes to fonts on the system or to font code like FreeType cause this
// test to fail, please feel free to rebase the test expectations here, or
// update the GetExpected... functions above. If that becomes too much of a
// burden, consider changing the checks to just make sure the font metrics look
// sane.
TEST_P(AccessibilityTest, GetAccessibilityPage) {}

TEST_P(AccessibilityTest, GetAccessibilityImageInfo) {}

TEST_P(AccessibilityTest, GetUnderlyingTextRangeForRect) {}

// This class overrides TestClient to record points received when a scroll
// call is made by tests.
class ScrollEnabledTestClient : public TestClient {};

TEST_P(AccessibilityTest, ScrollIntoViewActionHandling) {}

TEST_P(AccessibilityTest, ScrollToNearestEdge) {}

TEST_P(AccessibilityTest, ScrollToGlobalPoint) {}

// This class is required to just override the NavigateTo
// functionality for testing in a specific way. It will
// keep the TestClient class clean for extension by others.
class NavigationEnabledTestClient : public TestClient {};

TEST_P(AccessibilityTest, WebLinkClickActionHandling) {}

TEST_P(AccessibilityTest, InternalLinkClickActionHandling) {}

TEST_P(AccessibilityTest, GetAccessibilityLinkInfo) {}

TEST_P(AccessibilityTest, GetAccessibilityHighlightInfo) {}

TEST_P(AccessibilityTest, GetAccessibilityTextFieldInfo) {}

TEST_P(AccessibilityTest, SelectionActionHandling) {}

// Tests if PP_PDF_SET_SELECTION updates scroll offsets if the selection is not
// in the current visible rect.
TEST_P(AccessibilityTest, SetSelectionAndScroll) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace chrome_pdf