#include "content/browser/accessibility/browser_accessibility.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
-#include "content/port/browser/render_widget_host_view_port.h"
+#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
+#include "content/public/test/content_browser_test.h"
+#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
#include "content/test/accessibility_browser_test_utils.h"
-#include "content/test/content_browser_test.h"
-#include "content/test/content_browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
-// TODO(dmazzoni): Disabled accessibility tests on Win64. crbug.com/179717
-#if defined(OS_WIN) && defined(ARCH_CPU_X86_64)
+// TODO(aboxhall): Create expectations on Android for these
+#if defined(OS_ANDROID)
#define MAYBE(x) DISABLED_##x
#else
#define MAYBE(x) x
NavigateToURL(shell(), url);
waiter.WaitForNotification();
- RenderWidgetHostViewPort* host_view = RenderWidgetHostViewPort::FromRWHV(
+ RenderWidgetHostViewBase* host_view = static_cast<RenderWidgetHostViewBase*>(
shell()->web_contents()->GetRenderWidgetHostView());
AccessibilityTreeFormatter formatter(
host_view->GetBrowserAccessibilityManager()->GetRoot());
base::FilePath(html_file.RemoveExtension().value() +
AccessibilityTreeFormatter::GetActualFileSuffix());
- EXPECT_TRUE(file_util::WriteFile(
+ EXPECT_TRUE(base::WriteFile(
actual_file, actual_contents.c_str(), actual_contents.size()));
ADD_FAILURE() << "No expectation found. Create it by doing:\n"
RunTest(FILE_PATH_LITERAL("a-name.html"));
}
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityANoText) {
+ RunTest(FILE_PATH_LITERAL("a-no-text.html"));
+}
+
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAOnclick) {
RunTest(FILE_PATH_LITERAL("a-onclick.html"));
}
RunTest(FILE_PATH_LITERAL("aria-autocomplete.html"));
}
-IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaCombobox) {
+// crbug.com/98976 will cause new elements to be added to the Blink a11y tree
+// Re-baseline after the Blink change goes in
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
+ DISABLED_AccessibilityAriaCombobox) {
RunTest(FILE_PATH_LITERAL("aria-combobox.html"));
}
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
+ MAYBE(AccessibilityAriaFlowto)) {
+ RunTest(FILE_PATH_LITERAL("aria-flowto.html"));
+}
+
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaInvalid) {
RunTest(FILE_PATH_LITERAL("aria-invalid.html"));
}
RunTest(FILE_PATH_LITERAL("hr.html"));
}
-// crbug.com/179717 and crbug.com/224659
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
- DISABLED_AccessibilityIframeCoordinates) {
+ AccessibilityIframeCoordinates) {
RunTest(FILE_PATH_LITERAL("iframe-coordinates.html"));
}
RunTest(FILE_PATH_LITERAL("input-text-name-calc.html"));
}
-IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityInputTypes) {
+// crbug.com/98976 will cause new elements to be added to the Blink a11y tree
+// Re-baseline after the Blink change goes in
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
+ DISABLED_AccessibilityInputTypes) {
RunTest(FILE_PATH_LITERAL("input-types.html"));
}
RunTest(FILE_PATH_LITERAL("wbr.html"));
}
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
+ AccessibilityAriaActivedescendant) {
+ RunTest(FILE_PATH_LITERAL("aria-activedescendant.html"));
+}
+
} // namespace content