chromium/ui/views/accessibility/ax_tree_source_views_unittest.cc

// Copyright 2018 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_tree_source_views.h"

#include <memory>
#include <utility>
#include <vector>

#include "base/memory/raw_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/accessibility/ax_tree_data.h"
#include "ui/aura/client/focus_client.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/views/accessibility/ax_aura_obj_cache.h"
#include "ui/views/accessibility/ax_aura_obj_wrapper.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/widget.h"

namespace views {
namespace {

// TestAXTreeSourceViews provides a root with a default tree ID.
class TestAXTreeSourceViews : public AXTreeSourceViews {};

class AXTreeSourceViewsTest : public ViewsTestBase {};

TEST_F(AXTreeSourceViewsTest, Basics) {}

TEST_F(AXTreeSourceViewsTest, GetTreeDataWithFocus) {}

TEST_F(AXTreeSourceViewsTest, IgnoredView) {}

TEST_F(AXTreeSourceViewsTest, ViewWithChildTreeHasNoChildren) {}

#if BUILDFLAG(ENABLE_DESKTOP_AURA)
class AXTreeSourceViewsDesktopWidgetTest : public AXTreeSourceViewsTest {};

// Tests that no use-after-free when a focused child window is destroyed in
// desktop aura widget.
TEST_F(AXTreeSourceViewsDesktopWidgetTest, FocusedChildWindowDestroyed) {}
#endif  // defined(USE_AURA)

}  // namespace
}  // namespace views