#include <string>
#include "base/check.h"
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/escape.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/run_until.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_timeouts.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/test/accessibility_notification_waiter.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/context_menu_interceptor.h"
#include "content/public/test/scoped_accessibility_mode_override.h"
#include "content/public/test/test_utils.h"
#include "content/shell/browser/shell.h"
#include "content/test/content_browser_test_utils_internal.h"
#include "net/base/data_url.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features_generated.h"
#include "ui/accessibility/accessibility_switches.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_position.h"
#include "ui/accessibility/mojom/ax_tree_data.mojom-shared-internal.h"
#include "ui/accessibility/platform/browser_accessibility.h"
#include "ui/accessibility/platform/browser_accessibility_manager.h"
#include "ui/gfx/codec/png_codec.h"
#include "url/gurl.h"
namespace content {
namespace {
class AccessibilityActionBrowserTest : public ContentBrowserTest { … };
}
class AccessibilityCanvasActionBrowserTest
: public AccessibilityActionBrowserTest { … };
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, DoDefaultAction) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest,
DoDefaultActionOnObjectWithRole) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, FocusAction) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, BlurAction) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest,
IncrementDecrementActions) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, VerticalScroll) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, HorizontalScroll) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_CanvasGetImage …
#else
#define MAYBE_CanvasGetImage …
#endif
IN_PROC_BROWSER_TEST_F(AccessibilityCanvasActionBrowserTest,
MAYBE_CanvasGetImage) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_CanvasGetImageScale …
#else
#define MAYBE_CanvasGetImageScale …
#endif
IN_PROC_BROWSER_TEST_F(AccessibilityCanvasActionBrowserTest,
MAYBE_CanvasGetImageScale) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, ImgElementGetImage) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest,
DoDefaultActionFocusesContentEditable) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, InputSetValue) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, TextareaSetValue) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest,
ContenteditableSetValue) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, ShowContextMenu) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest,
ShowContextMenuOnMultilineElement) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest,
ShowContextMenuOnOffscreenElement) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest,
ShowContextMenuOnObscuredElement) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest,
AriaGridSelectedChangedEvent) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest,
AriaControlsChangedEvent) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, FocusLostOnDeletedNode) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest,
FocusLostOnDeletedNodeInInnerWebContents) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest,
InnerWebContentsFocusPlaceholder) { … }
#if !BUILDFLAG(IS_ANDROID)
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, ScrollIntoView) { … }
#endif
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, StitchChildTree) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, ClickSVG) { … }
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest,
DISABLED_ClickAXNodeGeneratedFromCSSContent) { … }
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_IOS)
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, OpenSelectPopup) { … }
#endif
IN_PROC_BROWSER_TEST_F(AccessibilityActionBrowserTest, FocusPermissionElement) { … }
}