Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update tests
  • Loading branch information
MackinnonBuck committed Jan 4, 2024
commit 0cb83c5d032f1d13c6763842bf23bbafa33a2f76
2 changes: 1 addition & 1 deletion src/Components/Web.JS/dist/Release/blazor.web.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ export class WebRootComponentManager implements DescriptorHandler, RootComponent
setTimeout(() => {
this._isComponentRefreshPending = false;
this.refreshRootComponents(this._rootComponentsBySsrComponentId.values());
this.circuitMayHaveNoRootComponents();
}, 0);
}

Expand Down Expand Up @@ -299,6 +298,8 @@ export class WebRootComponentManager implements DescriptorHandler, RootComponent
this.updateWebAssemblyRootComponents(batchJson);
}
}

this.circuitMayHaveNoRootComponents();
}

private updateWebAssemblyRootComponents(operationsJson: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,6 @@ public void AutoRenderMode_UsesBlazorServerOnFirstLoad_ThenWebAssemblyOnSuccessi
Navigate(ServerPathBase);
Browser.Equal("Hello", () => Browser.Exists(By.TagName("h1")).Text);
BlockWebAssemblyResourceLoad();
UseLongWebAssemblyLoadTimeout();
ForceWebAssemblyResourceCacheMiss();

Navigate($"{ServerPathBase}/streaming-interactivity");
Expand Down Expand Up @@ -697,7 +696,6 @@ public void AutoRenderMode_UsesBlazorServer_IfBootResourceHashChanges()
Navigate(ServerPathBase);
Browser.Equal("Hello", () => Browser.Exists(By.TagName("h1")).Text);
BlockWebAssemblyResourceLoad();
UseLongWebAssemblyLoadTimeout();
ForceWebAssemblyResourceCacheMiss();

Navigate($"{ServerPathBase}/streaming-interactivity");
Expand All @@ -715,14 +713,11 @@ public void AutoRenderMode_UsesBlazorServer_IfBootResourceHashChanges()
Browser.Click(By.Id($"remove-counter-link-1"));
Browser.DoesNotExist(By.Id("is-interactive-1"));

UseLongWebAssemblyLoadTimeout();
Browser.Navigate().Refresh();

Browser.Equal("True", () => Browser.FindElement(By.Id("is-interactive-0")).Text);
Browser.Equal("WebAssembly", () => Browser.FindElement(By.Id("render-mode-0")).Text);

BlockWebAssemblyResourceLoad();
UseLongWebAssemblyLoadTimeout();
ForceWebAssemblyResourceCacheMiss("dummy hash");
Browser.Navigate().Refresh();

Expand Down Expand Up @@ -766,7 +761,6 @@ public void AutoRenderMode_CanUseBlazorServer_WhenMultipleAutoComponentsAreAdded
Navigate(ServerPathBase);
Browser.Equal("Hello", () => Browser.Exists(By.TagName("h1")).Text);
BlockWebAssemblyResourceLoad();
UseLongWebAssemblyLoadTimeout();
ForceWebAssemblyResourceCacheMiss();

Navigate($"{ServerPathBase}/streaming-interactivity");
Expand Down Expand Up @@ -1146,11 +1140,6 @@ private void UnblockWebAssemblyResourceLoad()
((IJavaScriptExecutor)Browser).ExecuteScript("window.unblockLoadBootResource()");
}

private void UseLongWebAssemblyLoadTimeout()
{
((IJavaScriptExecutor)Browser).ExecuteScript("sessionStorage.setItem('use-long-auto-timeout', 'true')");
}

private void ForceWebAssemblyResourceCacheMiss(string resourceHash = null)
{
if (resourceHash is not null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
const enableClassicInitializers = sessionStorage.getItem('enable-classic-initializers') === 'true';
const suppressEnhancedNavigation = sessionStorage.getItem('suppress-enhanced-navigation') === 'true';
const blockLoadBootResource = sessionStorage.getItem('block-load-boot-resource') === 'true';
const useLongWebAssemblyTimeout = sessionStorage.getItem('use-long-auto-timeout') === 'true';
sessionStorage.removeItem('suppress-enhanced-navigation');
sessionStorage.removeItem('block-load-boot-resource');
sessionStorage.removeItem('use-long-auto-timeout');
sessionStorage.removeItem('enable-classic-initializers');

let loadBootResourceUnblocked = null;
Expand Down Expand Up @@ -64,10 +62,6 @@
}
},
},
}).then(() => {
if (useLongWebAssemblyTimeout) {
Blazor._internal.loadWebAssemblyQuicklyTimeout = 10000000;
}
}).then(() => {
const startedParagraph = document.createElement('p');
startedParagraph.id = 'blazor-started';
Expand Down