#include "base/files/file_path.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/metrics/user_action_tester.h"
#include "base/test/test_future.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/picture_in_picture/document_picture_in_picture_mixin_test_base.h"
#include "chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker.h"
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/profiles/profile_test_util.h"
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/shortcuts/create_shortcut_for_current_web_contents_task.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/test/test_browser_dialog.h"
#include "chrome/browser/ui/test/test_browser_ui.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/shortcuts/create_desktop_shortcut.h"
#include "chrome/browser/ui/views/shortcuts/create_desktop_shortcut_delegate.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/document_picture_in_picture_window_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/views/test/dialog_test.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/any_widget_observer.h"
#include "ui/views/widget/widget.h"
namespace shortcuts {
namespace {
constexpr char kPageWithIcons[] = …;
class CreateDesktopShortcutDialogViewBrowserTest : public DialogBrowserTest { … };
IN_PROC_BROWSER_TEST_F(CreateDesktopShortcutDialogViewBrowserTest,
InvokeUiBasic) { … }
IN_PROC_BROWSER_TEST_F(CreateDesktopShortcutDialogViewBrowserTest,
InvokeUi_WidgetDestroyedOnNavigation) { … }
IN_PROC_BROWSER_TEST_F(CreateDesktopShortcutDialogViewBrowserTest,
InvokeUi_WidgetClosesOnVisibilityChange) { … }
IN_PROC_BROWSER_TEST_F(CreateDesktopShortcutDialogViewBrowserTest,
InvokeUi_WidgetClosesOnWebContentsDestruction) { … }
IN_PROC_BROWSER_TEST_F(CreateDesktopShortcutDialogViewBrowserTest,
InvokeUi_Accept) { … }
IN_PROC_BROWSER_TEST_F(CreateDesktopShortcutDialogViewBrowserTest,
InvokeUi_Cancel_TitleFilled) { … }
IN_PROC_BROWSER_TEST_F(CreateDesktopShortcutDialogViewBrowserTest,
InvokeUi_Cancel_TitleEmpty) { … }
IN_PROC_BROWSER_TEST_F(CreateDesktopShortcutDialogViewBrowserTest,
InvokeUi_TitleHasNoProfileIfSingleProfile) { … }
IN_PROC_BROWSER_TEST_F(CreateDesktopShortcutDialogViewBrowserTest,
InvokeUi_TitleHasProfileNameInfoMultiProfile) { … }
IN_PROC_BROWSER_TEST_F(CreateDesktopShortcutDialogViewBrowserTest,
DontShowMultipleDialogsIfAlreadyShown) { … }
IN_PROC_BROWSER_TEST_F(CreateDesktopShortcutDialogViewBrowserTest,
CancelFromCreateShortcutDialogStopsShortcutCreation) { … }
class PictureInPictureCreateShortcutDialogOcclusionTest
: public MixinBasedInProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(PictureInPictureCreateShortcutDialogOcclusionTest,
PipWindowCloses) { … }
}
}