#ifndef CONTENT_TEST_ACCESSIBILITY_BROWSER_TEST_UTILS_H_
#define CONTENT_TEST_ACCESSIBILITY_BROWSER_TEST_UTILS_H_
#include "base/memory/weak_ptr.h"
#include "content/common/view_message_enums.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/accessibility/ax_tree.h"
namespace content {
class MessageLoopRunner;
class RenderViewHostImpl;
class Shell;
class AccessibilityNotificationWaiter {
public:
explicit AccessibilityNotificationWaiter(Shell* shell);
AccessibilityNotificationWaiter(
Shell* shell,
AccessibilityMode accessibility_mode,
ui::AXEvent event);
~AccessibilityNotificationWaiter();
void WaitForNotification();
const ui::AXTree& GetAXTree() const;
private:
void OnAccessibilityEvent(ui::AXEvent event);
bool IsAboutBlank();
Shell* shell_;
RenderViewHostImpl* view_host_;
ui::AXEvent event_to_wait_for_;
scoped_refptr<MessageLoopRunner> loop_runner_;
base::WeakPtrFactory<AccessibilityNotificationWaiter> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(AccessibilityNotificationWaiter);
};
}
#endif