chromium/ui/accessibility/ax_enum_util_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.

#include "ui/accessibility/ax_enum_util.h"

#include <string>
#include <vector>

#include "testing/gtest/include/gtest/gtest.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"

namespace ui {

// Templatized function that tests that for a mojom enum
// such as ax::mojom::Role, ax::mojom::Event, etc. we can
// call ToString() on the enum to get a string, and then
// ParseAXEnum() on the string to get back the original
// value. Also tests what happens when we call ToString
// or ParseAXEnum on a bogus value.
template <typename T>
void TestEnumStringConversion(
    int32_t(step)(int32_t) = [](int32_t val) {}

// Templatized function that tries calling a setter on AXNodeData
// such as AddIntAttribute, AddFloatAttribute - with each possible
// enum value.
//
// This variant is for cases where the value type is an object.
template <typename T, typename U>
void TestAXNodeDataSetter(void (AXNodeData::*Setter)(T, const U&),
                          const U& value) {}

// Same as TextAXNodeData, above, but This variant is for
// cases where the value type is POD.
template <typename T, typename U>
void TestAXNodeDataSetter(void (AXNodeData::*Setter)(T, U), U value) {}

TEST(AXEnumUtilTest, Event) {}

TEST(AXEnumUtilTest, Role) {}

TEST(AXEnumUtilTest, State) {}

TEST(AXEnumUtilTest, Action) {}

TEST(AXEnumUtilTest, ActionFlags) {}

TEST(AXEnumUtilTest, DefaultActionVerb) {}

TEST(AXEnumUtilTest, Mutation) {}

TEST(AXEnumUtilTest, StringAttribute) {}

TEST(AXEnumUtilTest, IntAttribute) {}

TEST(AXEnumUtilTest, FloatAttribute) {}

TEST(AXEnumUtilTest, BoolAttribute) {}

TEST(AXEnumUtilTest, IntListAttribute) {}

TEST(AXEnumUtilTest, StringListAttribute) {}

TEST(AXEnumUtilTest, MarkerType) {}

TEST(AXEnumUtilTest, Text_Decoration_Style) {}

TEST(AXEnumUtilTest, ListStyle) {}

TEST(AXEnumUtilTest, MoveDirection) {}

TEST(AXEnumUtilTest, Command) {}

TEST(AXEnumUtilTest, InputEventType) {}

TEST(AXEnumUtilTest, TextBoundary) {}

TEST(AXEnumUtilTest, TextAlign) {}

TEST(AXEnumUtilTest, WritingDirection) {}

TEST(AXEnumUtilTest, TextPosition) {}

TEST(AXEnumUtilTest, TextStyle) {}

TEST(AXEnumUtilTest, AriaCurrentState) {}

TEST(AXEnumUtilTest, HasPopup) {}

TEST(AXEnumUtilTest, InvalidState) {}

TEST(AXEnumUtilTest, Restriction) {}

TEST(AXEnumUtilTest, CheckedState) {}

TEST(AXEnumUtilTest, SortDirection) {}

TEST(AXEnumUtilTest, NameFrom) {}

TEST(AXEnumUtilTest, DescriptionFrom) {}

TEST(AXEnumUtilTest, EventFrom) {}

TEST(AXEnumUtilTest, Gesture) {}

TEST(AXEnumUtilTest, TextAffinity) {}

TEST(AXEnumUtilTest, TreeOrder) {}

TEST(AXEnumUtilTest, ImageAnnotationStatus) {}

}  // namespace ui