#include <optional>
#include <string>
#include <string_view>
#include "base/command_line.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/test/base/chrome_test_utils.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/url_loader_interceptor.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features_generated.h"
#include "url/gurl.h"
namespace {
constexpr std::string_view kOriginTrialToken = …;
enum class BaseFeatureStatus { … };
enum class BlinkFeatureStatus { … };
std::string BaseFeatureStatusToString(const BaseFeatureStatus& type) { … }
std::string BlinkFeatureStatusToString(const BlinkFeatureStatus& type) { … }
std::string FeaturesStatusesToString(
const testing::TestParamInfo<
testing::tuple<BaseFeatureStatus, BlinkFeatureStatus>>& info) { … }
}
class PermissionElementOriginTrialBrowserTest
: public InProcessBrowserTest,
public testing::WithParamInterface<
testing::tuple<BaseFeatureStatus, BlinkFeatureStatus>> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(PermissionElementOriginTrialBrowserTest,
WithoutOriginTrialToken) { … }
IN_PROC_BROWSER_TEST_P(PermissionElementOriginTrialBrowserTest,
WithOriginTrialToken) { … }