@@ -110,4 +110,55 @@ suite('MainThreadDiagnostics', function () {
110
110
assert . strictEqual ( changedData [ 0 ] [ 0 ] [ 1 ] [ 0 ] . message , 'forgein_owner' ) ;
111
111
} ) ;
112
112
} ) ;
113
+
114
+ test . skip ( 'onDidChangeDiagnostics different behavior when "extensionKind" ui running on remote workspace #136955' , function ( ) {
115
+ return runWithFakedTimers ( { } , async ( ) => {
116
+
117
+ const markerData : IMarkerData = {
118
+ code : '666' ,
119
+ startLineNumber : 1 ,
120
+ startColumn : 1 ,
121
+ endLineNumber : 1 ,
122
+ endColumn : 1 ,
123
+ severity : 1 ,
124
+ source : 'me' ,
125
+ message : 'message'
126
+ } ;
127
+ const target = URI . file ( 'a' ) ;
128
+ markerService . changeOne ( 'bar' , target , [ markerData ] ) ;
129
+
130
+ const changedData : [ UriComponents , IMarkerData [ ] ] [ ] [ ] = [ ] ;
131
+
132
+ let diag = new MainThreadDiagnostics (
133
+ new class implements IExtHostContext {
134
+ remoteAuthority = '' ;
135
+ extensionHostKind = ExtensionHostKind . LocalProcess ;
136
+ assertRegistered ( ) { }
137
+ set ( v : any ) : any { return null ; }
138
+ getProxy ( ) : any {
139
+ return {
140
+ $acceptMarkersChange ( data : [ UriComponents , IMarkerData [ ] ] [ ] ) {
141
+ changedData . push ( data ) ;
142
+ }
143
+ } ;
144
+ }
145
+ drain ( ) : any { return null ; }
146
+ } ,
147
+ markerService ,
148
+ new class extends mock < IUriIdentityService > ( ) {
149
+ override asCanonicalUri ( uri : URI ) { return uri ; }
150
+ }
151
+ ) ;
152
+
153
+
154
+ diag . $clear ( 'bar' ) ;
155
+
156
+ // added one marker via the API and one via the ext host. the latter must not
157
+ // trigger an event to the extension host
158
+
159
+ await timeout ( 0 ) ;
160
+ assert . strictEqual ( markerService . read ( ) . length , 1 ) ;
161
+ assert . strictEqual ( changedData . length , 1 ) ;
162
+ } ) ;
163
+ } ) ;
113
164
} ) ;
0 commit comments