Beispiel #1
0
        public void AllowScripts_SetsAllowScriptsToTrue()
        {
            var builder = new CspSandboxBuilder();

            builder.AllowScripts();
            CspSandboxOptions options = builder.BuildOptions();

            Assert.True(options.AllowScripts);
        }
Beispiel #2
0
        public void AllowSameOrigin_SetsAllowSameOriginToTrue()
        {
            var builder = new CspSandboxBuilder();

            builder.AllowSameOrigin();
            CspSandboxOptions options = builder.BuildOptions();

            Assert.True(options.AllowSameOrigin);
        }
Beispiel #3
0
        public void AllowPopupsToEscapeSandbox_SetsAllowPopupsToEscapeSandboxToTrue()
        {
            var builder = new CspSandboxBuilder();

            builder.AllowPopupsToEscapeSandbox();
            CspSandboxOptions options = builder.BuildOptions();

            Assert.True(options.AllowPopupsToEscapeSandbox);
        }
Beispiel #4
0
        public void AllowPresentation_SetsAllowPresentationToTrue()
        {
            var builder = new CspSandboxBuilder();

            builder.AllowPresentation();
            CspSandboxOptions options = builder.BuildOptions();

            Assert.True(options.AllowPresentation);
        }
Beispiel #5
0
        public void AllowPointerLock_SetsAllowPointerLockToTrue()
        {
            var builder = new CspSandboxBuilder();

            builder.AllowPointerLock();
            CspSandboxOptions options = builder.BuildOptions();

            Assert.True(options.AllowPointerLock);
        }