#include "chrome/browser/ui/web_applications/web_app_menu_model.h"
#include <algorithm>
#include <vector>
#include "build/chromeos_buildflags.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h"
#include "chrome/browser/web_applications/test/prevent_close_test_base.h"
#include "chrome/browser/web_applications/test/web_app_install_test_utils.h"
#include "chrome/browser/web_applications/web_app_id_constants.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/models/menu_model.h"
#include "url/gurl.h"
namespace web_app {
class TestWebAppMenuModelCR2023 : public WebAppBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(TestWebAppMenuModelCR2023, ModelHasIcons) { … }
IN_PROC_BROWSER_TEST_F(TestWebAppMenuModelCR2023, CommandStatusTest) { … }
namespace {
constexpr char kCalculatorAppUrl[] = …;
constexpr char kPreventCloseEnabledForCalculator[] = …;
constexpr char kCalculatorForceInstalled[] = …;
#if BUILDFLAG(IS_CHROMEOS)
constexpr bool kShouldPreventClose = true;
#else
constexpr bool kShouldPreventClose = …;
#endif
}
WebAppModelMenuPreventCloseTest;
IN_PROC_BROWSER_TEST_F(WebAppModelMenuPreventCloseTest,
PreventCloseEnforedByPolicy) { … }
}