[go: nahoru, domu]

blob: 2092adb21cf443d823b7623c77df5a36b9bb047e [file] [log] [blame]
Nektarios Paisiosbe87bc42018-10-12 23:47:031// Copyright 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "ui/accessibility/ax_node_data.h"
6
Nektarios Paisios31e51882020-05-05 22:17:127#include <set>
Lei Zhang998100f2021-06-25 17:58:198#include <string>
9#include <unordered_set>
10#include <utility>
Nektarios Paisios31e51882020-05-05 22:17:1211
Jan Wilken Dörrie721926d2020-12-09 23:57:4712#include "base/containers/contains.h"
Joanmarie Diggs762303d2022-08-09 10:56:5713#include "base/test/gtest_util.h"
Nektarios Paisiosbe87bc42018-10-12 23:47:0314#include "testing/gtest/include/gtest/gtest.h"
Ian Preste1c32992019-12-04 19:53:1315#include "ui/accessibility/ax_enum_util.h"
Nektarios Paisiosbe87bc42018-10-12 23:47:0316#include "ui/accessibility/ax_enums.mojom.h"
Ian Preste1c32992019-12-04 19:53:1317#include "ui/accessibility/ax_role_properties.h"
Nektarios Paisios70b6a5e2021-08-03 05:32:3618#include "ui/accessibility/ax_text_attributes.h"
Nektarios Paisiosbe87bc42018-10-12 23:47:0319
20namespace ui {
21
22TEST(AXNodeDataTest, GetAndSetCheckedState) {
23 AXNodeData root;
24 EXPECT_EQ(ax::mojom::CheckedState::kNone, root.GetCheckedState());
25 EXPECT_FALSE(root.HasIntAttribute(ax::mojom::IntAttribute::kCheckedState));
26
27 root.SetCheckedState(ax::mojom::CheckedState::kMixed);
28 EXPECT_EQ(ax::mojom::CheckedState::kMixed, root.GetCheckedState());
29 EXPECT_TRUE(root.HasIntAttribute(ax::mojom::IntAttribute::kCheckedState));
30
31 root.SetCheckedState(ax::mojom::CheckedState::kFalse);
32 EXPECT_EQ(ax::mojom::CheckedState::kFalse, root.GetCheckedState());
33 EXPECT_TRUE(root.HasIntAttribute(ax::mojom::IntAttribute::kCheckedState));
34
35 root.SetCheckedState(ax::mojom::CheckedState::kNone);
36 EXPECT_EQ(ax::mojom::CheckedState::kNone, root.GetCheckedState());
37 EXPECT_FALSE(root.HasIntAttribute(ax::mojom::IntAttribute::kCheckedState));
38}
39
Kurt Catti-Schmidtf738bce2019-05-08 01:06:5640TEST(AXNodeDataTest, TextAttributes) {
41 AXNodeData node_1;
42 node_1.AddFloatAttribute(ax::mojom::FloatAttribute::kFontSize, 1.5);
43
44 AXNodeData node_2;
45 node_2.AddFloatAttribute(ax::mojom::FloatAttribute::kFontSize, 1.5);
Nektarios Paisios70b6a5e2021-08-03 05:32:3646 EXPECT_TRUE(node_1.GetTextAttributes() == node_2.GetTextAttributes());
Kurt Catti-Schmidtf738bce2019-05-08 01:06:5647
48 node_2.AddIntAttribute(ax::mojom::IntAttribute::kColor, 100);
Nektarios Paisios70b6a5e2021-08-03 05:32:3649 EXPECT_TRUE(node_1.GetTextAttributes() != node_2.GetTextAttributes());
Kurt Catti-Schmidtf738bce2019-05-08 01:06:5650
51 node_1.AddIntAttribute(ax::mojom::IntAttribute::kColor, 100);
Nektarios Paisios70b6a5e2021-08-03 05:32:3652 EXPECT_TRUE(node_1.GetTextAttributes() == node_2.GetTextAttributes());
Kurt Catti-Schmidtf738bce2019-05-08 01:06:5653
54 node_2.RemoveIntAttribute(ax::mojom::IntAttribute::kColor);
Nektarios Paisios70b6a5e2021-08-03 05:32:3655 EXPECT_TRUE(node_1.GetTextAttributes() != node_2.GetTextAttributes());
Kurt Catti-Schmidtf738bce2019-05-08 01:06:5656
57 node_2.AddIntAttribute(ax::mojom::IntAttribute::kColor, 100);
Nektarios Paisios70b6a5e2021-08-03 05:32:3658 EXPECT_TRUE(node_1.GetTextAttributes() == node_2.GetTextAttributes());
Kurt Catti-Schmidtf738bce2019-05-08 01:06:5659
60 node_1.AddStringAttribute(ax::mojom::StringAttribute::kFontFamily,
61 "test font");
Nektarios Paisios70b6a5e2021-08-03 05:32:3662 EXPECT_TRUE(node_1.GetTextAttributes() != node_2.GetTextAttributes());
Kurt Catti-Schmidtf738bce2019-05-08 01:06:5663
64 node_2.AddStringAttribute(ax::mojom::StringAttribute::kFontFamily,
65 "test font");
Nektarios Paisios70b6a5e2021-08-03 05:32:3666 EXPECT_TRUE(node_1.GetTextAttributes() == node_2.GetTextAttributes());
Kurt Catti-Schmidtf738bce2019-05-08 01:06:5667
68 node_2.RemoveStringAttribute(ax::mojom::StringAttribute::kFontFamily);
Nektarios Paisios70b6a5e2021-08-03 05:32:3669 EXPECT_TRUE(node_1.GetTextAttributes() != node_2.GetTextAttributes());
Kurt Catti-Schmidtf738bce2019-05-08 01:06:5670
71 node_2.AddStringAttribute(ax::mojom::StringAttribute::kFontFamily,
72 "test font");
Nektarios Paisios70b6a5e2021-08-03 05:32:3673 EXPECT_TRUE(node_1.GetTextAttributes() == node_2.GetTextAttributes());
Kurt Catti-Schmidtf738bce2019-05-08 01:06:5674
75 node_2.AddStringAttribute(ax::mojom::StringAttribute::kFontFamily,
76 "different font");
Nektarios Paisios70b6a5e2021-08-03 05:32:3677 EXPECT_TRUE(node_1.GetTextAttributes() != node_2.GetTextAttributes());
Kurt Catti-Schmidtf738bce2019-05-08 01:06:5678
Sara Katoe38f905a2019-10-17 01:25:0079 std::string tooltip;
80 node_2.AddStringAttribute(ax::mojom::StringAttribute::kTooltip,
81 "test tooltip");
82 EXPECT_TRUE(node_2.GetStringAttribute(ax::mojom::StringAttribute::kTooltip,
83 &tooltip));
84 EXPECT_EQ(tooltip, "test tooltip");
85
Nektarios Paisios70b6a5e2021-08-03 05:32:3686 AXTextAttributes node1_attributes = node_1.GetTextAttributes();
87 AXTextAttributes moved_attributes = std::move(node1_attributes);
88 EXPECT_TRUE(node1_attributes != moved_attributes);
89 EXPECT_TRUE(moved_attributes == node_1.GetTextAttributes());
Kurt Catti-Schmidtf738bce2019-05-08 01:06:5690}
91
Victor Fei4f5aa7d2020-04-09 03:15:5092TEST(AXNodeDataTest, IsButtonPressed) {
93 // A non-button element with CheckedState::kTrue should not return true for
94 // IsButtonPressed.
95 AXNodeData non_button_pressed;
96 non_button_pressed.role = ax::mojom::Role::kGenericContainer;
97 non_button_pressed.SetCheckedState(ax::mojom::CheckedState::kTrue);
98 EXPECT_FALSE(IsButton(non_button_pressed.role));
99 EXPECT_FALSE(non_button_pressed.IsButtonPressed());
100
101 // A button element with CheckedState::kTrue should return true for
102 // IsButtonPressed.
103 AXNodeData button_pressed;
104 button_pressed.role = ax::mojom::Role::kButton;
105 button_pressed.SetCheckedState(ax::mojom::CheckedState::kTrue);
106 EXPECT_TRUE(IsButton(button_pressed.role));
107 EXPECT_TRUE(button_pressed.IsButtonPressed());
108
109 button_pressed.role = ax::mojom::Role::kPopUpButton;
110 EXPECT_TRUE(IsButton(button_pressed.role));
111 EXPECT_TRUE(button_pressed.IsButtonPressed());
112
113 button_pressed.role = ax::mojom::Role::kToggleButton;
114 EXPECT_TRUE(IsButton(button_pressed.role));
115 EXPECT_TRUE(button_pressed.IsButtonPressed());
116
117 // A button element does not have CheckedState::kTrue should return false for
118 // IsButtonPressed.
119 AXNodeData button_not_pressed;
120 button_not_pressed.role = ax::mojom::Role::kButton;
121 button_not_pressed.SetCheckedState(ax::mojom::CheckedState::kNone);
122 EXPECT_TRUE(IsButton(button_not_pressed.role));
123 EXPECT_FALSE(button_not_pressed.IsButtonPressed());
124
125 button_not_pressed.role = ax::mojom::Role::kPopUpButton;
126 button_not_pressed.SetCheckedState(ax::mojom::CheckedState::kFalse);
127 EXPECT_TRUE(IsButton(button_not_pressed.role));
128 EXPECT_FALSE(button_not_pressed.IsButtonPressed());
129
130 button_not_pressed.role = ax::mojom::Role::kToggleButton;
131 button_not_pressed.SetCheckedState(ax::mojom::CheckedState::kMixed);
132 EXPECT_TRUE(IsButton(button_not_pressed.role));
133 EXPECT_FALSE(button_not_pressed.IsButtonPressed());
134}
135
136TEST(AXNodeDataTest, IsClickable) {
Ian Preste1c32992019-12-04 19:53:13137 // Test for ax node data attribute with a custom default action verb.
138 AXNodeData data_default_action_verb;
139
140 for (int action_verb_idx =
141 static_cast<int>(ax::mojom::DefaultActionVerb::kMinValue);
142 action_verb_idx <=
143 static_cast<int>(ax::mojom::DefaultActionVerb::kMaxValue);
144 action_verb_idx++) {
145 data_default_action_verb.SetDefaultActionVerb(
146 static_cast<ax::mojom::DefaultActionVerb>(action_verb_idx));
147 bool is_clickable = data_default_action_verb.IsClickable();
148
149 SCOPED_TRACE(testing::Message()
150 << "ax::mojom::DefaultActionVerb="
151 << ToString(data_default_action_verb.GetDefaultActionVerb())
152 << ", Actual: isClickable=" << is_clickable
153 << ", Expected: isClickable=" << !is_clickable);
154
155 if (data_default_action_verb.GetDefaultActionVerb() ==
156 ax::mojom::DefaultActionVerb::kClickAncestor ||
157 data_default_action_verb.GetDefaultActionVerb() ==
158 ax::mojom::DefaultActionVerb::kNone)
159 EXPECT_FALSE(is_clickable);
160 else
161 EXPECT_TRUE(is_clickable);
162 }
163
164 // Test for iterating through all roles and validate if a role is clickable.
Nektarios Paisios31e51882020-05-05 22:17:12165 std::set<ax::mojom::Role> roles_expected_is_clickable = {
Ian Preste1c32992019-12-04 19:53:13166 ax::mojom::Role::kButton,
167 ax::mojom::Role::kCheckBox,
168 ax::mojom::Role::kColorWell,
Nektarios Paisios31e51882020-05-05 22:17:12169 ax::mojom::Role::kComboBoxMenuButton,
170 ax::mojom::Role::kDate,
171 ax::mojom::Role::kDateTime,
Ian Preste1c32992019-12-04 19:53:13172 ax::mojom::Role::kDisclosureTriangle,
173 ax::mojom::Role::kDocBackLink,
174 ax::mojom::Role::kDocBiblioRef,
175 ax::mojom::Role::kDocGlossRef,
176 ax::mojom::Role::kDocNoteRef,
Nektarios Paisios31e51882020-05-05 22:17:12177 ax::mojom::Role::kImeCandidate,
178 ax::mojom::Role::kInputTime,
Ian Preste1c32992019-12-04 19:53:13179 ax::mojom::Role::kLink,
Nektarios Paisios31e51882020-05-05 22:17:12180 ax::mojom::Role::kListBox,
Ian Preste1c32992019-12-04 19:53:13181 ax::mojom::Role::kListBoxOption,
Ian Preste1c32992019-12-04 19:53:13182 ax::mojom::Role::kMenuItem,
183 ax::mojom::Role::kMenuItemCheckBox,
184 ax::mojom::Role::kMenuItemRadio,
185 ax::mojom::Role::kMenuListOption,
Ankit Kumar 🌪️4d5bf202020-01-28 05:30:47186 ax::mojom::Role::kPdfActionableHighlight,
Ian Preste1c32992019-12-04 19:53:13187 ax::mojom::Role::kPopUpButton,
Nektarios Paisios31e51882020-05-05 22:17:12188 ax::mojom::Role::kPortal,
Ian Preste1c32992019-12-04 19:53:13189 ax::mojom::Role::kRadioButton,
Nektarios Paisios31e51882020-05-05 22:17:12190 ax::mojom::Role::kSearchBox,
191 ax::mojom::Role::kSpinButton,
Ian Preste1c32992019-12-04 19:53:13192 ax::mojom::Role::kSwitch,
193 ax::mojom::Role::kTab,
Nektarios Paisios31e51882020-05-05 22:17:12194 ax::mojom::Role::kTextField,
195 ax::mojom::Role::kTextFieldWithComboBox,
Ian Preste1c32992019-12-04 19:53:13196 ax::mojom::Role::kToggleButton};
197
198 AXNodeData data;
199
200 for (int role_idx = static_cast<int>(ax::mojom::Role::kMinValue);
201 role_idx <= static_cast<int>(ax::mojom::Role::kMaxValue); role_idx++) {
202 data.role = static_cast<ax::mojom::Role>(role_idx);
203 bool is_clickable = data.IsClickable();
204
205 SCOPED_TRACE(testing::Message()
206 << "ax::mojom::Role=" << ToString(data.role)
207 << ", Actual: isClickable=" << is_clickable
208 << ", Expected: isClickable=" << !is_clickable);
209
Nektarios Paisios31e51882020-05-05 22:17:12210 EXPECT_EQ(base::Contains(roles_expected_is_clickable, data.role),
211 is_clickable);
Ian Preste1c32992019-12-04 19:53:13212 }
213}
214
Victor Fei4f5aa7d2020-04-09 03:15:50215TEST(AXNodeDataTest, IsInvocable) {
Ian Preste1c32992019-12-04 19:53:13216 // Test for iterating through all roles and validate if a role is invocable.
Benjamin Beaudry412260d72022-01-14 02:52:36217 // A role is invocable if it is clickable and supports neither expand collapse
218 // nor toggle. A link should always be invocable, regardless of whether it is
219 // clickable or supports expand/collapse or toggle.
Ian Preste1c32992019-12-04 19:53:13220 AXNodeData data;
221 for (int role_idx = static_cast<int>(ax::mojom::Role::kMinValue);
222 role_idx <= static_cast<int>(ax::mojom::Role::kMaxValue); role_idx++) {
223 data.role = static_cast<ax::mojom::Role>(role_idx);
Nektarios Paisios31e51882020-05-05 22:17:12224 bool is_activatable = data.IsActivatable();
225 const bool supports_expand_collapse = data.SupportsExpandCollapse();
226 const bool supports_toggle = ui::SupportsToggle(data.role);
227 const bool is_clickable = data.IsClickable();
228 const bool is_invocable = data.IsInvocable();
Ian Preste1c32992019-12-04 19:53:13229
230 SCOPED_TRACE(testing::Message()
231 << "ax::mojom::Role=" << ToString(data.role)
Nektarios Paisios31e51882020-05-05 22:17:12232 << ", isClickable=" << is_clickable << ", isActivatable="
233 << is_activatable << ", supportsToggle=" << supports_toggle
Ian Preste1c32992019-12-04 19:53:13234 << ", supportsExpandCollapse=" << supports_expand_collapse
235 << ", Actual: isInvocable=" << is_invocable
236 << ", Expected: isInvocable=" << !is_invocable);
237
Benjamin Beaudry412260d72022-01-14 02:52:36238 if (ui::IsLink(data.role) ||
239 (is_clickable && !is_activatable && !supports_toggle &&
240 !supports_expand_collapse)) {
Ian Preste1c32992019-12-04 19:53:13241 EXPECT_TRUE(is_invocable);
Benjamin Beaudry412260d72022-01-14 02:52:36242 } else {
Ian Preste1c32992019-12-04 19:53:13243 EXPECT_FALSE(is_invocable);
Benjamin Beaudry412260d72022-01-14 02:52:36244 }
Ian Preste1c32992019-12-04 19:53:13245 }
246}
247
Victor Fei4f5aa7d2020-04-09 03:15:50248TEST(AXNodeDataTest, IsMenuButton) {
249 // A non button element should return false for IsMenuButton.
250 AXNodeData non_button;
251 non_button.role = ax::mojom::Role::kGenericContainer;
252 EXPECT_FALSE(IsButton(non_button.role));
253 EXPECT_FALSE(non_button.IsMenuButton());
254
255 // Only button element with HasPopup::kMenu should return true for
256 // IsMenuButton. All other ax::mojom::HasPopup types should return false.
257 AXNodeData button_with_popup;
258
259 button_with_popup.role = ax::mojom::Role::kButton;
260
261 for (int has_popup_idx = static_cast<int>(ax::mojom::HasPopup::kMinValue);
262 has_popup_idx <= static_cast<int>(ax::mojom::HasPopup::kMaxValue);
263 has_popup_idx++) {
264 button_with_popup.SetHasPopup(
265 static_cast<ax::mojom::HasPopup>(has_popup_idx));
266 bool is_menu_button = button_with_popup.IsMenuButton();
267
268 SCOPED_TRACE(testing::Message()
269 << "ax::mojom::Role=" << ToString(button_with_popup.role)
270 << ", hasPopup=" << button_with_popup.GetHasPopup()
271 << ", Actual: isMenuButton=" << is_menu_button
272 << ", Expected: isMenuButton=" << !is_menu_button);
273
274 if (IsButton(button_with_popup.role) &&
275 button_with_popup.GetHasPopup() == ax::mojom::HasPopup::kMenu)
276 EXPECT_TRUE(is_menu_button);
277 else
278 EXPECT_FALSE(is_menu_button);
279 }
280}
281
282TEST(AXNodeDataTest, SupportsExpandCollapse) {
Ian Preste1c32992019-12-04 19:53:13283 // Test for iterating through all hasPopup attributes and validate if a
284 // hasPopup attribute supports expand collapse.
285 AXNodeData data_has_popup;
286
287 for (int has_popup_idx = static_cast<int>(ax::mojom::HasPopup::kMinValue);
288 has_popup_idx <= static_cast<int>(ax::mojom::HasPopup::kMaxValue);
289 has_popup_idx++) {
290 data_has_popup.SetHasPopup(static_cast<ax::mojom::HasPopup>(has_popup_idx));
291 bool supports_expand_collapse = data_has_popup.SupportsExpandCollapse();
292
293 SCOPED_TRACE(testing::Message() << "ax::mojom::HasPopup="
294 << ToString(data_has_popup.GetHasPopup())
295 << ", Actual: supportsExpandCollapse="
296 << supports_expand_collapse
297 << ", Expected: supportsExpandCollapse="
298 << !supports_expand_collapse);
299
300 if (data_has_popup.GetHasPopup() == ax::mojom::HasPopup::kFalse)
301 EXPECT_FALSE(supports_expand_collapse);
302 else
303 EXPECT_TRUE(supports_expand_collapse);
304 }
305
306 // Test for iterating through all states and validate if a state supports
307 // expand collapse.
308 AXNodeData data_state;
309
310 for (int state_idx = static_cast<int>(ax::mojom::State::kMinValue);
311 state_idx <= static_cast<int>(ax::mojom::State::kMaxValue);
312 state_idx++) {
313 ax::mojom::State state = static_cast<ax::mojom::State>(state_idx);
314
315 // skipping kNone here because AXNodeData::AddState, RemoveState forbids
316 // kNone to be added/removed and would fail DCHECK.
317 if (state == ax::mojom::State::kNone)
318 continue;
319
320 data_state.AddState(state);
321
322 bool supports_expand_collapse = data_state.SupportsExpandCollapse();
323
324 SCOPED_TRACE(testing::Message() << "ax::mojom::State=" << ToString(state)
325 << ", Actual: supportsExpandCollapse="
326 << supports_expand_collapse
327 << ", Expected: supportsExpandCollapse="
328 << !supports_expand_collapse);
329
330 if (data_state.HasState(ax::mojom::State::kExpanded) ||
331 data_state.HasState(ax::mojom::State::kCollapsed))
332 EXPECT_TRUE(supports_expand_collapse);
333 else
334 EXPECT_FALSE(supports_expand_collapse);
335
336 data_state.RemoveState(state);
337 }
338
339 // Test for iterating through all roles and validate if a role supports expand
340 // collapse.
341 AXNodeData data;
342
343 std::unordered_set<ax::mojom::Role> roles_expected_supports_expand_collapse =
344 {ax::mojom::Role::kComboBoxGrouping, ax::mojom::Role::kComboBoxMenuButton,
345 ax::mojom::Role::kDisclosureTriangle,
346 ax::mojom::Role::kTextFieldWithComboBox, ax::mojom::Role::kTreeItem};
347
348 for (int role_idx = static_cast<int>(ax::mojom::Role::kMinValue);
349 role_idx <= static_cast<int>(ax::mojom::Role::kMaxValue); role_idx++) {
350 data.role = static_cast<ax::mojom::Role>(role_idx);
351 bool supports_expand_collapse = data.SupportsExpandCollapse();
352
353 SCOPED_TRACE(testing::Message() << "ax::mojom::Role=" << ToString(data.role)
354 << ", Actual: supportsExpandCollapse="
355 << supports_expand_collapse
356 << ", Expected: supportsExpandCollapse="
357 << !supports_expand_collapse);
358
359 if (roles_expected_supports_expand_collapse.find(data.role) !=
360 roles_expected_supports_expand_collapse.end())
361 EXPECT_TRUE(supports_expand_collapse);
362 else
363 EXPECT_FALSE(supports_expand_collapse);
364 }
365}
366
Joanmarie Diggs762303d2022-08-09 10:56:57367TEST(AXNodeDataTest, SetName) {
368 AXNodeData data;
369 // SetName should not be called on a role of kNone. That role is used for
370 // presentational objects which should not be included in the accessibility
371 // tree. This is enforced by a DCHECK.
372 data.role = ax::mojom::Role::kNone;
373 EXPECT_DCHECK_DEATH(data.SetName("role is presentational"));
374
375 // For roles other than text, setting the name should result in the NameFrom
376 // source being kAttribute.
377 data.role = ax::mojom::Role::kButton;
378 data.SetName("foo");
379 EXPECT_EQ("foo", data.GetStringAttribute(ax::mojom::StringAttribute::kName));
380 EXPECT_EQ(data.GetNameFrom(), ax::mojom::NameFrom::kAttribute);
381
382 // TODO(accessibility): The static text role should have a NameFrom source of
383 // kContents. But nothing clears the NameFrom if the role of an existing
384 // object changes because currently there is no AXNodeData::SetRole method.
385 data.role = ax::mojom::Role::kStaticText;
386 data.SetName("bar");
387 EXPECT_EQ("bar", data.GetStringAttribute(ax::mojom::StringAttribute::kName));
388 EXPECT_EQ(data.GetNameFrom(), ax::mojom::NameFrom::kAttribute);
389
390 data.RemoveIntAttribute(ax::mojom::IntAttribute::kNameFrom);
391 data.SetName("baz");
392 EXPECT_EQ("baz", data.GetStringAttribute(ax::mojom::StringAttribute::kName));
393 EXPECT_EQ(data.GetNameFrom(), ax::mojom::NameFrom::kContents);
394
395 data.SetNameExplicitlyEmpty();
396 EXPECT_EQ("", data.GetStringAttribute(ax::mojom::StringAttribute::kName));
397 EXPECT_EQ(data.GetNameFrom(), ax::mojom::NameFrom::kAttributeExplicitlyEmpty);
398
399 data.SetName("foo");
400 EXPECT_EQ("foo", data.GetStringAttribute(ax::mojom::StringAttribute::kName));
401 EXPECT_EQ(data.GetNameFrom(), ax::mojom::NameFrom::kContents);
402}
403
Hiroki Satofdb71f412020-02-27 01:18:37404TEST(AXNodeDataTest, BitFieldsSanityCheck) {
405 EXPECT_LT(static_cast<size_t>(ax::mojom::State::kMaxValue),
406 sizeof(AXNodeData::state) * 8);
407 EXPECT_LT(static_cast<size_t>(ax::mojom::Action::kMaxValue),
408 sizeof(AXNodeData::actions) * 8);
409}
410
Nektarios Paisiosbe87bc42018-10-12 23:47:03411} // namespace ui