#include "chrome/browser/web_applications/os_integration/file_handling_sub_manager.h"
#include <memory>
#include <utility>
#include <vector>
#include "base/files/file_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/test/test_future.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/web_applications/os_integration/os_integration_manager.h"
#include "chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h"
#include "chrome/browser/web_applications/proto/web_app_os_integration_state.pb.h"
#include "chrome/browser/web_applications/test/fake_web_app_provider.h"
#include "chrome/browser/web_applications/test/os_integration_test_override_impl.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/test/web_app_test_utils.h"
#include "chrome/browser/web_applications/web_app_command_scheduler.h"
#include "chrome/browser/web_applications/web_app_install_info.h"
#include "chrome/browser/web_applications/web_app_install_params.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/browser/web_applications/web_app_registrar.h"
#include "chrome/common/chrome_features.h"
#include "components/webapps/browser/install_result_code.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace web_app {
namespace {
class FileHandlingSubManagerConfigureTest : public WebAppTest { … };
TEST_F(FileHandlingSubManagerConfigureTest, InstallWithFilehandlers) { … }
TEST_F(FileHandlingSubManagerConfigureTest, UpdateUserChoiceDisallowed) { … }
TEST_F(FileHandlingSubManagerConfigureTest, Uninstall) { … }
class FileHandlingSubManagerConfigureAndExecuteTest
: public FileHandlingSubManagerConfigureTest { … };
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest, InstallWithFilehandlers) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest,
UpdateUserChoiceDisallowed) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest, Uninstall) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest,
ForceUnregisterAppInRegistry) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest,
ForceUnregisterAppNotInRegistry) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest, NoHandlersRegistered) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest, NoLaunchFilesPassed) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest,
SingleValidExtensionSingleExtensionHandler) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest,
ExtensionCaseInsensitive) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest,
SingleInvalidExtensionSingleExtensionHandler) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest,
SingleValidExtensionMultiExtensionHandler) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest, MultipleValidExtensions) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest, PartialExtensionMatch) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest,
SingleFileWithoutExtension) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest,
FileWithoutExtensionAmongMultipleFiles) { … }
TEST_F(FileHandlingSubManagerConfigureAndExecuteTest, MultiLaunch) { … }
}
}