#include "ui/accessibility/platform/browser_accessibility_manager.h"
#include <stddef.h>
#include <stdint.h>
#include <string>
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/buildflag.h"
#include "ui/accessibility/platform/browser_accessibility.h"
#if BUILDFLAG(IS_WIN)
#include "ui/accessibility/platform/browser_accessibility_win.h"
#endif
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/accessibility/ax_common.h"
#include "ui/accessibility/ax_tree.h"
#include "ui/accessibility/ax_updates_and_events.h"
#include "ui/accessibility/platform/test_ax_node_id_delegate.h"
#include "ui/accessibility/platform/test_ax_platform_tree_manager_delegate.h"
#include "ui/accessibility/test_ax_tree_update.h"
#if BUILDFLAG(IS_ANDROID)
#include "content/browser/accessibility/browser_accessibility_manager_android.h"
#endif
namespace content {
namespace {
class CountingAXTreeObserver : public ui::AXTreeObserver { … };
ui::BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
const ui::AXTreeUpdate& initial_tree,
ui::AXNodeIdDelegate& node_id_delegate,
ui::AXPlatformTreeManagerDelegate* delegate) { … }
}
class BrowserAccessibilityManagerTest : public testing::Test { … };
void BrowserAccessibilityManagerTest::SetUp() { … }
TEST_F(BrowserAccessibilityManagerTest, TestErrorOnCreateIsFatal) { … }
TEST_F(BrowserAccessibilityManagerTest, TestErrorOnUpdate) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(USE_ATK)
TEST_F(BrowserAccessibilityManagerTest, BoundsForRange) { … }
#endif
TEST_F(BrowserAccessibilityManagerTest, BoundsForRangeMultiElement) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(USE_ATK)
TEST_F(BrowserAccessibilityManagerTest, BoundsForRangeBiDi) { … }
#endif
#if BUILDFLAG(IS_WIN) || BUILDFLAG(USE_ATK)
TEST_F(BrowserAccessibilityManagerTest, BoundsForRangeScrolledWindow) { … }
#endif
#if BUILDFLAG(IS_WIN) || BUILDFLAG(USE_ATK)
TEST_F(BrowserAccessibilityManagerTest, BoundsForRangeOnParentElement) { … }
#endif
TEST_F(BrowserAccessibilityManagerTest, TestNextPreviousInTreeOrder) { … }
TEST_F(BrowserAccessibilityManagerTest, TestNextNonDescendantInTreeOrder) { … }
TEST_F(BrowserAccessibilityManagerTest, TestNextPreviousTextOnlyObject) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(USE_ATK)
TEST_F(BrowserAccessibilityManagerTest, TestFindIndicesInCommonParent) { … }
#endif
#if BUILDFLAG(IS_WIN) || BUILDFLAG(USE_ATK)
TEST_F(BrowserAccessibilityManagerTest, TestGetTextForRange) { … }
#endif
TEST_F(BrowserAccessibilityManagerTest, DeletingFocusedNodeDoesNotCrash) { … }
TEST_F(BrowserAccessibilityManagerTest, DeletingFocusedNodeDoesNotCrash2) { … }
TEST_F(BrowserAccessibilityManagerTest, TreeUpdatesAreMergedWhenPossible) { … }
TEST_F(BrowserAccessibilityManagerTest, TestHitTestScaled) { … }
TEST_F(BrowserAccessibilityManagerTest, TestShouldFireEventForNode) { … }
TEST_F(BrowserAccessibilityManagerTest,
TestShouldFireEventForAlertEventWithEmptyName) { … }
TEST_F(BrowserAccessibilityManagerTest,
TestShouldFireEventForAlertEventWithNonEmptyName) { … }
TEST_F(BrowserAccessibilityManagerTest, NestedChildRoot) { … }
TEST_F(BrowserAccessibilityManagerTest, TestApproximateHitTestCache) { … }
TEST_F(BrowserAccessibilityManagerTest, TestOnNodeReparented) { … }
}