chromium/ui/accessibility/ax_event_generator_unittest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/accessibility/ax_event_generator.h"

#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/accessibility/ax_enum_util.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node.h"
#include "ui/accessibility/ax_serializable_tree.h"
#include "ui/accessibility/ax_tree.h"
#include "ui/accessibility/ax_tree_serializer.h"

namespace ui {

// Required by gmock to print TargetedEvent in a human-readable way.
void PrintTo(const AXEventGenerator::TargetedEvent& event, std::ostream* os) {}

namespace {

IsEmpty;
IsSupersetOf;
Matches;
PrintToString;
UnorderedElementsAre;

MATCHER_P2(HasEventAtNode,
           expected_event_type,
           expected_node_id,
           std::string(negation ? "does not have" : "has") + " " +
               PrintToString(expected_event_type) + " on " +
               PrintToString(expected_node_id)) {}

}  // namespace

TEST(AXEventGeneratorTest, IterateThroughEmptyEventSets) {}

TEST(AXEventGeneratorTest, DocumentSelectionChanged) {}

TEST(AXEventGeneratorTest, DocumentTitleChanged) {}

TEST(AXEventGeneratorTest, ExpandedAndRowCount) {}

TEST(AXEventGeneratorTest, SelectedAndSelectedChildren) {}

TEST(AXEventGeneratorTest, SelectedAndSelectedValueChanged) {}

TEST(AXEventGeneratorTest, SelectionInTextFieldChanged) {}

TEST(AXEventGeneratorTest, ValueInTextFieldChanged) {}

TEST(AXEventGeneratorTest, FloatValueChanged) {}

TEST(AXEventGeneratorTest, InvalidStatusChanged) {}

TEST(AXEventGeneratorTest, AddLiveRegionAttribute) {}

TEST(AXEventGeneratorTest, CheckedStateChanged) {}

TEST(AXEventGeneratorTest, ActiveDescendantChanged) {}

TEST(AXEventGeneratorTest, ActiveDescendantChangedAndNewNodeSelection) {}

TEST(AXEventGeneratorTest, ActiveDescendantChangedAndNewNodeSelectionIndirect) {}

TEST(AXEventGeneratorTest, CreateAlertAndLiveRegion) {}

TEST(AXEventGeneratorTest, LiveRegionChanged) {}

TEST(AXEventGeneratorTest, LiveRegionOnlyTextChanges) {}

TEST(AXEventGeneratorTest, BusyLiveRegionChanged) {}

TEST(AXEventGeneratorTest, RemoveAriaLiveOffFromChild) {}

TEST(AXEventGeneratorTest, AddChild) {}

TEST(AXEventGeneratorTest, RemoveChild) {}

TEST(AXEventGeneratorTest, ReorderChildren) {}

TEST(AXEventGeneratorTest, ScrollHorizontalPositionChanged) {}

TEST(AXEventGeneratorTest, ScrollVerticalPositionChanged) {}

TEST(AXEventGeneratorTest, TextAttributeChanged) {}

TEST(AXEventGeneratorTest, ObjectAttributeChanged) {}

// Note: we no longer fire OTHER_ATTRIBUTE_CHANGED for general attributes.
// We only fire specific events.
TEST(AXEventGeneratorTest, OtherAttributeChanged) {}

TEST(AXEventGeneratorTest, NameChanged) {}

TEST(AXEventGeneratorTest, DescriptionChanged) {}

TEST(AXEventGeneratorTest, RoleChanged) {}

TEST(AXEventGeneratorTest, MenuItemSelected) {}

TEST(AXEventGeneratorTest, NodeBecomesIgnored) {}

TEST(AXEventGeneratorTest, NodeBecomesIgnored2) {}

TEST(AXEventGeneratorTest, NodeBecomesUnignored) {}

TEST(AXEventGeneratorTest, NodeBecomesUnignored2) {}

TEST(AXEventGeneratorTest, NodeInsertedViaRoleChange) {}

TEST(AXEventGeneratorTest, NodeInserted) {}

TEST(AXEventGeneratorTest, SubtreeBecomesUnignored) {}

TEST(AXEventGeneratorTest, TwoNodesSwapIgnored) {}

TEST(AXEventGeneratorTest, TwoNodesSwapIgnored2) {}

TEST(AXEventGeneratorTest, IgnoredChangedFiredOnAncestorOnly2) {}

TEST(AXEventGeneratorTest, IgnoredChangedFiredOnAncestorOnly8) {}

TEST(AXEventGeneratorTest, ActiveDescendantChangeOnDescendant) {}

TEST(AXEventGeneratorTest, ImageAnnotationChanged) {}

TEST(AXEventGeneratorTest, ImageAnnotationStatusChanged) {}

TEST(AXEventGeneratorTest, StringPropertyChanges) {}

TEST(AXEventGeneratorTest, IntPropertyChanges) {}

TEST(AXEventGeneratorTest, IntListPropertyChanges) {}

TEST(AXEventGeneratorTest, AriaBusyChanged) {}

TEST(AXEventGeneratorTest, MultiselectableStateChanged) {}

TEST(AXEventGeneratorTest, RequiredStateChanged) {}

TEST(AXEventGeneratorTest, FlowToChanged) {}

TEST(AXEventGeneratorTest, ControlsChanged) {}

TEST(AXEventGeneratorTest, AtomicChanged) {}

TEST(AXEventGeneratorTest, HasPopupChanged) {}

TEST(AXEventGeneratorTest, LiveRelevantChanged) {}

TEST(AXEventGeneratorTest, MultilineStateChanged) {}

TEST(AXEventGeneratorTest, EditableTextChanged) {}

TEST(AXEventGeneratorTest, CheckedStateDescriptionChanged) {}

TEST(AXEventGeneratorTest, LiveRegionNodeRemovedNotRelevant) {}

TEST(AXEventGeneratorTest, LiveRegionNodeRemovedAllRelevant) {}

TEST(AXEventGeneratorTest, LiveRegionNodeRemovedAdditionsRelevant) {}

TEST(AXEventGeneratorTest, LiveRegionNodeRemovedRemovalsRelevant) {}

TEST(AXEventGeneratorTest, LiveRegionNodeReparentedAdditionsRelevant) {}

TEST(AXEventGeneratorTest, LiveRegionRootRemoved) {}

TEST(AXEventGeneratorTest, LiveRootsNested) {}

TEST(AXEventGeneratorTest, LiveRootDescendantOfClearedNodeChanged) {}

TEST(AXEventGeneratorTest, NoParentChangedOnIgnoredNode) {}

TEST(AXEventGeneratorTest, ParentChangedOnIgnoredNodeFiresOnChildren) {}

TEST(AXEventGeneratorTest, InsertUnderIgnoredTest) {}

TEST(AXEventGeneratorTest, ParseGeneratedEvent) {}

TEST(AXEventGenerator, ParsingUnknownEvent) {}

}  // namespace ui