#ifndef UI_BASE_INTERACTION_ELEMENT_TEST_UTIL_H_
#define UI_BASE_INTERACTION_ELEMENT_TEST_UTIL_H_
#include "ui/base/interaction/element_identifier.h"
#include "ui/base/interaction/element_tracker.h"
#include "ui/base/interaction/framework_specific_implementation.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/native_ui_types.h"
namespace ui::test {
class TestElementBase : public TrackedElement {
public:
TestElementBase(ElementIdentifier id, ElementContext context);
~TestElementBase() override;
void Show();
void Activate();
void Hide();
bool IsVisible() const;
void SendCustomEvent(CustomElementEventType event_type);
void SetScreenBounds(const gfx::Rect& screen_bounds);
gfx::Rect GetScreenBounds() const override;
void SetNativeView(gfx::NativeView native_view);
gfx::NativeView GetNativeView() const override;
private:
bool visible_ = false;
gfx::Rect screen_bounds_;
gfx::NativeView native_view_ = gfx::NativeView();
};
class TestElement : public TestElementBase {
public:
TestElement(ElementIdentifier id, ElementContext context);
DECLARE_FRAMEWORK_SPECIFIC_METADATA()
};
class TestElementOtherFramework : public TestElementBase {
public:
TestElementOtherFramework(ElementIdentifier id, ElementContext context);
DECLARE_FRAMEWORK_SPECIFIC_METADATA()
};
using TestElementPtr = std::unique_ptr<TestElementBase>;
}
#endif