#include "base/files/file_path.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/javascript_dialogs/tab_modal_dialog_manager.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/isolated_world_ids.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "ui/base/test/ui_controls.h"
namespace {
class MouseEventsTest : public InProcessBrowserTest { … };
#if BUILDFLAG(IS_MAC)
#define MAYBE_MouseOver …
#else
#define MAYBE_MouseOver …
#endif
IN_PROC_BROWSER_TEST_F(MouseEventsTest, MAYBE_MouseOver) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_ClickAndDoubleClick …
#else
#define MAYBE_ClickAndDoubleClick …
#endif
IN_PROC_BROWSER_TEST_F(MouseEventsTest, MAYBE_ClickAndDoubleClick) { … }
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
BUILDFLAG(IS_WIN)
#define MAYBE_TestOnMouseOut …
#else
#define MAYBE_TestOnMouseOut …
#endif
IN_PROC_BROWSER_TEST_F(MouseEventsTest, MAYBE_TestOnMouseOut) { … }
#if BUILDFLAG(IS_WIN)
IN_PROC_BROWSER_TEST_F(MouseEventsTest, MouseDownOnBrowserCaption) {
gfx::Rect browser_bounds = browser()->window()->GetBounds();
ui_controls::SendMouseMove(browser_bounds.x() + 200, browser_bounds.y() + 10);
ui_controls::SendMouseClick(ui_controls::LEFT);
NavigateAndWaitForMouseOverThenMouseOut();
}
#endif
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_OZONE)
#define MAYBE_ContextMenu …
#else
#define MAYBE_ContextMenu …
#endif
IN_PROC_BROWSER_TEST_F(MouseEventsTest, MAYBE_ContextMenu) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
BUILDFLAG(IS_CHROMEOS)
#define MAYBE_ModalDialog …
#else
#define MAYBE_ModalDialog …
#endif
IN_PROC_BROWSER_TEST_F(MouseEventsTest, MAYBE_ModalDialog) { … }
}