chromium/ui/views/accessibility/ax_aura_obj_cache_unittest.cc

// Copyright 2016 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/views/accessibility/ax_aura_obj_cache.h"

#include <string>
#include <utility>

#include "base/memory/raw_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/accessibility/ax_tree.h"
#include "ui/accessibility/ax_tree_serializer.h"
#include "ui/accessibility/ax_tree_source_checker.h"
#include "ui/aura/window.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/views/accessibility/ax_aura_obj_wrapper.h"
#include "ui/views/accessibility/ax_event_manager.h"
#include "ui/views/accessibility/ax_event_observer.h"
#include "ui/views/accessibility/ax_tree_source_views.h"
#include "ui/views/accessibility/ax_virtual_view.h"
#include "ui/views/accessibility/ax_virtual_view_wrapper.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/widget_delegate.h"

namespace views::test {
namespace {

bool HasNodeWithName(ui::AXNode* node, const std::string& name) {}

bool HasNodeWithName(const ui::AXTree& tree, const std::string& name) {}

class AXAuraObjCacheTest : public WidgetTest {};

TEST_F(AXAuraObjCacheTest, TestViewRemoval) {}

// Helper for the ViewDestruction test.
class ViewBlurObserver : public ViewObserver {};

// Test that stale cache entries are not left behind if a cache entry is
// re-created during View destruction.
TEST_F(AXAuraObjCacheTest, ViewDestruction) {}

TEST_F(AXAuraObjCacheTest, CacheDestructionUAF) {}

TEST_F(AXAuraObjCacheTest, ValidTree) {}

TEST_F(AXAuraObjCacheTest, GetFocusIsUnignoredAncestor) {}

class TestingWidgetDelegateView : public WidgetDelegateView {};

class TestingAXEventObserver : public AXEventObserver {};

TEST_F(AXAuraObjCacheTest, DoNotCreateWidgetWrapperOnDestroyed) {}

TEST_F(AXAuraObjCacheTest, VirtualViews) {}

}  // namespace
}  // namespace views::test