#include "chrome/test/base/interactive_test_utils.h"
#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/current_thread.h"
#include "build/build_config.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/test/ui_controls.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/events/keycodes/keyboard_codes.h"
namespace ui_test_utils {
namespace {
bool GetNativeWindow(const Browser* browser, gfx::NativeWindow* native_window) { … }
}
BrowserActivationWaiter::BrowserActivationWaiter(const Browser* browser) { … }
BrowserActivationWaiter::~BrowserActivationWaiter() = default;
void BrowserActivationWaiter::WaitForActivation() { … }
void BrowserActivationWaiter::OnWidgetActivationChanged(views::Widget* widget,
bool active) { … }
BrowserDeactivationWaiter::BrowserDeactivationWaiter(const Browser* browser)
: … { … }
BrowserDeactivationWaiter::~BrowserDeactivationWaiter() = default;
void BrowserDeactivationWaiter::WaitForDeactivation() { … }
void BrowserDeactivationWaiter::OnBrowserNoLongerActive(Browser* browser) { … }
bool BringBrowserWindowToFront(const Browser* browser) { … }
bool SendKeyPressSync(const Browser* browser,
ui::KeyboardCode key,
bool control,
bool shift,
bool alt,
bool command,
ui_controls::KeyEventType wait_for) { … }
bool SendKeyPressToWindowSync(const gfx::NativeWindow window,
ui::KeyboardCode key,
bool control,
bool shift,
bool alt,
bool command,
ui_controls::KeyEventType wait_for) { … }
bool SendMouseMoveSync(const gfx::Point& location,
gfx::NativeWindow window_hint) { … }
bool SendMouseEventsSync(ui_controls::MouseButton type,
int button_state,
gfx::NativeWindow window_hint) { … }
namespace internal {
void ClickTask(ui_controls::MouseButton button,
int button_state,
base::OnceClosure followup,
int accelerator_state) { … }
}
display::Display GetSecondaryDisplay(display::Screen* screen) { … }
std::pair<display::Display, display::Display> GetDisplays(
display::Screen* screen) { … }
}