|
4 | 4 |
|
5 | 5 | using System.Threading.Tasks; |
6 | 6 | using Microsoft.CodeAnalysis; |
| 7 | +using Microsoft.CodeAnalysis.Shared.TestHooks; |
7 | 8 | using Microsoft.VisualStudio.Extensibility.Testing; |
8 | 9 | using Microsoft.VisualStudio.IntegrationTest.Utilities; |
| 10 | +using Microsoft.VisualStudio.LanguageServices.Implementation; |
9 | 11 | using Roslyn.Utilities; |
10 | 12 | using Roslyn.VisualStudio.IntegrationTests; |
11 | 13 | using WindowsInput.Native; |
@@ -46,6 +48,7 @@ class Implementation : IBar |
46 | 48 | await TestServices.Input.SendWithoutActivateAsync(VirtualKeyCode.TAB); |
47 | 49 | // Navigate to the destination |
48 | 50 | await TestServices.Input.SendWithoutActivateAsync(VirtualKeyCode.RETURN); |
| 51 | + await TestServices.Workspace.WaitForAllAsyncOperationsAsync(new[] { FeatureAttribute.InheritanceMargin }, HangMitigatingCancellationToken); |
49 | 52 | await TestServices.EditorVerifier.TextContainsAsync(@"class Implementation$$", assertCaretPosition: true); |
50 | 53 | } |
51 | 54 |
|
@@ -79,6 +82,7 @@ class Implementation : IBar |
79 | 82 | await TestServices.Input.SendWithoutActivateAsync(VirtualKeyCode.RETURN); |
80 | 83 | // Navigate to the implemention |
81 | 84 | await TestServices.Input.SendWithoutActivateAsync(VirtualKeyCode.RETURN); |
| 85 | + await TestServices.Workspace.WaitForAllAsyncOperationsAsync(new[] { FeatureAttribute.InheritanceMargin }, HangMitigatingCancellationToken); |
82 | 86 | await TestServices.EditorVerifier.TextContainsAsync(@"public event EventHandler e1$$, e2;", assertCaretPosition: true); |
83 | 87 | } |
84 | 88 |
|
@@ -108,6 +112,7 @@ public IEnumerator GetEnumerator() |
108 | 112 | await TestServices.Input.SendWithoutActivateAsync(VirtualKeyCode.TAB); |
109 | 113 | // Navigate to 'IEnumerable' |
110 | 114 | await TestServices.Input.SendWithoutActivateAsync(VirtualKeyCode.RETURN); |
| 115 | + await TestServices.Workspace.WaitForAllAsyncOperationsAsync(new[] { FeatureAttribute.InheritanceMargin }, HangMitigatingCancellationToken); |
111 | 116 | await TestServices.EditorVerifier.TextContainsAsync(@"public interface IEnumerable$$", assertCaretPosition: true); |
112 | 117 |
|
113 | 118 | var document = await TestServices.Editor.GetActiveDocumentAsync(HangMitigatingCancellationToken); |
@@ -149,6 +154,7 @@ class Implementation : IBar |
149 | 154 | await TestServices.Input.SendWithoutActivateAsync(VirtualKeyCode.TAB); |
150 | 155 | // Navigate to 'IBar' |
151 | 156 | await TestServices.Input.SendWithoutActivateAsync(VirtualKeyCode.RETURN); |
| 157 | + await TestServices.Workspace.WaitForAllAsyncOperationsAsync(new[] { FeatureAttribute.InheritanceMargin }, HangMitigatingCancellationToken); |
152 | 158 | await TestServices.EditorVerifier.TextContainsAsync(@"Public Interface IBar$$", assertCaretPosition: true); |
153 | 159 |
|
154 | 160 | var document = await TestServices.Editor.GetActiveDocumentAsync(HangMitigatingCancellationToken); |
|
0 commit comments