| 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 d36cd388636223f003a8394b20fc5811f1beef04..b5b8ccdc9a32e568a7f341912872eba86c659ef4 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/threading/thread_restrictions.h"
|
| #include "build/build_config.h"
|
| #include "content/browser/accessibility/accessibility_tree_formatter.h"
|
| #include "content/browser/accessibility/accessibility_tree_formatter_blink.h"
|
| @@ -22,6 +23,7 @@
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/common/content_paths.h"
|
| #include "content/public/common/content_switches.h"
|
| +#include "content/public/test/content_browser_test_utils.h"
|
| #include "content/shell/browser/shell.h"
|
| #include "content/test/accessibility_browser_test_utils.h"
|
|
|
| @@ -69,35 +71,35 @@ class DumpAccessibilityTreeTest : public DumpAccessibilityTestBase {
|
| }
|
|
|
| void RunAriaTest(const base::FilePath::CharType* file_path) {
|
| - base::FilePath dir_test_data;
|
| - ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &dir_test_data));
|
| - base::FilePath test_path(dir_test_data.AppendASCII("accessibility")
|
| - .AppendASCII("aria"));
|
| - ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName();
|
| -
|
| + base::FilePath test_path = GetTestFilePath("accessibility", "aria");
|
| + {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io_for_test_setup;
|
| + ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName();
|
| + }
|
| base::FilePath aria_file = test_path.Append(base::FilePath(file_path));
|
| +
|
| RunTest(aria_file, "accessibility/aria");
|
| }
|
|
|
| void RunCSSTest(const base::FilePath::CharType* file_path) {
|
| - base::FilePath dir_test_data;
|
| - ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &dir_test_data));
|
| - base::FilePath test_path(
|
| - dir_test_data.AppendASCII("accessibility").AppendASCII("css"));
|
| - ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName();
|
| -
|
| + base::FilePath test_path = GetTestFilePath("accessibility", "css");
|
| + {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io_for_test_setup;
|
| + ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName();
|
| + }
|
| base::FilePath css_file = test_path.Append(base::FilePath(file_path));
|
| +
|
| RunTest(css_file, "accessibility/css");
|
| }
|
|
|
| void RunHtmlTest(const base::FilePath::CharType* file_path) {
|
| - base::FilePath dir_test_data;
|
| - ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &dir_test_data));
|
| - base::FilePath test_path(dir_test_data.AppendASCII("accessibility")
|
| - .AppendASCII("html"));
|
| - ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName();
|
| -
|
| + base::FilePath test_path = GetTestFilePath("accessibility", "html");
|
| + {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io_for_test_setup;
|
| + ASSERT_TRUE(base::PathExists(test_path)) << test_path.LossyDisplayName();
|
| + }
|
| base::FilePath html_file = test_path.Append(base::FilePath(file_path));
|
| +
|
| RunTest(html_file, "accessibility/html");
|
| }
|
|
|
|
|