diff --git a/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/AbstractRazorEditorTest.cs b/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/AbstractRazorEditorTest.cs index 1b78b976d78..c46d7edc994 100644 --- a/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/AbstractRazorEditorTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/AbstractRazorEditorTest.cs @@ -52,10 +52,8 @@ public override async Task InitializeAsync() await TestServices.Editor.PlaceCaretAsync("", 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() diff --git a/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/InProcess/EditorInProcess_Commands.cs b/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/InProcess/EditorInProcess_Commands.cs index bd3e1730118..c004a664cfe 100644 --- a/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/InProcess/EditorInProcess_Commands.cs +++ b/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/InProcess/EditorInProcess_Commands.cs @@ -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);