#include "ui/accessibility/ax_tree_source_checker.h"
#include "base/strings/string_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/accessibility/ax_tree_data.h"
#include "ui/accessibility/ax_tree_source.h"
namespace ui {
namespace {
struct FakeAXNode { … };
void CleanAXNodeDataString(std::string* error_str) { … }
class FakeAXTreeSource
: public AXTreeSource<const FakeAXNode*, AXTreeData*, AXNodeData> { … };
}
FakeAXTreeSourceChecker;
TEST(AXTreeSourceCheckerTest, SimpleValidTree) { … }
TEST(AXTreeSourceCheckerTest, BadRoot) { … }
TEST(AXTreeSourceCheckerTest, BadNodeIdOfRoot) { … }
TEST(AXTreeSourceCheckerTest, BadNodeIdOfChild) { … }
TEST(AXTreeSourceCheckerTest, RootShouldNotBeNodeWithParent) { … }
TEST(AXTreeSourceCheckerTest, MissingParent) { … }
TEST(AXTreeSourceCheckerTest, InvalidParent) { … }
}