#include "content/browser/web_contents/web_contents_view_aura.h"
#include <stddef.h>
#include <optional>
#include <tuple>
#include <utility>
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/test_timeouts.h"
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/browser/renderer_host/navigation_controller_impl.h"
#include "content/browser/renderer_host/navigation_entry_impl.h"
#include "content/browser/renderer_host/overscroll_controller.h"
#include "content/browser/renderer_host/render_widget_host_view_aura.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/browser/web_contents/web_contents_view.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/overscroll_configuration.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_view_delegate.h"
#include "content/public/browser/web_drag_dest_delegate.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/test_utils.h"
#include "content/shell/browser/shell.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "third_party/blink/public/common/input/synthetic_web_input_event_builders.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/dragdrop/drop_target_event.h"
#include "ui/base/dragdrop/mojom/drag_drop_types.mojom.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/events/base_event_utils.h"
#include "ui/events/event_sink.h"
#include "ui/events/event_utils.h"
#include "ui/events/test/event_generator.h"
namespace content {
namespace {
void GiveItSomeTime() { … }
class TestWebContentsViewDelegate : public WebContentsViewDelegate { … };
}
class WebContentsViewAuraTest : public ContentBrowserTest { … };
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
BUILDFLAG(IS_FUCHSIA)
#define MAYBE_OverscrollNavigation …
#else
#define MAYBE_OverscrollNavigation …
#endif
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_OverscrollNavigation) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
BUILDFLAG(IS_FUCHSIA)
#define MAYBE_OverscrollNavigationWithTouchHandler …
#else
#define MAYBE_OverscrollNavigationWithTouchHandler …
#endif
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
MAYBE_OverscrollNavigationWithTouchHandler) { … }
namespace {
class SpuriousMouseMoveEventObserver
: public RenderWidgetHost::InputEventObserver { … };
}
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
DISABLED_OverscrollNotInterruptedBySpuriousMouseEvents) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) || \
BUILDFLAG(IS_FUCHSIA)
#define MAYBE_QuickOverscrollDirectionChange …
#else
#define MAYBE_QuickOverscrollDirectionChange …
#endif
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
MAYBE_QuickOverscrollDirectionChange) { … }
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
DISABLED_ContentWindowReparent) { … }
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, DragDropOnOopif) { … }
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
Drop_NoDropZone_DelegateAllows) { … }
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
Drop_NoDropZone_DelegateBlocks) { … }
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, Drop_DropZone_DelegateAllow) { … }
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, Drop_DropZone_DelegateBlocks) { … }
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, ContentWindowClose) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
BUILDFLAG(IS_FUCHSIA)
#define MAYBE_RepeatedQuickOverscrollGestures …
#else
#define MAYBE_RepeatedQuickOverscrollGestures …
#endif
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
MAYBE_RepeatedQuickOverscrollGestures) { … }
class OverscrollWebContentsDelegate : public WebContentsDelegate { … };
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, RenderViewHostChanged) { … }
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
DISABLED_WebContentsViewReparent) { … }
#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
#define MAYBE_OverscrollNavigationTouchThrottling …
#else
#define MAYBE_OverscrollNavigationTouchThrottling …
#endif
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
MAYBE_OverscrollNavigationTouchThrottling) { … }
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, GetDropCallback_Run) { … }
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, GetDropCallback_Cancelled) { … }
IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, IgnoreInputs_Focus) { … }
}