Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ public override async Task InitializeAsync()
await TestServices.Editor.PlaceCaretAsync("</PageTitle>", charsOffset: 1, ControlledHangMitigatingCancellationToken);
await TestServices.Editor.WaitForComponentClassificationAsync(ControlledHangMitigatingCancellationToken, count: 3);

#pragma warning disable CS0618
// Close the file we opened, just in case, so the test can start with a clean slate
await TestServices.Editor.CloseDocumentWindowAsync(ControlledHangMitigatingCancellationToken);
#pragma warning restore CS0618
await TestServices.Editor.CloseCodeFileAsync(RazorProjectConstants.BlazorProjectName, RazorProjectConstants.IndexRazorFile, saveFile: false, ControlledHangMitigatingCancellationToken);
}

private static void EnsureLSPEditorEnabled()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ public async Task CloseCodeFileAsync(string projectName, string relativeFilePath
await CloseFileAsync(projectName, relativeFilePath, VSConstants.LOGVIEWID.Code_guid, saveFile, cancellationToken);
}

[Obsolete($"This method will close ANY window currently in focus, including things like 'Output'. You probably want {nameof(CloseCodeFileAsync)}.")]
public async Task CloseDocumentWindowAsync(CancellationToken cancellationToken)
public async Task CloseCurrentlyFocusedWindowAsync(CancellationToken cancellationToken)
{
await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

Expand Down