#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/permissions/permission_request_manager.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/default_handlers.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "ui/display/screen_base.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/shell.h"
#include "ui/display/test/display_manager_test_api.h"
#endif
namespace {
constexpr char kGetScreensScript[] = …;
constexpr char kCheckPermissionScript[] = …;
class WindowManagementPermissionContextTest : public InProcessBrowserTest { … };
class MultiscreenWindowManagementPermissionContextTest
: public WindowManagementPermissionContextTest { … };
IN_PROC_BROWSER_TEST_F(WindowManagementPermissionContextTest, GestureToPrompt) { … }
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
#define MAYBE_DismissAndDeny …
#else
#define MAYBE_DismissAndDeny …
#endif
IN_PROC_BROWSER_TEST_F(WindowManagementPermissionContextTest,
MAYBE_DismissAndDeny) { … }
IN_PROC_BROWSER_TEST_F(WindowManagementPermissionContextTest, Accept) { … }
IN_PROC_BROWSER_TEST_F(WindowManagementPermissionContextTest,
IFrameSameOriginAllow) { … }
IN_PROC_BROWSER_TEST_F(WindowManagementPermissionContextTest,
IFrameCrossOriginDeny) { … }
IN_PROC_BROWSER_TEST_F(WindowManagementPermissionContextTest,
IFrameCrossOriginExplicitAllow) { … }
#if !BUILDFLAG(IS_WIN)
IN_PROC_BROWSER_TEST_F(MultiscreenWindowManagementPermissionContextTest,
IsExtendedSameOriginAllow) { … }
IN_PROC_BROWSER_TEST_F(MultiscreenWindowManagementPermissionContextTest,
IsExtendedCrossOriginDeny) { … }
IN_PROC_BROWSER_TEST_F(MultiscreenWindowManagementPermissionContextTest,
IsExtendedCrossOriginAllow) { … }
#endif
}