From ed5d166bc3607ca02f4ee59b2e6bef3cc5af74da Mon Sep 17 00:00:00 2001 From: David Wengier Date: Thu, 2 Mar 2023 08:37:37 +1100 Subject: [PATCH] Remove obsolete attribute and fix test --- .../AbstractRazorEditorTest.cs | 2 +- .../InProcess/EditorInProcess_Commands.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/AbstractRazorEditorTest.cs b/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/AbstractRazorEditorTest.cs index 49f0e3233bd..c46d7edc994 100644 --- a/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/AbstractRazorEditorTest.cs +++ b/src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/AbstractRazorEditorTest.cs @@ -53,7 +53,7 @@ public override async Task InitializeAsync() await TestServices.Editor.WaitForComponentClassificationAsync(ControlledHangMitigatingCancellationToken, count: 3); // Close the file we opened, just in case, so the test can start with a clean slate - await TestServices.Editor.CloseDocumentWindowAsync(ControlledHangMitigatingCancellationToken); + 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);