| Index: content/browser/accessibility/dump_accessibility_tree_browsertest.cc
|
| diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
|
| index b260892b072e40f21af9164e97a4ea76ada64e67..c4b47719c935d32e73dc7c799684f62538a9d86e 100644
|
| --- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
|
| +++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
|
| @@ -12,6 +12,7 @@
|
| #include "base/strings/string_split.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "base/test/scoped_feature_list.h"
|
| #include "base/threading/thread_restrictions.h"
|
| #include "build/build_config.h"
|
| #include "content/browser/accessibility/accessibility_tree_formatter.h"
|
| @@ -21,6 +22,7 @@
|
| #include "content/browser/accessibility/dump_accessibility_browsertest_base.h"
|
| #include "content/browser/web_contents/web_contents_impl.h"
|
| #include "content/public/browser/web_contents.h"
|
| +#include "content/public/common/content_features.h"
|
| #include "content/public/common/content_paths.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "content/public/test/content_browser_test_utils.h"
|
| @@ -81,6 +83,20 @@ class DumpAccessibilityTreeTest : public DumpAccessibilityTestBase {
|
| RunTest(aria_file, "accessibility/aria");
|
| }
|
|
|
| + void RunAomTest(const base::FilePath::CharType* file_path) {
|
| + scoped_feature_list_.InitAndEnableFeature(
|
| + features::kAccessibilityObjectModel);
|
| +
|
| + base::FilePath test_path = GetTestFilePath("accessibility", "aom");
|
| + {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io_for_test_setup;
|
| + ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName();
|
| + }
|
| + base::FilePath aom_file = test_path.Append(base::FilePath(file_path));
|
| +
|
| + RunTest(aom_file, "accessibility/aom");
|
| + }
|
| +
|
| void RunCSSTest(const base::FilePath::CharType* file_path) {
|
| base::FilePath test_path = GetTestFilePath("accessibility", "css");
|
| {
|
| @@ -118,6 +134,9 @@ class DumpAccessibilityTreeTest : public DumpAccessibilityTestBase {
|
| actual_contents, "\n",
|
| base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
|
| }
|
| +
|
| + protected:
|
| + base::test::ScopedFeatureList scoped_feature_list_;
|
| };
|
|
|
| IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityCSSColor) {
|
| @@ -172,6 +191,10 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAOnclick) {
|
| RunHtmlTest(FILE_PATH_LITERAL("a-onclick.html"));
|
| }
|
|
|
| +IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAomChecked) {
|
| + RunAomTest(FILE_PATH_LITERAL("aom-checked.html"));
|
| +}
|
| +
|
| IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
|
| AccessibilityAriaActivedescendant) {
|
| RunAriaTest(FILE_PATH_LITERAL("aria-activedescendant.html"));
|
|
|