Skip to content

Commit 51565b8

Browse files
committed
Tweak all test assets to use dotnet.boot.js
1 parent 79d1236 commit 51565b8

File tree

10 files changed

+16
-3
lines changed

10 files changed

+16
-3
lines changed

src/Components/test/testassets/BasicTestApp/wwwroot/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
return Blazor.runtime.runtimeBuildInfo.buildConfiguration;
5454
}
5555
</script>
56+
<script>window["__DOTNET_INTERNAL_BOOT_CONFIG_SRC"] = "dotnet.boot.js";</script>
5657
<script src="_framework/blazor.webassembly.js" autostart="false"></script>
5758

5859
<script>

src/Components/test/testassets/Components.TestServer/Pages/Client/MultipleComponentsLayout.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
<button id="load-boot-script" onclick="start()">Load boot script</button>
3535

36+
<script>window["__DOTNET_INTERNAL_BOOT_CONFIG_SRC"] = "dotnet.boot.js";</script>
3637
<script src="_framework/blazor.webassembly.js" autostart="false"></script>
3738
<script src="js/jsRootComponentInitializers.js"></script>
3839
<script>

src/Components/test/testassets/Components.TestServer/Pages/SaveState.cshtml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<component render-mode="ServerPrerendered" type="typeof(PreserveStateComponent)" param-State="@state1"></component>
4141
@* State can change after a component has rendered, when this happens the output will not be updated during prerendering
4242
and will have to wait until the app restarts in interactive mode.
43-
*@
43+
*@
4444
PreserveService.NewState();
4545
<component render-mode="ServerPrerendered" type="typeof(PreserveStateComponent)" param-State="@state2"></component>
4646
break;
@@ -57,7 +57,7 @@
5757

5858
@* This is just to show that the state of a service can still change after the component has rendered and it's the component
5959
responsibility to deal with updates after the initial render
60-
*@
60+
*@
6161
<p>
6262
Service state after components have rendered: <span id="service-state">@PreserveService.Guid</span>
6363
</p>
@@ -66,7 +66,7 @@
6666

6767
PreserveService.NewState();
6868

69-
@* This is just to show that this state will be lost and not restored since the state was persisted before *@
69+
@* This is just to show that this state will be lost and not restored since the state was persisted before *@
7070
<p>
7171
Service state after state has been persisted: <span id="service-state-after">@PreserveService.Guid</span>
7272
</p>
@@ -128,6 +128,7 @@
128128
}
129129
else
130130
{
131+
<script>window["__DOTNET_INTERNAL_BOOT_CONFIG_SRC"] = "dotnet.boot.js";</script>
131132
<script src="_framework/blazor.webassembly.js" autostart="false"></script>
132133
}
133134

src/Components/test/testassets/Components.TestServer/RazorComponents/App.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
elementToFocus.focus();
2424
}
2525
</script>
26+
<script>window["__DOTNET_INTERNAL_BOOT_CONFIG_SRC"] = "dotnet.boot.js";</script>
2627
<script src="@Assets["_framework/blazor.web.js"]" autostart="false" suppress-error="BL9992"></script>
2728
<script src="_content/TestContentPackage/counterInterop.js"></script>
2829
<script src="js/circuitContextTest.js"></script>

src/Components/test/testassets/Components.TestServer/RazorComponents/GlobalInteractivityApp.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
</head>
88
<body>
99
<Components.WasmMinimal.Routes @rendermode="@PageRenderMode" />
10+
<script>window["__DOTNET_INTERNAL_BOOT_CONFIG_SRC"] = "dotnet.boot.js";</script>
1011
<script src="@Assets["_framework/blazor.web.js"]" autostart="false"></script>
1112
<script>
1213
Blazor.start({

src/Components/test/testassets/Components.TestServer/RazorComponents/NamedFormContextNoFormContextApp.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<body>
1111
<h1 id="ready">Form test cases</h1>
1212
<NamedFormContextNoFormContextLayout />
13+
<script>window["__DOTNET_INTERNAL_BOOT_CONFIG_SRC"] = "dotnet.boot.js";</script>
1314
<script src="@Assets["_framework/blazor.web.js"]" suppress-error="BL9992"></script>
1415
</body>
1516
</html>

src/Components/test/testassets/Components.TestServer/RazorComponents/RemoteAuthenticationApp.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
<body>
1212
<Components.WasmRemoteAuthentication.Routes @rendermode="new InteractiveWebAssemblyRenderMode(prerender: false)" />
13+
<script>window["__DOTNET_INTERNAL_BOOT_CONFIG_SRC"] = "dotnet.boot.js";</script>
1314
<script src="@Assets["_framework/blazor.web.js"]" autostart="false"></script>
1415
<script src="_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js"></script>
1516
<script>

src/Components/test/testassets/Components.TestServer/RazorComponents/Root.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<body>
1212
<ServerApp @rendermode="@RenderMode.InteractiveServer" />
1313

14+
<script>window["__DOTNET_INTERNAL_BOOT_CONFIG_SRC"] = "dotnet.boot.js";</script>
1415
<script src="@Assets["_framework/blazor.web.js"]" autostart="false"></script>
1516
<script>
1617
const suppressEnhancedNavigation = sessionStorage.getItem('suppress-enhanced-navigation') === 'true';

src/Components/test/testassets/Directory.Build.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@
1919
<_Parameter2>true</_Parameter2>
2020
</AssemblyAttribute>
2121
</ItemGroup>
22+
23+
<PropertyGroup>
24+
<WasmBootConfigFileName>dotnet.boot.js</WasmBootConfigFileName>
25+
</PropertyGroup>
2226
</Project>

src/Components/test/testassets/GlobalizationWasmApp/wwwroot/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<body>
88
<div id="blazor-error-ui">Error</div>
99
<app>Loading...</app>
10+
<script>window["__DOTNET_INTERNAL_BOOT_CONFIG_SRC"] = "dotnet.boot.js";</script>
1011
<script src="_framework/blazor.webassembly.js" autostart="false"></script>
1112
<script>
1213
(function(){

0 commit comments

Comments
 (0)