#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
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) { … }
}
class DOMAgentTest : public views::ViewsTestBase { … };
#if defined(USE_AURA)
TEST_F(DOMAgentTest, GetDocumentWithWindowWidgetView) { … }
TEST_F(DOMAgentTest, GetDocumentNativeWidgetOwnsWidget) { … }
#endif
TEST_F(DOMAgentTest, GetDocumentMultipleWidgets) { … }
#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
TEST_F(DOMAgentTest, ViewInserted) { … }
TEST_F(DOMAgentTest, ViewRemoved) { … }
TEST_F(DOMAgentTest, ViewRearranged) { … }
TEST_F(DOMAgentTest, ViewRearrangedRemovedAndInserted) { … }
TEST_F(DOMAgentTest, NodeIdToUIElementTest) { … }
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) { … }
}