chromium/chrome/browser/web_applications/commands/manifest_update_check_command_unittest.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/web_applications/commands/manifest_update_check_command.h"

#include <memory>
#include <optional>
#include <string>
#include <utility>

#include "base/auto_reset.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/bind.h"
#include "base/test/test_future.h"
#include "chrome/browser/web_applications/manifest_update_utils.h"
#include "chrome/browser/web_applications/test/fake_web_app_provider.h"
#include "chrome/browser/web_applications/test/fake_web_contents_manager.h"
#include "chrome/browser/web_applications/test/web_app_icon_test_utils.h"
#include "chrome/browser/web_applications/test/web_app_install_test_utils.h"
#include "chrome/browser/web_applications/test/web_app_test.h"
#include "chrome/browser/web_applications/web_app_callback_app_identity.h"
#include "chrome/browser/web_applications/web_app_command_scheduler.h"
#include "chrome/browser/web_applications/web_app_helpers.h"
#include "chrome/browser/web_applications/web_app_icon_generator.h"
#include "chrome/browser/web_applications/web_app_icon_manager.h"
#include "chrome/browser/web_applications/web_app_install_info.h"
#include "chrome/browser/web_applications/web_app_install_utils.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/browser/web_applications/web_app_ui_manager.h"
#include "chrome/browser/web_applications/web_contents/web_app_icon_downloader.h"
#include "components/services/app_service/public/cpp/url_handler_info.h"
#include "components/webapps/browser/installable/installable_logging.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/manifest/manifest.mojom.h"

namespace web_app {

static const int kUnimportantIconSize1 =;
static const int kUnimportantIconSize2 =;

namespace {
apps::FileHandlers CreateFileHandlersFromManifest(
    const std::vector<blink::mojom::ManifestFileHandlerPtr>& file_handler,
    const GURL& app_scope) {}
}  // namespace

class ManifestUpdateCheckUtilsTest : public testing::Test {};

// Below tests primarily test file handler comparison after conversion from
// manifest format. Basic tests like added/removed/unchanged handlers are
// also in functional tests at ManifestUpdateManagerBrowserTestWithFileHandling.
TEST_F(ManifestUpdateCheckUtilsTest, TestFileHandlersUnchanged) {}

TEST_F(ManifestUpdateCheckUtilsTest, TestSecondFileHandlerAdded) {}

TEST_F(ManifestUpdateCheckUtilsTest, TestFileHandlerChangedName) {}

TEST_F(ManifestUpdateCheckUtilsTest, TestFileHandlerChangedAction) {}

TEST_F(ManifestUpdateCheckUtilsTest, TestFileHandlerExtraAccept) {}

TEST_F(ManifestUpdateCheckUtilsTest, TestFileHandlerChangedMimeType) {}

TEST_F(ManifestUpdateCheckUtilsTest, TestFileHandlerChangedExtension) {}

TEST_F(ManifestUpdateCheckUtilsTest, CompareIdentityIconBitmaps) {}

class ManifestUpdateCheckCommandTest : public WebAppTest {};

TEST_F(ManifestUpdateCheckCommandTest, Verify) {}

TEST_F(ManifestUpdateCheckCommandTest, VerifySuccessfulScopeUpdate) {}

TEST_F(ManifestUpdateCheckCommandTest, VerifySuccessfulDisplayModeUpdate) {}

TEST_F(ManifestUpdateCheckCommandTest, MultiDataUpdate) {}

TEST_F(ManifestUpdateCheckCommandTest, NoAppUpdateNeeded) {}

TEST_F(ManifestUpdateCheckCommandTest, AppNotEligibleNoManifest) {}

TEST_F(ManifestUpdateCheckCommandTest, AppIdMismatch) {}

TEST_F(ManifestUpdateCheckCommandTest, AppNameReverted) {}

TEST_F(ManifestUpdateCheckCommandTest, IconReadFromDiskFailed) {}

TEST_F(ManifestUpdateCheckCommandTest, DoNotAcceptAppUpdateDialog) {}

TEST_F(ManifestUpdateCheckCommandTest,
       NavigationToDifferentOriginKillsCommand) {}

TEST_F(ManifestUpdateCheckCommandTest,
       MainFrameNavigationSameOriginAllowsSuccessfulCompletion) {}

}  // namespace web_app