#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
#include "base/timer/lap_timer.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/perf/perf_result_reporter.h"
#include "third_party/blink/renderer/platform/fonts/font.h"
#include "third_party/blink/renderer/platform/fonts/font_description.h"
#include "third_party/blink/renderer/platform/testing/font_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
CreateTestFont;
namespace blink {
static const int kTimeLimitMillis = …;
static const int kWarmupRuns = …;
static const int kTimeCheckInterval = …;
namespace {
constexpr char kMetricPrefixOffsetForPosition[] = …;
constexpr char kMetricPrefixCharacterRange[] = …;
constexpr char kMetricThroughput[] = …;
}
class ShapeResultPerfTest { … };
class OffsetForPositionPerfTest : public ShapeResultPerfTest,
public testing::TestWithParam<float> { … };
class CharacterRangePerfTest : public ShapeResultPerfTest,
public testing::TestWithParam<int> { … };
TEST_P(OffsetForPositionPerfTest, LTROffsetForPositionFullBreak) { … }
TEST_P(OffsetForPositionPerfTest, LTROffsetForPositionFullDontBreak) { … }
TEST_P(OffsetForPositionPerfTest, LTROffsetForPositionIncludePartialBreak) { … }
TEST_P(OffsetForPositionPerfTest, LTROffsetForPositionIncludePartialDontBreak) { … }
TEST_P(OffsetForPositionPerfTest, RTLOffsetForPositionFullBreak) { … }
TEST_P(OffsetForPositionPerfTest, RTLOffsetForPositionFullDontBreak) { … }
TEST_P(OffsetForPositionPerfTest, RTLOffsetForPositionIncludePartialBreak) { … }
TEST_P(OffsetForPositionPerfTest, RTLOffsetForPositionIncludePartialDontBreak) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(CharacterRangePerfTest, LTRCharacterForPosition) { … }
TEST_P(CharacterRangePerfTest, RTLCharacterForPosition) { … }
INSTANTIATE_TEST_SUITE_P(…);
}