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/files/file_util.h"
11 #include "base/logging.h"
12 #include "base/path_service.h"
13 #include "base/strings/string16.h"
14 #include "base/strings/string_split.h"
15 #include "base/strings/string_util.h"
16 #include "base/strings/utf_string_conversions.h"
17 #include "content/browser/accessibility/accessibility_tree_formatter.h"
18 #include "content/browser/accessibility/browser_accessibility.h"
19 #include "content/browser/accessibility/browser_accessibility_manager.h"
20 #include "content/browser/renderer_host/render_view_host_impl.h"
21 #include "content/browser/renderer_host/render_widget_host_view_base.h"
22 #include "content/browser/web_contents/web_contents_impl.h"
23 #include "content/public/browser/web_contents.h"
24 #include "content/public/common/content_paths.h"
25 #include "content/public/common/content_switches.h"
26 #include "content/public/common/url_constants.h"
27 #include "content/public/test/content_browser_test.h"
28 #include "content/public/test/content_browser_test_utils.h"
29 #include "content/shell/browser/shell.h"
30 #include "content/test/accessibility_browser_test_utils.h"
31 #include "testing/gtest/include/gtest/gtest.h"
33 // TODO(aboxhall): Create expectations on Android for these
34 #if defined(OS_ANDROID)
35 #define MAYBE(x) DISABLED_##x
44 const char kCommentToken
= '#';
45 const char kMarkSkipFile
[] = "#<skip";
46 const char kMarkEndOfFile
[] = "<-- End-of-file -->";
47 const char kSignalDiff
[] = "*";
51 typedef AccessibilityTreeFormatter::Filter Filter
;
53 // This test takes a snapshot of the platform BrowserAccessibility tree and
54 // tests it against an expected baseline.
56 // The flow of the test is as outlined below.
57 // 1. Load an html file from chrome/test/data/accessibility.
58 // 2. Read the expectation.
59 // 3. Browse to the page and serialize the platform specific tree into a human
61 // 4. Perform a comparison between actual and expected and fail if they do not
63 class DumpAccessibilityTreeTest
: public ContentBrowserTest
{
65 // Utility helper that does a comment aware equality check.
66 // Returns array of lines from expected file which are different.
67 std::vector
<int> DiffLines(const std::vector
<std::string
>& expected_lines
,
68 const std::vector
<std::string
>& actual_lines
) {
69 int actual_lines_count
= actual_lines
.size();
70 int expected_lines_count
= expected_lines
.size();
71 std::vector
<int> diff_lines
;
73 while (i
< actual_lines_count
&& j
< expected_lines_count
) {
74 if (expected_lines
[j
].size() == 0 ||
75 expected_lines
[j
][0] == kCommentToken
) {
76 // Skip comment lines and blank lines in expected output.
81 if (actual_lines
[i
] != expected_lines
[j
])
82 diff_lines
.push_back(j
);
87 // Actual file has been fully checked.
91 void AddDefaultFilters(std::vector
<Filter
>* filters
) {
92 filters
->push_back(Filter(base::ASCIIToUTF16("FOCUSABLE"), Filter::ALLOW
));
93 filters
->push_back(Filter(base::ASCIIToUTF16("READONLY"), Filter::ALLOW
));
94 filters
->push_back(Filter(base::ASCIIToUTF16("*=''"), Filter::DENY
));
97 // Parse the test html file and parse special directives, usually
98 // beginning with an '@' and inside an HTML comment, that control how the
99 // test is run and how the results are interpreted.
101 // When the accessibility tree is dumped as text, each attribute is
102 // run through filters before being appended to the string. An "allow"
103 // filter specifies attribute strings that should be dumped, and a "deny"
104 // filter specifies strings that should be suppressed. As an example,
105 // @MAC-ALLOW:AXSubrole=* means that the AXSubrole attribute should be
106 // printed, while @MAC-ALLOW:AXSubrole=AXList* means that any subrole
107 // beginning with the text "AXList" should be printed.
109 // The @WAIT-FOR:text directive allows the test to specify that the document
110 // may dynamically change after initial load, and the test is to wait
111 // until the given string (e.g., "text") appears in the resulting dump.
112 // A test can make some changes to the document, then append a magic string
113 // indicating that the test is done, and this framework will wait for that
114 // string to appear before comparing the results.
115 void ParseHtmlForExtraDirectives(const std::string
& test_html
,
116 std::vector
<Filter
>* filters
,
117 std::string
* wait_for
) {
118 std::vector
<std::string
> lines
;
119 base::SplitString(test_html
, '\n', &lines
);
120 for (std::vector
<std::string
>::const_iterator iter
= lines
.begin();
123 const std::string
& line
= *iter
;
124 const std::string
& allow_empty_str
=
125 AccessibilityTreeFormatter::GetAllowEmptyString();
126 const std::string
& allow_str
=
127 AccessibilityTreeFormatter::GetAllowString();
128 const std::string
& deny_str
=
129 AccessibilityTreeFormatter::GetDenyString();
130 const std::string
& wait_str
= "@WAIT-FOR:";
131 if (StartsWithASCII(line
, allow_empty_str
, true)) {
133 Filter(base::UTF8ToUTF16(line
.substr(allow_empty_str
.size())),
134 Filter::ALLOW_EMPTY
));
135 } else if (StartsWithASCII(line
, allow_str
, true)) {
136 filters
->push_back(Filter(base::UTF8ToUTF16(
137 line
.substr(allow_str
.size())),
139 } else if (StartsWithASCII(line
, deny_str
, true)) {
140 filters
->push_back(Filter(base::UTF8ToUTF16(
141 line
.substr(deny_str
.size())),
143 } else if (StartsWithASCII(line
, wait_str
, true)) {
144 *wait_for
= line
.substr(wait_str
.size());
149 virtual void SetUpCommandLine(base::CommandLine
* command_line
) OVERRIDE
{
150 ContentBrowserTest::SetUpCommandLine(command_line
);
151 // Enable <dialog>, which is used in some tests.
152 base::CommandLine::ForCurrentProcess()->AppendSwitch(
153 switches::kEnableExperimentalWebPlatformFeatures
);
156 void RunTest(const base::FilePath::CharType
* file_path
);
159 void DumpAccessibilityTreeTest::RunTest(
160 const base::FilePath::CharType
* file_path
) {
161 NavigateToURL(shell(), GURL(url::kAboutBlankURL
));
164 base::FilePath dir_test_data
;
165 ASSERT_TRUE(PathService::Get(DIR_TEST_DATA
, &dir_test_data
));
166 base::FilePath
test_path(
167 dir_test_data
.Append(FILE_PATH_LITERAL("accessibility")));
168 ASSERT_TRUE(base::PathExists(test_path
))
169 << test_path
.LossyDisplayName();
171 base::FilePath html_file
= test_path
.Append(base::FilePath(file_path
));
172 // Output the test path to help anyone who encounters a failure and needs
173 // to know where to look.
174 printf("Testing: %s\n", html_file
.MaybeAsASCII().c_str());
176 std::string html_contents
;
177 base::ReadFileToString(html_file
, &html_contents
);
179 // Read the expected file.
180 std::string expected_contents_raw
;
181 base::FilePath expected_file
=
182 base::FilePath(html_file
.RemoveExtension().value() +
183 AccessibilityTreeFormatter::GetExpectedFileSuffix());
184 base::ReadFileToString(expected_file
, &expected_contents_raw
);
186 // Tolerate Windows-style line endings (\r\n) in the expected file:
187 // normalize by deleting all \r from the file (if any) to leave only \n.
188 std::string expected_contents
;
189 base::RemoveChars(expected_contents_raw
, "\r", &expected_contents
);
191 if (!expected_contents
.compare(0, strlen(kMarkSkipFile
), kMarkSkipFile
)) {
192 printf("Skipping this test on this platform.\n");
196 // Parse filters and other directives in the test file.
197 std::vector
<Filter
> filters
;
198 std::string wait_for
;
199 AddDefaultFilters(&filters
);
200 ParseHtmlForExtraDirectives(html_contents
, &filters
, &wait_for
);
203 base::string16 html_contents16
;
204 html_contents16
= base::UTF8ToUTF16(html_contents
);
205 GURL url
= GetTestUrl("accessibility",
206 html_file
.BaseName().MaybeAsASCII().c_str());
208 // If there's a @WAIT-FOR directive, set up an accessibility notification
209 // waiter that returns on any event; we'll stop when we get the text we're
210 // waiting for, or time out. Otherwise just wait specifically for
211 // the "load complete" event.
212 scoped_ptr
<AccessibilityNotificationWaiter
> waiter
;
213 if (!wait_for
.empty()) {
214 waiter
.reset(new AccessibilityNotificationWaiter(
215 shell(), AccessibilityModeComplete
, ui::AX_EVENT_NONE
));
217 waiter
.reset(new AccessibilityNotificationWaiter(
218 shell(), AccessibilityModeComplete
, ui::AX_EVENT_LOAD_COMPLETE
));
221 // Load the test html.
222 NavigateToURL(shell(), url
);
224 // Wait for notifications. If there's a @WAIT-FOR directive, break when
225 // the text we're waiting for appears in the dump, otherwise break after
226 // the first notification, which will be a load complete.
227 WebContentsImpl
* web_contents
= static_cast<WebContentsImpl
*>(
228 shell()->web_contents());
229 std::string actual_contents
;
231 waiter
->WaitForNotification();
232 base::string16 actual_contents_utf16
;
233 AccessibilityTreeFormatter
formatter(
234 web_contents
->GetRootBrowserAccessibilityManager()->GetRoot());
235 formatter
.SetFilters(filters
);
236 formatter
.FormatAccessibilityTree(&actual_contents_utf16
);
237 actual_contents
= base::UTF16ToUTF8(actual_contents_utf16
);
238 } while (!wait_for
.empty() &&
239 actual_contents
.find(wait_for
) == std::string::npos
);
241 // Perform a diff (or write the initial baseline).
242 std::vector
<std::string
> actual_lines
, expected_lines
;
243 Tokenize(actual_contents
, "\n", &actual_lines
);
244 Tokenize(expected_contents
, "\n", &expected_lines
);
245 // Marking the end of the file with a line of text ensures that
246 // file length differences are found.
247 expected_lines
.push_back(kMarkEndOfFile
);
248 actual_lines
.push_back(kMarkEndOfFile
);
250 std::vector
<int> diff_lines
= DiffLines(expected_lines
, actual_lines
);
251 bool is_different
= diff_lines
.size() > 0;
252 EXPECT_FALSE(is_different
);
254 // Mark the expected lines which did not match actual output with a *.
255 printf("* Line Expected\n");
256 printf("- ---- --------\n");
257 for (int line
= 0, diff_index
= 0;
258 line
< static_cast<int>(expected_lines
.size());
260 bool is_diff
= false;
261 if (diff_index
< static_cast<int>(diff_lines
.size()) &&
262 diff_lines
[diff_index
] == line
) {
266 printf("%1s %4d %s\n", is_diff
? kSignalDiff
: "", line
+ 1,
267 expected_lines
[line
].c_str());
269 printf("\nActual\n");
271 printf("%s\n", actual_contents
.c_str());
274 if (!base::PathExists(expected_file
)) {
275 base::FilePath actual_file
=
276 base::FilePath(html_file
.RemoveExtension().value() +
277 AccessibilityTreeFormatter::GetActualFileSuffix());
279 EXPECT_TRUE(base::WriteFile(
280 actual_file
, actual_contents
.c_str(), actual_contents
.size()));
282 ADD_FAILURE() << "No expectation found. Create it by doing:\n"
283 << "mv " << actual_file
.LossyDisplayName() << " "
284 << expected_file
.LossyDisplayName();
288 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityA
) {
289 RunTest(FILE_PATH_LITERAL("a.html"));
292 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAddress
) {
293 RunTest(FILE_PATH_LITERAL("address.html"));
296 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAName
) {
297 RunTest(FILE_PATH_LITERAL("a-name.html"));
300 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityANoText
) {
301 RunTest(FILE_PATH_LITERAL("a-no-text.html"));
304 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAOnclick
) {
305 RunTest(FILE_PATH_LITERAL("a-onclick.html"));
308 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
309 AccessibilityAriaActivedescendant
) {
310 RunTest(FILE_PATH_LITERAL("aria-activedescendant.html"));
313 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaAlert
) {
314 RunTest(FILE_PATH_LITERAL("aria-alert.html"));
317 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
318 AccessibilityAriaApplication
) {
319 RunTest(FILE_PATH_LITERAL("aria-application.html"));
322 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
323 AccessibilityAriaAutocomplete
) {
324 RunTest(FILE_PATH_LITERAL("aria-autocomplete.html"));
327 // crbug.com/98976 will cause new elements to be added to the Blink a11y tree
328 // Re-baseline after the Blink change goes in
329 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
330 DISABLED_AccessibilityAriaCombobox
) {
331 RunTest(FILE_PATH_LITERAL("aria-combobox.html"));
334 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaHidden
) {
335 RunTest(FILE_PATH_LITERAL("aria-hidden.html"));
338 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
339 MAYBE(AccessibilityAriaFlowto
)) {
340 RunTest(FILE_PATH_LITERAL("aria-flowto.html"));
343 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaImg
) {
344 RunTest(FILE_PATH_LITERAL("aria-img.html"));
347 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaInvalid
) {
348 RunTest(FILE_PATH_LITERAL("aria-invalid.html"));
351 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
352 AccessibilityAriaLabelledByHeading
) {
353 RunTest(FILE_PATH_LITERAL("aria-labelledby-heading.html"));
356 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaLevel
) {
357 RunTest(FILE_PATH_LITERAL("aria-level.html"));
360 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaList
) {
361 RunTest(FILE_PATH_LITERAL("aria-list.html"));
364 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
365 AccessibilityAriaListBoxActiveDescendant
) {
366 RunTest(FILE_PATH_LITERAL("aria-listbox-activedescendant.html"));
369 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
370 AccessibilityAriaListBoxAriaSelected
) {
371 RunTest(FILE_PATH_LITERAL("aria-listbox-aria-selected.html"));
374 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
375 AccessibilityAriaListBoxChildFocus
) {
376 RunTest(FILE_PATH_LITERAL("aria-listbox-childfocus.html"));
379 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaMenu
) {
380 RunTest(FILE_PATH_LITERAL("aria-menu.html"));
383 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
384 AccessibilityAriaMenuitemradio
) {
385 RunTest(FILE_PATH_LITERAL("aria-menuitemradio.html"));
388 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
389 AccessibilityAriaPressed
) {
390 RunTest(FILE_PATH_LITERAL("aria-pressed.html"));
393 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
394 AccessibilityAriaProgressbar
) {
395 RunTest(FILE_PATH_LITERAL("aria-progressbar.html"));
398 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
399 AccessibilityAriaReadonly
) {
400 RunTest(FILE_PATH_LITERAL("aria-readonly.html"));
403 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
404 AccessibilityAriaSpinButton
) {
405 RunTest(FILE_PATH_LITERAL("aria-spinbutton.html"));
408 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAriaTimer
) {
409 RunTest(FILE_PATH_LITERAL("aria-timer.html"));
412 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
413 AccessibilityAriaToggleButton
) {
414 RunTest(FILE_PATH_LITERAL("aria-togglebutton.html"));
417 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
418 AccessibilityAriaToolbar
) {
419 RunTest(FILE_PATH_LITERAL("aria-toolbar.html"));
422 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
423 AccessibilityAriaValueMin
) {
424 RunTest(FILE_PATH_LITERAL("aria-valuemin.html"));
427 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
428 AccessibilityAriaValueMax
) {
429 RunTest(FILE_PATH_LITERAL("aria-valuemax.html"));
432 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityArticle
) {
433 RunTest(FILE_PATH_LITERAL("article.html"));
436 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityAWithImg
) {
437 RunTest(FILE_PATH_LITERAL("a-with-img.html"));
440 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityBdo
) {
441 RunTest(FILE_PATH_LITERAL("bdo.html"));
444 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityBR
) {
445 RunTest(FILE_PATH_LITERAL("br.html"));
448 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityButtonNameCalc
) {
449 RunTest(FILE_PATH_LITERAL("button-name-calc.html"));
452 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityCanvas
) {
453 RunTest(FILE_PATH_LITERAL("canvas.html"));
456 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
457 AccessibilityCheckboxNameCalc
) {
458 RunTest(FILE_PATH_LITERAL("checkbox-name-calc.html"));
461 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDel
) {
462 RunTest(FILE_PATH_LITERAL("del.html"));
465 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDfn
) {
466 RunTest(FILE_PATH_LITERAL("dfn.html"));
469 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDialog
) {
470 RunTest(FILE_PATH_LITERAL("dialog.html"));
473 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDiv
) {
474 RunTest(FILE_PATH_LITERAL("div.html"));
477 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityDl
) {
478 RunTest(FILE_PATH_LITERAL("dl.html"));
481 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
482 AccessibilityContenteditableDescendants
) {
483 RunTest(FILE_PATH_LITERAL("contenteditable-descendants.html"));
486 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityEm
) {
487 RunTest(FILE_PATH_LITERAL("em.html"));
490 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityFooter
) {
491 RunTest(FILE_PATH_LITERAL("footer.html"));
494 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityForm
) {
495 RunTest(FILE_PATH_LITERAL("form.html"));
498 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityHeading
) {
499 RunTest(FILE_PATH_LITERAL("heading.html"));
502 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityHR
) {
503 RunTest(FILE_PATH_LITERAL("hr.html"));
506 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
507 AccessibilityIframeCoordinates
) {
508 RunTest(FILE_PATH_LITERAL("iframe-coordinates.html"));
511 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputButton
) {
512 RunTest(FILE_PATH_LITERAL("input-button.html"));
515 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
516 AccessibilityInputButtonInMenu
) {
517 RunTest(FILE_PATH_LITERAL("input-button-in-menu.html"));
520 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputColor
) {
521 RunTest(FILE_PATH_LITERAL("input-color.html"));
524 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
525 AccessibilityInputImageButtonInMenu
) {
526 RunTest(FILE_PATH_LITERAL("input-image-button-in-menu.html"));
529 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityInputRange
) {
530 RunTest(FILE_PATH_LITERAL("input-range.html"));
533 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
534 AccessibilityInputTextNameCalc
) {
535 RunTest(FILE_PATH_LITERAL("input-text-name-calc.html"));
538 // crbug.com/98976 will cause new elements to be added to the Blink a11y tree
539 // Re-baseline after the Blink change goes in
540 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
541 DISABLED_AccessibilityInputTypes
) {
542 RunTest(FILE_PATH_LITERAL("input-types.html"));
545 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityLabel
) {
546 RunTest(FILE_PATH_LITERAL("label.html"));
549 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityLandmark
) {
550 RunTest(FILE_PATH_LITERAL("landmark.html"));
553 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityListMarkers
) {
554 RunTest(FILE_PATH_LITERAL("list-markers.html"));
557 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
558 AccessibilityMenutypecontext
) {
559 RunTest(FILE_PATH_LITERAL("menu-type-context.html"));
562 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
563 AccessibilityModalDialogClosed
) {
564 RunTest(FILE_PATH_LITERAL("modal-dialog-closed.html"));
567 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
568 AccessibilityModalDialogOpened
) {
569 RunTest(FILE_PATH_LITERAL("modal-dialog-opened.html"));
572 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
573 AccessibilityModalDialogInIframeClosed
) {
574 RunTest(FILE_PATH_LITERAL("modal-dialog-in-iframe-closed.html"));
577 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
578 AccessibilityModalDialogInIframeOpened
) {
579 RunTest(FILE_PATH_LITERAL("modal-dialog-in-iframe-opened.html"));
582 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
583 AccessibilityModalDialogStack
) {
584 RunTest(FILE_PATH_LITERAL("modal-dialog-stack.html"));
587 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityOl
) {
588 RunTest(FILE_PATH_LITERAL("ol.html"));
591 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
,
592 AccessibilityOptionindatalist
) {
593 RunTest(FILE_PATH_LITERAL("option-in-datalist.html"));
596 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityP
) {
597 RunTest(FILE_PATH_LITERAL("p.html"));
600 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityQ
) {
601 RunTest(FILE_PATH_LITERAL("q.html"));
604 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityRegion
) {
605 RunTest(FILE_PATH_LITERAL("region.html"));
608 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilitySelect
) {
609 RunTest(FILE_PATH_LITERAL("select.html"));
612 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilitySource
) {
613 RunTest(FILE_PATH_LITERAL("source.html"));
616 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilitySpan
) {
617 RunTest(FILE_PATH_LITERAL("span.html"));
620 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilitySub
) {
621 RunTest(FILE_PATH_LITERAL("sub.html"));
624 // TODO(dmazzoni): Rebaseline this test after Blink rolls past r155083.
625 // See http://crbug.com/265619
626 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, DISABLED_AccessibilitySvg
) {
627 RunTest(FILE_PATH_LITERAL("svg.html"));
630 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityTab
) {
631 RunTest(FILE_PATH_LITERAL("tab.html"));
634 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityTableSimple
) {
635 RunTest(FILE_PATH_LITERAL("table-simple.html"));
638 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityTableSpans
) {
639 RunTest(FILE_PATH_LITERAL("table-spans.html"));
642 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityTransition
) {
643 RunTest(FILE_PATH_LITERAL("transition.html"));
646 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityUl
) {
647 RunTest(FILE_PATH_LITERAL("ul.html"));
650 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest
, AccessibilityWbr
) {
651 RunTest(FILE_PATH_LITERAL("wbr.html"));
654 } // namespace content