Example #1
0
        static void Main(string[] args)
        {
            // Needed because the test server runs on a different port than the client app,
            // and we want to test sending/receiving cookies undering this config
            BrowserHttpMessageHandler.DefaultCredentials = FetchCredentialsOption.Include;

            // Signal to tests that we're ready
            GC.KeepAlive(ActivateMonoJSRuntime.EnsureActivated());
            JSRuntime.Current.InvokeAsync <object>("testReady");
        }
Example #2
0
        public void Configure(IBlazorApplicationBuilder app)
        {
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY")))
            {
                // Needed because the test server runs on a different port than the client app,
                // and we want to test sending/receiving cookies underling this config
                BrowserHttpMessageHandler.DefaultCredentials = FetchCredentialsOption.Include;

                GC.KeepAlive(ActivateMonoJSRuntime.EnsureActivated());
            }

            app.AddComponent <Index>("root");
        }