#include "third_party/blink/renderer/modules/accessibility/testing/accessibility_selection_test.h"
#include <iterator>
#include <string_view>
#include "base/containers/span.h"
#include "base/memory/scoped_refptr.h"
#include "base/ranges/algorithm.h"
#include "third_party/blink/public/platform/file_path_conversion.h"
#include "third_party/blink/renderer/core/dom/character_data.h"
#include "third_party/blink/renderer/core/dom/container_node.h"
#include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/editing/position.h"
#include "third_party/blink/renderer/core/editing/selection_template.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/modules/accessibility/ax_object.h"
#include "third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h"
#include "third_party/blink/renderer/modules/accessibility/ax_position.h"
#include "third_party/blink/renderer/modules/accessibility/ax_selection.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/wtf/shared_buffer.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
namespace blink {
namespace {
constexpr char kSelectionTestsRelativePath[] = …;
constexpr char kTestFileSuffix[] = …;
constexpr char kAXTestExpectationSuffix[] = …;
class AXSelectionSerializer final { … };
class AXSelectionDeserializer final { … };
}
AccessibilitySelectionTest::AccessibilitySelectionTest(
LocalFrameClient* local_frame_client)
: … { … }
void AccessibilitySelectionTest::SetUp() { … }
std::string AccessibilitySelectionTest::GetCurrentSelectionText() const { … }
std::string AccessibilitySelectionTest::GetSelectionText(
const AXSelection& selection) const { … }
std::string AccessibilitySelectionTest::GetSelectionText(
const AXSelection& selection,
const AXObject& subtree) const { … }
AXSelection AccessibilitySelectionTest::SetSelectionText(
const std::string& selection_text) const { … }
AXSelection AccessibilitySelectionTest::SetSelectionText(
const std::string& selection_text,
HTMLElement& element) const { … }
void AccessibilitySelectionTest::RunSelectionTest(
const std::string& test_name,
const std::string& suffix) const { … }
}