1 // Copyright (c) 2012 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.
9 #include "base/command_line.h"
10 #include "base/strings/string16.h"
11 #include "base/strings/string_util.h"
12 #include "base/strings/utf_string_conversions.h"
13 #include "content/browser/accessibility/accessibility_tree_formatter.h"
14 #include "content/browser/accessibility/browser_accessibility.h"
15 #include "content/browser/accessibility/browser_accessibility_manager.h"
16 #include "content/browser/accessibility/dump_accessibility_browsertest_base.h"
17 #include "content/browser/web_contents/web_contents_impl.h"
18 #include "content/public/browser/web_contents.h"
19 #include "content/public/common/content_paths.h"
20 #include "content/public/common/content_switches.h"
21 #include "content/shell/browser/shell.h"
22 #include "content/test/accessibility_browser_test_utils.h"
24 #if defined(OS_MACOSX)
25 #include "base/mac/mac_util.h"
28 // TODO(aboxhall): Create expectations on Android for these
29 #if defined(OS_ANDROID)
30 #define MAYBE(x) DISABLED_##x
37 typedef AccessibilityTreeFormatter::Filter Filter
;
39 // This test takes a snapshot of the platform BrowserAccessibility tree and
40 // tests it against an expected baseline.
42 // The flow of the test is as outlined below.
43 // 1. Load an html file from chrome/test/data/accessibility.
44 // 2. Read the expectation.
45 // 3. Browse to the page and serialize the platform specific tree into a human
47 // 4. Perform a comparison between actual and expected and fail if they do not
49 class DumpAccessibilityTreeTest
: public DumpAccessibilityTestBase
{
51 void AddDefaultFilters(std::vector
<Filter
>* filters
) override
{
52 filters
->push_back(Filter(base::ASCIIToUTF16("FOCUSABLE"), Filter::ALLOW
));
53 filters
->push_back(Filter(base::ASCIIToUTF16("READONLY"), Filter::ALLOW
));
54 filters
->push_back(Filter(base::ASCIIToUTF16("name*"), Filter::ALLOW
));
55 filters
->push_back(Filter(base::ASCIIToUTF16("*=''"), Filter::DENY
));
58 void SetUpCommandLine(base::CommandLine
* command_line
) override
{
59 ContentBrowserTest::SetUpCommandLine(command_line
);
60 // Enable <dialog>, which is used in some tests.
61 base::CommandLine::ForCurrentProcess()->AppendSwitch(
62 switches::kEnableExperimentalWebPlatformFeatures
);
65 std::vector
<std::string
> Dump() override
{
66 WebContentsImpl
* web_contents
= static_cast<WebContentsImpl
*>(
67 shell()->web_contents());
68 AccessibilityTreeFormatter
formatter(
69 web_contents
->GetRootBrowserAccessibilityManager()->GetRoot());
70 formatter
.SetFilters(filters_
);
71 base::string16 actual_contents_utf16
;
72 formatter
.FormatAccessibilityTree(&actual_contents_utf16
);
73 std::string actual_contents
= base::UTF16ToUTF8(actual_contents_utf16
);
74 std::vector
<std::string
> actual_lines
;
75 Tokenize(actual_contents
, "\n", &actual_lines
);
80 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityA
) {
81 RunTest(FILE_PATH_LITERAL("a.html"));
84 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAbbr
) {
85 RunTest(FILE_PATH_LITERAL("abbr.html"));
88 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAddress
) {
89 RunTest(FILE_PATH_LITERAL("address.html"));
92 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityArea
) {
93 RunTest(FILE_PATH_LITERAL("area.html"));
96 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAName
) {
97 RunTest(FILE_PATH_LITERAL("a-name.html"));
100 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityANameCalc
) {
101 RunTest(FILE_PATH_LITERAL("a-name-calc.html"));
104 // crrev.com/481753002 will change the alt content used for the name value.
105 // Re-baseline after the Blink change goes in
106 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
107 DISABLED_AccessibilityANoText
) {
108 RunTest(FILE_PATH_LITERAL("a-no-text.html"));
111 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAOnclick
) {
112 RunTest(FILE_PATH_LITERAL("a-onclick.html"));
115 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
116 AccessibilityAriaActivedescendant
) {
117 RunTest(FILE_PATH_LITERAL("aria-activedescendant.html"));
120 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaAlert
) {
121 RunTest(FILE_PATH_LITERAL("aria-alert.html"));
124 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
125 AccessibilityAriaApplication
) {
126 RunTest(FILE_PATH_LITERAL("aria-application.html"));
129 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaArticle
) {
130 RunTest(FILE_PATH_LITERAL("aria-article.html"));
133 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaAtomic
) {
134 RunTest(FILE_PATH_LITERAL("aria-atomic.html"));
137 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
138 AccessibilityAriaAutocomplete
) {
139 RunTest(FILE_PATH_LITERAL("aria-autocomplete.html"));
142 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaBanner
) {
143 RunTest(FILE_PATH_LITERAL("aria-banner.html"));
146 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaBusy
) {
147 RunTest(FILE_PATH_LITERAL("aria-busy.html"));
150 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaButton
) {
151 RunTest(FILE_PATH_LITERAL("aria-button.html"));
154 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaCheckBox
) {
155 RunTest(FILE_PATH_LITERAL("aria-checkbox.html"));
158 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaChecked
) {
159 RunTest(FILE_PATH_LITERAL("aria-checked.html"));
162 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
163 AccessibilityAriaColumnHeader
) {
164 RunTest(FILE_PATH_LITERAL("aria-columnheader.html"));
167 // crbug.com/98976 will cause new elements to be added to the Blink a11y tree
168 // Re-baseline after the Blink change goes in
169 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
170 DISABLED_AccessibilityAriaCombobox
) {
171 RunTest(FILE_PATH_LITERAL("aria-combobox.html"));
174 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
175 AccessibilityAriaComplementary
) {
176 RunTest(FILE_PATH_LITERAL("aria-complementary.html"));
179 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
180 AccessibilityAriaContentInfo
) {
181 RunTest(FILE_PATH_LITERAL("aria-contentinfo.html"));
184 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaDefinition
) {
185 RunTest(FILE_PATH_LITERAL("aria-definition.html"));
188 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaDialog
) {
189 RunTest(FILE_PATH_LITERAL("aria-dialog.html"));
192 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaDirectory
) {
193 RunTest(FILE_PATH_LITERAL("aria-directory.html"));
196 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaExpanded
) {
197 RunTest(FILE_PATH_LITERAL("aria-expanded.html"));
200 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaHasPopup
) {
201 RunTest(FILE_PATH_LITERAL("aria-haspopup.html"));
204 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaHeading
) {
205 RunTest(FILE_PATH_LITERAL("aria-heading.html"));
208 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaHidden
) {
209 RunTest(FILE_PATH_LITERAL("aria-hidden.html"));
212 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
213 MAYBE(AccessibilityAriaFlowto
)) {
214 RunTest(FILE_PATH_LITERAL("aria-flowto.html"));
217 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaForm
) {
218 RunTest(FILE_PATH_LITERAL("aria-form.html"));
221 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaImg
) {
222 RunTest(FILE_PATH_LITERAL("aria-img.html"));
225 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaInvalid
) {
226 RunTest(FILE_PATH_LITERAL("aria-invalid.html"));
229 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
230 AccessibilityAriaLabelledByHeading
) {
231 RunTest(FILE_PATH_LITERAL("aria-labelledby-heading.html"));
234 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaLevel
) {
235 RunTest(FILE_PATH_LITERAL("aria-level.html"));
238 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaList
) {
239 RunTest(FILE_PATH_LITERAL("aria-list.html"));
242 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaListBox
) {
243 RunTest(FILE_PATH_LITERAL("aria-listbox.html"));
246 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
247 AccessibilityAriaListBoxActiveDescendant
) {
248 RunTest(FILE_PATH_LITERAL("aria-listbox-activedescendant.html"));
251 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
252 AccessibilityAriaListBoxAriaSelected
) {
253 RunTest(FILE_PATH_LITERAL("aria-listbox-aria-selected.html"));
256 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
257 AccessibilityAriaListBoxChildFocus
) {
258 RunTest(FILE_PATH_LITERAL("aria-listbox-childfocus.html"));
261 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaLive
) {
262 RunTest(FILE_PATH_LITERAL("aria-live.html"));
265 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
266 AccessibilityAriaLiveWithContent
) {
267 RunTest(FILE_PATH_LITERAL("aria-live-with-content.html"));
270 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaLog
) {
271 RunTest(FILE_PATH_LITERAL("aria-log.html"));
274 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaMain
) {
275 RunTest(FILE_PATH_LITERAL("aria-main.html"));
278 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaMarquee
) {
279 RunTest(FILE_PATH_LITERAL("aria-marquee.html"));
282 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaMenu
) {
283 RunTest(FILE_PATH_LITERAL("aria-menu.html"));
286 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaMenuBar
) {
287 RunTest(FILE_PATH_LITERAL("aria-menubar.html"));
290 // crbug.com/442278 will stop creating new text elements representing title.
291 // Re-baseline after the Blink change goes in
292 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
293 DISABLED_AccessibilityAriaMenuItemCheckBox
) {
294 RunTest(FILE_PATH_LITERAL("aria-menuitemcheckbox.html"));
297 // crbug.com/442278 will stop creating new text elements representing title.
298 // Re-baseline after the Blink change goes in
299 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
300 DISABLED_AccessibilityAriaMenuItemRadio
) {
301 RunTest(FILE_PATH_LITERAL("aria-menuitemradio.html"));
304 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
305 AccessibilityAriaMultiline
) {
306 RunTest(FILE_PATH_LITERAL("aria-multiline.html"));
309 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
310 AccessibilityAriaMultiselectable
) {
311 RunTest(FILE_PATH_LITERAL("aria-multiselectable.html"));
314 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaNavigation
) {
315 RunTest(FILE_PATH_LITERAL("aria-navigation.html"));
318 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
319 AccessibilityAriaOrientation
) {
320 RunTest(FILE_PATH_LITERAL("aria-orientation.html"));
323 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaMath
) {
324 RunTest(FILE_PATH_LITERAL("aria-math.html"));
327 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaNone
) {
328 RunTest(FILE_PATH_LITERAL("aria-none.html"));
331 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
332 AccessibilityAriaPresentation
) {
333 RunTest(FILE_PATH_LITERAL("aria-presentation.html"));
336 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaPressed
) {
337 RunTest(FILE_PATH_LITERAL("aria-pressed.html"));
340 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
341 AccessibilityAriaProgressbar
) {
342 RunTest(FILE_PATH_LITERAL("aria-progressbar.html"));
345 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
346 AccessibilityAriaRadio
) {
347 RunTest(FILE_PATH_LITERAL("aria-radio.html"));
350 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
351 AccessibilityAriaRadiogroup
) {
352 RunTest(FILE_PATH_LITERAL("aria-radiogroup.html"));
355 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaRelevant
) {
356 RunTest(FILE_PATH_LITERAL("aria-relevant.html"));
359 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaRequired
) {
360 RunTest(FILE_PATH_LITERAL("aria-required.html"));
363 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaRow
) {
364 RunTest(FILE_PATH_LITERAL("aria-row.html"));
367 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaRowGroup
) {
368 RunTest(FILE_PATH_LITERAL("aria-rowgroup.html"));
371 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaReadonly
) {
372 RunTest(FILE_PATH_LITERAL("aria-readonly.html"));
375 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaRegion
) {
376 RunTest(FILE_PATH_LITERAL("aria-region.html"));
379 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaSearch
) {
380 RunTest(FILE_PATH_LITERAL("aria-search.html"));
383 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaSeparator
) {
384 RunTest(FILE_PATH_LITERAL("aria-separator.html"));
387 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaSort
) {
388 RunTest(FILE_PATH_LITERAL("aria-sort.html"));
391 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaSlider
) {
392 RunTest(FILE_PATH_LITERAL("aria-slider.html"));
395 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
396 AccessibilityAriaSpinButton
) {
397 RunTest(FILE_PATH_LITERAL("aria-spinbutton.html"));
400 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaTextbox
) {
401 RunTest(FILE_PATH_LITERAL("aria-textbox.html"));
404 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaTimer
) {
405 RunTest(FILE_PATH_LITERAL("aria-timer.html"));
408 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
409 AccessibilityAriaToggleButton
) {
410 RunTest(FILE_PATH_LITERAL("aria-togglebutton.html"));
413 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaToolbar
) {
414 RunTest(FILE_PATH_LITERAL("aria-toolbar.html"));
417 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaTooltip
) {
418 RunTest(FILE_PATH_LITERAL("aria-tooltip.html"));
421 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaTree
) {
422 RunTest(FILE_PATH_LITERAL("aria-tree.html"));
425 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaTreeGrid
) {
426 RunTest(FILE_PATH_LITERAL("aria-treegrid.html"));
429 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaValueMin
) {
430 RunTest(FILE_PATH_LITERAL("aria-valuemin.html"));
433 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaValueMax
) {
434 RunTest(FILE_PATH_LITERAL("aria-valuemax.html"));
437 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaValueNow
) {
438 RunTest(FILE_PATH_LITERAL("aria-valuenow.html"));
441 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityArticle
) {
442 RunTest(FILE_PATH_LITERAL("article.html"));
445 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAside
) {
446 RunTest(FILE_PATH_LITERAL("aside.html"));
449 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAudio
) {
450 RunTest(FILE_PATH_LITERAL("audio.html"));
453 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAWithImg
) {
454 RunTest(FILE_PATH_LITERAL("a-with-img.html"));
457 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityBdo
) {
458 RunTest(FILE_PATH_LITERAL("bdo.html"));
461 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityBlockquote
) {
462 RunTest(FILE_PATH_LITERAL("blockquote.html"));
465 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityBody
) {
466 RunTest(FILE_PATH_LITERAL("body.html"));
469 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, DISABLED_AccessibilityBR
) {
470 RunTest(FILE_PATH_LITERAL("br.html"));
473 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityButton
) {
474 RunTest(FILE_PATH_LITERAL("button.html"));
477 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityButtonNameCalc
) {
478 RunTest(FILE_PATH_LITERAL("button-name-calc.html"));
481 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityCanvas
) {
482 RunTest(FILE_PATH_LITERAL("canvas.html"));
485 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityCaption
) {
486 RunTest(FILE_PATH_LITERAL("caption.html"));
489 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
490 AccessibilityCheckboxNameCalc
) {
491 RunTest(FILE_PATH_LITERAL("checkbox-name-calc.html"));
494 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityCite
) {
495 RunTest(FILE_PATH_LITERAL("cite.html"));
498 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityCol
) {
499 RunTest(FILE_PATH_LITERAL("col.html"));
502 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityColgroup
) {
503 RunTest(FILE_PATH_LITERAL("colgroup.html"));
506 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDd
) {
507 RunTest(FILE_PATH_LITERAL("dd.html"));
510 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDel
) {
511 RunTest(FILE_PATH_LITERAL("del.html"));
514 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDetails
) {
515 RunTest(FILE_PATH_LITERAL("details.html"));
518 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDfn
) {
519 RunTest(FILE_PATH_LITERAL("dfn.html"));
522 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDialog
) {
523 RunTest(FILE_PATH_LITERAL("dialog.html"));
526 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDiv
) {
527 RunTest(FILE_PATH_LITERAL("div.html"));
530 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDl
) {
531 RunTest(FILE_PATH_LITERAL("dl.html"));
534 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDt
) {
535 RunTest(FILE_PATH_LITERAL("dt.html"));
538 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
539 AccessibilityContenteditableDescendants
) {
540 RunTest(FILE_PATH_LITERAL("contenteditable-descendants.html"));
543 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityEm
) {
544 RunTest(FILE_PATH_LITERAL("em.html"));
547 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityEmbed
) {
548 RunTest(FILE_PATH_LITERAL("embed.html"));
551 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityFieldset
) {
552 RunTest(FILE_PATH_LITERAL("fieldset.html"));
555 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityFigcaption
) {
556 RunTest(FILE_PATH_LITERAL("figcaption.html"));
559 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityFigure
) {
560 RunTest(FILE_PATH_LITERAL("figure.html"));
563 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityFooter
) {
564 RunTest(FILE_PATH_LITERAL("footer.html"));
567 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityForm
) {
568 RunTest(FILE_PATH_LITERAL("form.html"));
571 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityFrameset
) {
572 RunTest(FILE_PATH_LITERAL("frameset.html"));
575 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityHead
) {
576 RunTest(FILE_PATH_LITERAL("head.html"));
579 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityHeader
) {
580 RunTest(FILE_PATH_LITERAL("header.html"));
583 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityHeading
) {
584 RunTest(FILE_PATH_LITERAL("heading.html"));
587 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityHR
) {
588 RunTest(FILE_PATH_LITERAL("hr.html"));
591 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityI
) {
592 RunTest(FILE_PATH_LITERAL("i.html"));
595 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityIframe
) {
596 RunTest(FILE_PATH_LITERAL("iframe.html"));
599 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
600 AccessibilityIframeCoordinates
) {
601 RunTest(FILE_PATH_LITERAL("iframe-coordinates.html"));
604 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
605 AccessibilityIframePresentational
) {
606 RunTest(FILE_PATH_LITERAL("iframe-presentational.html"));
609 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityImg
) {
610 RunTest(FILE_PATH_LITERAL("img.html"));
613 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputButton
) {
614 RunTest(FILE_PATH_LITERAL("input-button.html"));
617 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
618 AccessibilityInputButtonInMenu
) {
619 RunTest(FILE_PATH_LITERAL("input-button-in-menu.html"));
622 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputCheckBox
) {
623 RunTest(FILE_PATH_LITERAL("input-checkbox.html"));
626 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
627 AccessibilityInputCheckBoxInMenu
) {
628 RunTest(FILE_PATH_LITERAL("input-checkbox-in-menu.html"));
631 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputColor
) {
632 RunTest(FILE_PATH_LITERAL("input-color.html"));
635 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputDate
) {
636 RunTest(FILE_PATH_LITERAL("input-date.html"));
639 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputDateTime
) {
640 RunTest(FILE_PATH_LITERAL("input-datetime.html"));
643 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
644 AccessibilityInputDateTimeLocal
) {
645 #if defined(OS_MACOSX)
646 // Fails on OS X 10.9 <https://crbug.com/430622>.
647 if (base::mac::IsOSMavericks())
650 RunTest(FILE_PATH_LITERAL("input-datetime-local.html"));
653 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputFile
) {
654 RunTest(FILE_PATH_LITERAL("input-file.html"));
657 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
658 AccessibilityInputImageButtonInMenu
) {
659 RunTest(FILE_PATH_LITERAL("input-image-button-in-menu.html"));
662 // crbug.com/423675 - AX tree is different for Win7 and Win8.
664 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
665 DISABLED_AccessibilityInputMonth
) {
666 RunTest(FILE_PATH_LITERAL("input-month.html"));
669 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputMonth
) {
670 RunTest(FILE_PATH_LITERAL("input-month.html"));
674 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputRadio
) {
675 RunTest(FILE_PATH_LITERAL("input-radio.html"));
678 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputRange
) {
679 RunTest(FILE_PATH_LITERAL("input-range.html"));
682 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputReset
) {
683 RunTest(FILE_PATH_LITERAL("input-reset.html"));
686 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputSearch
) {
687 RunTest(FILE_PATH_LITERAL("input-search.html"));
690 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputSubmit
) {
691 RunTest(FILE_PATH_LITERAL("input-submit.html"));
694 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
695 AccessibilityInputSuggestionsSourceElement
) {
696 RunTest(FILE_PATH_LITERAL("input-suggestions-source-element.html"));
699 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputTel
) {
700 RunTest(FILE_PATH_LITERAL("input-tel.html"));
703 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputText
) {
704 RunTest(FILE_PATH_LITERAL("input-text.html"));
707 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
708 AccessibilityInputTextNameCalc
) {
709 RunTest(FILE_PATH_LITERAL("input-text-name-calc.html"));
712 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputTextValue
) {
713 RunTest(FILE_PATH_LITERAL("input-text-value.html"));
716 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputTime
) {
717 RunTest(FILE_PATH_LITERAL("input-time.html"));
720 // crbug.com/98976 will cause new elements to be added to the Blink a11y tree
721 // Re-baseline after the Blink change goes in
722 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
723 DISABLED_AccessibilityInputTypes
) {
724 RunTest(FILE_PATH_LITERAL("input-types.html"));
727 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputUrl
) {
728 RunTest(FILE_PATH_LITERAL("input-url.html"));
731 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputWeek
) {
732 RunTest(FILE_PATH_LITERAL("input-week.html"));
735 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityIns
) {
736 RunTest(FILE_PATH_LITERAL("ins.html"));
739 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityLabel
) {
740 RunTest(FILE_PATH_LITERAL("label.html"));
743 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityLandmark
) {
744 RunTest(FILE_PATH_LITERAL("landmark.html"));
747 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityLegend
) {
748 RunTest(FILE_PATH_LITERAL("legend.html"));
751 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityLink
) {
752 RunTest(FILE_PATH_LITERAL("link.html"));
755 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityList
) {
756 RunTest(FILE_PATH_LITERAL("list.html"));
759 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityListMarkers
) {
760 RunTest(FILE_PATH_LITERAL("list-markers.html"));
763 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityMain
) {
764 RunTest(FILE_PATH_LITERAL("main.html"));
767 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityMark
) {
768 RunTest(FILE_PATH_LITERAL("mark.html"));
771 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityMath
) {
772 RunTest(FILE_PATH_LITERAL("math.html"));
775 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
776 AccessibilityMenutypecontext
) {
777 RunTest(FILE_PATH_LITERAL("menu-type-context.html"));
780 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityMeta
) {
781 RunTest(FILE_PATH_LITERAL("meta.html"));
784 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityMeter
) {
785 RunTest(FILE_PATH_LITERAL("meter.html"));
788 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
789 AccessibilityModalDialogClosed
) {
790 RunTest(FILE_PATH_LITERAL("modal-dialog-closed.html"));
793 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
794 AccessibilityModalDialogOpened
) {
795 RunTest(FILE_PATH_LITERAL("modal-dialog-opened.html"));
798 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
799 AccessibilityModalDialogInIframeClosed
) {
800 RunTest(FILE_PATH_LITERAL("modal-dialog-in-iframe-closed.html"));
803 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
804 AccessibilityModalDialogInIframeOpened
) {
805 RunTest(FILE_PATH_LITERAL("modal-dialog-in-iframe-opened.html"));
808 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
809 AccessibilityModalDialogStack
) {
810 RunTest(FILE_PATH_LITERAL("modal-dialog-stack.html"));
813 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityNavigation
) {
814 RunTest(FILE_PATH_LITERAL("navigation.html"));
817 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityNoscript
) {
818 RunTest(FILE_PATH_LITERAL("noscript.html"));
821 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityOl
) {
822 RunTest(FILE_PATH_LITERAL("ol.html"));
825 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityObject
) {
826 RunTest(FILE_PATH_LITERAL("object.html"));
829 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
830 AccessibilityOptionindatalist
) {
831 RunTest(FILE_PATH_LITERAL("option-in-datalist.html"));
834 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
835 DISABLED_AccessibilityOutput
) {
836 RunTest(FILE_PATH_LITERAL("output.html"));
839 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityP
) {
840 RunTest(FILE_PATH_LITERAL("p.html"));
843 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityParam
) {
844 RunTest(FILE_PATH_LITERAL("param.html"));
847 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityPre
) {
848 RunTest(FILE_PATH_LITERAL("pre.html"));
851 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityProgress
) {
852 RunTest(FILE_PATH_LITERAL("progress.html"));
855 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityQ
) {
856 RunTest(FILE_PATH_LITERAL("q.html"));
859 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityRuby
) {
860 RunTest(FILE_PATH_LITERAL("ruby.html"));
863 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityS
) {
864 RunTest(FILE_PATH_LITERAL("s.html"));
867 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilitySamp
) {
868 RunTest(FILE_PATH_LITERAL("samp.html"));
871 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityScript
) {
872 RunTest(FILE_PATH_LITERAL("script.html"));
875 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilitySection
) {
876 RunTest(FILE_PATH_LITERAL("section.html"));
879 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilitySelect
) {
880 RunTest(FILE_PATH_LITERAL("select.html"));
883 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilitySource
) {
884 RunTest(FILE_PATH_LITERAL("source.html"));
887 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilitySpan
) {
888 RunTest(FILE_PATH_LITERAL("span.html"));
891 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilitySub
) {
892 RunTest(FILE_PATH_LITERAL("sub.html"));
895 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilitySummary
) {
896 RunTest(FILE_PATH_LITERAL("summary.html"));
899 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilitySvg
) {
900 RunTest(FILE_PATH_LITERAL("svg.html"));
903 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityTab
) {
904 RunTest(FILE_PATH_LITERAL("tab.html"));
907 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityTableSimple
) {
908 RunTest(FILE_PATH_LITERAL("table-simple.html"));
911 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
912 AccessibilityTableThRowHeader
) {
913 RunTest(FILE_PATH_LITERAL("table-th-rowheader.html"));
916 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
917 AccessibilityTableTbodyTfoot
) {
918 RunTest(FILE_PATH_LITERAL("table-thead-tbody-tfoot.html"));
921 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityTableSpans
) {
922 RunTest(FILE_PATH_LITERAL("table-spans.html"));
925 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityTextArea
) {
926 RunTest(FILE_PATH_LITERAL("textarea.html"));
929 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityTime
) {
930 RunTest(FILE_PATH_LITERAL("time.html"));
933 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityTitle
) {
934 RunTest(FILE_PATH_LITERAL("title.html"));
937 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityTransition
) {
938 RunTest(FILE_PATH_LITERAL("transition.html"));
941 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityUl
) {
942 RunTest(FILE_PATH_LITERAL("ul.html"));
945 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityVar
) {
946 RunTest(FILE_PATH_LITERAL("var.html"));
949 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityWbr
) {
950 RunTest(FILE_PATH_LITERAL("wbr.html"));
953 } // namespace content