#include "ui/views/controls/tree/tree_view.h"
#include <numeric>
#include <string>
#include <utility>
#include <vector>
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "ui/accessibility/ax_action_data.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/accessibility/ax_node_id_forward.h"
#include "ui/accessibility/platform/ax_platform_node_delegate.h"
#include "ui/base/models/tree_node_model.h"
#include "ui/compositor/canvas_painter.h"
#include "ui/views/accessibility/ax_virtual_view.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/accessibility/view_ax_platform_node_delegate.h"
#include "ui/views/controls/prefix_selector.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/controls/tree/tree_view_controller.h"
#include "ui/views/test/view_metadata_test_utils.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/widget/unique_widget_ptr.h"
#include "ui/views/widget/widget.h"
TreeModel;
TreeModelNode;
TreeNode;
ASCIIToUTF16;
namespace views {
namespace {
std::string AccessibilityViewAsString(const AXVirtualView& view) { … }
}
class TestNode : public TreeNode<TestNode> { … };
class TreeViewTest : public ViewsTestBase { … };
void TreeViewTest::SetUp() { … }
void TreeViewTest::TearDown() { … }
void TreeViewTest::ClearAccessibilityEvents() { … }
TestNode* TreeViewTest::Add(TestNode* parent,
size_t index,
const std::string& title) { … }
std::string TreeViewTest::TreeViewContentsAsString() { … }
std::string TreeViewTest::TreeViewAccessibilityContentsAsString() const { … }
std::string TreeViewTest::GetSelectedNodeTitle() { … }
std::string TreeViewTest::GetSelectedAccessibilityViewName() const { … }
std::string TreeViewTest::GetActiveNodeTitle() { … }
std::string TreeViewTest::GetActiveAccessibilityViewName() const { … }
std::string TreeViewTest::GetEditingNodeTitle() { … }
AXVirtualView* TreeViewTest::GetRootAccessibilityView() const { … }
ViewAXPlatformNodeDelegate* TreeViewTest::GetTreeAccessibilityView() const { … }
TestNode* TreeViewTest::GetNodeByTitle(const std::string& title) { … }
const AXVirtualView* TreeViewTest::GetAccessibilityViewByName(
const std::string& name) const { … }
void TreeViewTest::IncrementSelection(bool next) { … }
void TreeViewTest::CollapseOrSelectParent() { … }
void TreeViewTest::ExpandOrSelectChild() { … }
size_t TreeViewTest::GetRowCount() { … }
TestNode* TreeViewTest::GetNodeByTitleImpl(TestNode* node,
const std::u16string& title) { … }
std::string TreeViewTest::InternalNodeAsString(TreeView::InternalNode* node) { … }
TEST_F(TreeViewTest, MetadataTest) { … }
TEST_F(TreeViewTest, TreeViewPaintCoverage) { … }
TEST_F(TreeViewTest, InitialAccessibilityProperties) { … }
TEST_F(TreeViewTest, SetModel) { … }
TEST_F(TreeViewTest, SetSelectedNode) { … }
TEST_F(TreeViewTest, HideRoot) { … }
TEST_F(TreeViewTest, Expand) { … }
TEST_F(TreeViewTest, Collapse) { … }
TEST_F(TreeViewTest, TreeNodesAdded) { … }
TEST_F(TreeViewTest, TreeNodesRemoved) { … }
class TestController : public TreeViewController { … };
TEST_F(TreeViewTest, RemovingLastNodeNotifiesSelectionChanged) { … }
TEST_F(TreeViewTest, TreeNodeChanged) { … }
TEST_F(TreeViewTest, IncrementSelection) { … }
TEST_F(TreeViewTest, CollapseOrSelectParent) { … }
TEST_F(TreeViewTest, ExpandOrSelectChild) { … }
TEST_F(TreeViewTest, SelectOnKeyStroke) { … }
TEST_F(TreeViewTest, CommitOnFocusLost) { … }
TEST_F(TreeViewTest, VirtualAccessibleAction) { … }
TEST_F(TreeViewTest, OnFocusAccessibilityEvents) { … }
}