Repository: dotnet/runtime
File: src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs (C#)

Code before:
            {
                // Sending TrustedIssuers is conditioned on the registry. Win7 sends trusted issuer list by default,
                // newer Windows versions don't.
                object val = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL", "SendTrustedIssuerList", IsWindows7 ? 1 : 0);
                if (val is int i)
                {
                    return i == 1;
                }
            }

            return false;
        }

        private static bool GetIsRunningOnMonoInterpreter()
        {
#if NET
            return IsMonoRuntime && RuntimeFeature.IsDynamicCodeSupported && !RuntimeFeature.IsDynamicCodeCompiled;
#else
            return false;
#endif
        }

        private static string GetEnvironmentVariableValue(string name, string defaultValue = "0") =>
        Environment.GetEnvironmentVariable("DOTNET_" + name) ?? Environment.GetEnvironmentVariable("COMPlus_" + name) ?? defaultValue;

        private static bool GetIsRunningOnCoreClrInterpreter()
        {
            if (IsCoreCLR)
            {
                if (!string.IsNullOrWhiteSpace(GetEnvironmentVariableValue("Interpreter", "")))
                    return true;
                if (int.TryParse(GetEnvironmentVariableValue("InterpMode", "0"), out int mode) && (mode > 0))
                    return true;
            }

            return false;
        }

        private static bool IsEnvironmentVariableTrue(string variableName)
        {
            if (!IsBrowser)
                return false;

            return Environment.GetEnvironmentVariable(variableName) is "true";
        }

        private static string GetNodeJSPlatform()
        {
            if (!IsNodeJS)
                return null;


Review comment (suggestion):
Should it be in sync with https://github.com/dotnet/runtime/blob/4317fa71537d91322177c42301fb442fb7bdee1c/src/tests/Common/CoreCLRTestLibrary/Utilities.cs#L102-L112 ? 

Also, I do not think we need to check for the legacy COMPlus_ prefix.

Code after:
            {
                // Sending TrustedIssuers is conditioned on the registry. Win7 sends trusted issuer list by default,
                // newer Windows versions don't.
                object val = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL", "SendTrustedIssuerList", IsWindows7 ? 1 : 0);
                if (val is int i)
                {
                    return i == 1;
                }
            }

            return false;
        }

        private static bool GetIsRunningOnMonoInterpreter()
        {
#if NET
            return IsMonoRuntime && RuntimeFeature.IsDynamicCodeSupported && !RuntimeFeature.IsDynamicCodeCompiled;
#else
            return false;
#endif
        }

        private static string GetEnvironmentVariableValue(string name, string defaultValue = "0") =>
            Environment.GetEnvironmentVariable("DOTNET_" + name) ?? Environment.GetEnvironmentVariable("COMPlus_" + name) ?? defaultValue;

        private static bool GetIsRunningOnCoreClrInterpreter()
        {
            if (IsCoreCLR)
            {
#if NET
                if (RuntimeFeature.IsDynamicCodeSupported && !RuntimeFeature.IsDynamicCodeCompiled)
                    return true;
#endif
                if (!string.IsNullOrWhiteSpace(GetEnvironmentVariableValue("Interpreter", "")))
                    return true;
                if (int.TryParse(GetEnvironmentVariableValue("InterpMode", "0"), out int mode) && (mode > 0))
                    return true;
            }

            return false;
        }

        private static bool IsEnvironmentVariableTrue(string variableName)
        {
            if (!IsBrowser)
                return false;

            return Environment.GetEnvironmentVariable(variableName) is "true";
        }

        private static string GetNodeJSPlatform()