chromium/components/ui_devtools/views/dom_agent_unittest.cc

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

#include <memory>
#include <string>

#include "components/ui_devtools/views/dom_agent_views.h"

#include "base/memory/raw_ptr.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "components/ui_devtools/css_agent.h"
#include "components/ui_devtools/ui_devtools_unittest_utils.h"
#include "components/ui_devtools/ui_element.h"
#include "components/ui_devtools/views/overlay_agent_views.h"
#include "components/ui_devtools/views/view_element.h"
#include "components/ui_devtools/views/widget_element.h"
#include "ui/base/interaction/element_identifier.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/views/metadata/view_factory.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/widget/native_widget_private.h"
#include "ui/views/widget/widget.h"

#if defined(USE_AURA)
#include "components/ui_devtools/views/window_element.h"
#include "ui/aura/client/window_parenting_client.h"
#include "ui/aura/env.h"
#include "ui/aura/window_tree_host.h"
#endif  // defined(USE_AURA)

namespace ui_devtools {

DOM;

namespace {

class TestView : public views::View {};

BEGIN_METADATA()

std::string GetAttributeValue(const std::string& attribute, DOM::Node* node) {}

DOM::Node* FindNodeWithID(int id, DOM::Node* root) {}

}  // namespace

class DOMAgentTest : public views::ViewsTestBase {};

// Tests to ensure that the DOMAgent's hierarchy matches the real hierarchy.
#if defined(USE_AURA)

TEST_F(DOMAgentTest, GetDocumentWithWindowWidgetView) {}

TEST_F(DOMAgentTest, GetDocumentNativeWidgetOwnsWidget) {}

#endif  // defined(USE_AURA)

TEST_F(DOMAgentTest, GetDocumentMultipleWidgets) {}

// Tests to ensure correct messages are sent when elements are added,
// removed, and moved around.

#if defined(USE_AURA)
TEST_F(DOMAgentTest, WindowAddedChildNodeInserted) {}

TEST_F(DOMAgentTest, WindowDestroyedChildNodeRemoved) {}

TEST_F(DOMAgentTest, WindowReorganizedChildNodeRearranged) {}

TEST_F(DOMAgentTest, WindowReorganizedChildNodeRemovedAndInserted) {}

TEST_F(DOMAgentTest, WindowStackingChangedChildNodeRemovedAndInserted) {}
#endif  // defined(USE_AURA)

TEST_F(DOMAgentTest, ViewInserted) {}

TEST_F(DOMAgentTest, ViewRemoved) {}

TEST_F(DOMAgentTest, ViewRearranged) {}

TEST_F(DOMAgentTest, ViewRearrangedRemovedAndInserted) {}

TEST_F(DOMAgentTest, NodeIdToUIElementTest) {}

// Tests to ensure dom search for native UI is working
TEST_F(DOMAgentTest, SimpleDomSearch) {}

TEST_F(DOMAgentTest, ExactDomSearch) {}

TEST_F(DOMAgentTest, TagDomSearch) {}

TEST_F(DOMAgentTest, DomSearchForStylesPanel) {}

DECLARE_ELEMENT_IDENTIFIER_VALUE();
DEFINE_ELEMENT_IDENTIFIER_VALUE(kTestElementID);

TEST_F(DOMAgentTest, DomSearchForElementID) {}

}  // namespace ui_devtools