chromium/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_info_unittest.cc

// Copyright 2022 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/isolated_web_apps/isolated_web_app_url_info.h"

#include <utility>

#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/test/gmock_expected_support.h"
#include "base/test/test_future.h"
#include "base/types/expected.h"
#include "chrome/browser/ui/web_applications/test/isolated_web_app_test_utils.h"
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_source.h"
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_storage_location.h"
#include "chrome/browser/web_applications/isolated_web_apps/test/test_signed_web_bundle_builder.h"
#include "chrome/test/base/testing_profile.h"
#include "components/web_package/signed_web_bundles/signed_web_bundle_id.h"
#include "content/public/browser/storage_partition_config.h"
#include "content/public/test/browser_task_environment.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

namespace web_app {

namespace {
ErrorIs;
HasValue;
ValueIs;
Eq;
HasSubstr;
IsFalse;
IsTrue;
Property;
StartsWith;
Values;

constexpr char kValidIsolatedWebAppUrl[] =;
}  // namespace

IsolatedWebAppUrlInfoTest;

TEST_F(IsolatedWebAppUrlInfoTest, CreateSucceedsWithValidUrl) {}

TEST_F(IsolatedWebAppUrlInfoTest, CreateFailsWithInvalidScheme) {}

TEST_F(IsolatedWebAppUrlInfoTest, CreateFailsWithInvalidUrl) {}

TEST_F(IsolatedWebAppUrlInfoTest, CreateFailsWithSubdomain) {}

TEST_F(IsolatedWebAppUrlInfoTest, CreateFailsWithBadHostname) {}

TEST_F(IsolatedWebAppUrlInfoTest, OriginIsCorrect) {}

TEST_F(IsolatedWebAppUrlInfoTest, AppIdIsHashedOrigin) {}

TEST_F(IsolatedWebAppUrlInfoTest, WebBundleIdIsCorrect) {}

TEST_F(IsolatedWebAppUrlInfoTest, GetStoragePartitionConfigForControlledFrame) {}

TEST_F(IsolatedWebAppUrlInfoTest, StoragePartitionConfigUsesOrigin) {}

class IsolatedWebAppUrlInfoFromIsolatedWebAppLocationTest
    : public ::testing::Test {};

TEST_F(IsolatedWebAppUrlInfoFromIsolatedWebAppLocationTest,
       GetIsolatedWebAppUrlInfoWhenBundleSucceeds) {}

TEST_F(IsolatedWebAppUrlInfoFromIsolatedWebAppLocationTest,
       GetIsolatedWebAppUrlInfoWhenBundleFailsWhenFileNotExist) {}

TEST_F(IsolatedWebAppUrlInfoFromIsolatedWebAppLocationTest,
       GetIsolatedWebAppUrlInfoWhenBundleFailsWhenInvalidFile) {}

TEST_F(IsolatedWebAppUrlInfoFromIsolatedWebAppLocationTest,
       GetIsolatedWebAppUrlInfoSucceedsWhenProxy) {}

class IsolatedWebAppGURLConversionTest
    : public ::testing::TestWithParam<std::pair<std::string, std::string>> {};

TEST_P(IsolatedWebAppGURLConversionTest, RemovesInvalidPartsFromUrls) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace web_app