5#include <unordered_set>
7#include "gtest/gtest.h"
15TEST(AXRolePropertiesTest, TestSupportsHierarchicalLevel) {
18 std::unordered_set<ax::mojom::Role>
19 roles_expected_supports_hierarchical_level = {
29 SCOPED_TRACE(testing::Message() <<
"ax::mojom::Role=" <<
ToString(role)
30 <<
", Actual: supportsHierarchicalLevel="
31 << supports_hierarchical_level
32 <<
", Expected: supportsHierarchicalLevel="
33 << !supports_hierarchical_level);
35 if (roles_expected_supports_hierarchical_level.find(role) !=
36 roles_expected_supports_hierarchical_level.end())
39 EXPECT_FALSE(supports_hierarchical_level);
43TEST(AXRolePropertiesTest, TestSupportsToggle) {
46 std::unordered_set<ax::mojom::Role> roles_expected_supports_toggle = {
55 SCOPED_TRACE(testing::Message()
56 <<
"ax::mojom::Role=" <<
ToString(role)
57 <<
", Actual: supportsToggle=" << supports_toggle
58 <<
", Expected: supportsToggle=" << !supports_toggle);
60 if (roles_expected_supports_toggle.find(role) !=
61 roles_expected_supports_toggle.end())
64 EXPECT_FALSE(supports_toggle);
TEST(AXEnumUtilTest, Event)
const char * ToString(ax::mojom::Event event)
bool SupportsHierarchicalLevel(const ax::mojom::Role role)
bool SupportsToggle(const ax::mojom::Role role)
#define EXPECT_TRUE(handle)