Esempio n. 1
0
        public void Build_AddSameOriginAllowPopups_AddsValue()
        {
            var builder = new CrossOriginOpenerPolicyBuilder();

            builder.SameOriginAllowPopups();

            var result = builder.Build();

            result.ConstantValue.Should().Be("same-origin-allow-popups");
        }
Esempio n. 2
0
        public void Build_AddSameOriginAllowPopups_WithReportEndpoint_AddsValue()
        {
            var builder = new CrossOriginOpenerPolicyBuilder();

            builder.SameOriginAllowPopups();
            builder.AddReport().To("default");

            var result = builder.Build();

            result.ConstantValue.Should().Be("same-origin-allow-popups; report-to=\"default\"");
        }