#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/location.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
#include "ui/web_dialogs/test/test_web_dialog_delegate.h"
WebContents;
WebDialogDelegate;
WebContentsModalDialogManager;
namespace {
static const char kTestDataURL[] = …;
bool IsEqualSizes(gfx::Size expected,
ConstrainedWebDialogDelegate* dialog_delegate) { … }
std::string GetChangeDimensionsScript(int dimension) { … }
class AutoResizingTestWebDialogDelegate
: public ui::test::TestWebDialogDelegate { … };
}
class ConstrainedWebDialogBrowserTest : public InProcessBrowserTest { … };
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
#define MAYBE_BasicTest …
#else
#define MAYBE_BasicTest …
#endif
IN_PROC_BROWSER_TEST_F(ConstrainedWebDialogBrowserTest, MAYBE_BasicTest) { … }
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
#define MAYBE_ReleaseWebContents …
#else
#define MAYBE_ReleaseWebContents …
#endif
IN_PROC_BROWSER_TEST_F(ConstrainedWebDialogBrowserTest,
MAYBE_ReleaseWebContents) { … }
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS_ASH)
#define MAYBE_ContentResizeInAutoResizingDialog …
#else
#define MAYBE_ContentResizeInAutoResizingDialog …
#endif
IN_PROC_BROWSER_TEST_F(ConstrainedWebDialogBrowserTest,
MAYBE_ContentResizeInAutoResizingDialog) { … }
IN_PROC_BROWSER_TEST_F(ConstrainedWebDialogBrowserTest,
ContentResizeInNonAutoResizingDialog) { … }