@@ -48,7 +48,7 @@ suite('ExtHostWebview', () => {
4848 assert . strictEqual ( lastInvokedDeserializer , serializerB ) ;
4949 } ) ;
5050
51- test ( 'toWebviewResource for desktop vscode-resource scheme' , ( ) => {
51+ test ( 'asWebviewUri for desktop vscode-resource scheme' , ( ) => {
5252 const shape = createNoopMainThreadWebviews ( ) ;
5353 const extHostWebviews = new ExtHostWebviews ( SingleProxyRPCProtocol ( shape ) , {
5454 webviewCspSource : '' ,
@@ -57,37 +57,37 @@ suite('ExtHostWebview', () => {
5757 const webview = extHostWebviews . createWebviewPanel ( { } as any , 'type' , 'title' , 1 , { } ) ;
5858
5959 assert . strictEqual (
60- webview . webview . toWebviewResource ( URI . parse ( 'file:///Users/codey/file.html' ) ) . toString ( ) ,
60+ webview . webview . asWebviewUri ( URI . parse ( 'file:///Users/codey/file.html' ) ) . toString ( ) ,
6161 'vscode-resource:/Users/codey/file.html' ,
6262 'Unix basic'
6363 ) ;
6464
6565 assert . strictEqual (
66- webview . webview . toWebviewResource ( URI . parse ( 'file:///Users/codey/file.html#frag' ) ) . toString ( ) ,
66+ webview . webview . asWebviewUri ( URI . parse ( 'file:///Users/codey/file.html#frag' ) ) . toString ( ) ,
6767 'vscode-resource:/Users/codey/file.html#frag' ,
6868 'Unix should preserve fragment'
6969 ) ;
7070
7171 assert . strictEqual (
72- webview . webview . toWebviewResource ( URI . parse ( 'file:///Users/codey/f%20ile.html' ) ) . toString ( ) ,
72+ webview . webview . asWebviewUri ( URI . parse ( 'file:///Users/codey/f%20ile.html' ) ) . toString ( ) ,
7373 'vscode-resource:/Users/codey/f%20ile.html' ,
7474 'Unix with encoding'
7575 ) ;
7676
7777 assert . strictEqual (
78- webview . webview . toWebviewResource ( URI . parse ( 'file://localhost/Users/codey/file.html' ) ) . toString ( ) ,
78+ webview . webview . asWebviewUri ( URI . parse ( 'file://localhost/Users/codey/file.html' ) ) . toString ( ) ,
7979 'vscode-resource://localhost/Users/codey/file.html' ,
8080 'Unix should preserve authority'
8181 ) ;
8282
8383 assert . strictEqual (
84- webview . webview . toWebviewResource ( URI . parse ( 'file:///c:/codey/file.txt' ) ) . toString ( ) ,
84+ webview . webview . asWebviewUri ( URI . parse ( 'file:///c:/codey/file.txt' ) ) . toString ( ) ,
8585 'vscode-resource:/c%3A/codey/file.txt' ,
8686 'Windows C drive'
8787 ) ;
8888 } ) ;
8989
90- test ( 'toWebviewResource for web endpoint' , ( ) => {
90+ test ( 'asWebviewUri for web endpoint' , ( ) => {
9191 const shape = createNoopMainThreadWebviews ( ) ;
9292
9393 const extHostWebviews = new ExtHostWebviews ( SingleProxyRPCProtocol ( shape ) , {
@@ -101,31 +101,31 @@ suite('ExtHostWebview', () => {
101101 }
102102
103103 assert . strictEqual (
104- stripEndpointUuid ( webview . webview . toWebviewResource ( URI . parse ( 'file:///Users/codey/file.html' ) ) . toString ( ) ) ,
104+ stripEndpointUuid ( webview . webview . asWebviewUri ( URI . parse ( 'file:///Users/codey/file.html' ) ) . toString ( ) ) ,
105105 'webview.contoso.com/commit///Users/codey/file.html' ,
106106 'Unix basic'
107107 ) ;
108108
109109 assert . strictEqual (
110- stripEndpointUuid ( webview . webview . toWebviewResource ( URI . parse ( 'file:///Users/codey/file.html#frag' ) ) . toString ( ) ) ,
110+ stripEndpointUuid ( webview . webview . asWebviewUri ( URI . parse ( 'file:///Users/codey/file.html#frag' ) ) . toString ( ) ) ,
111111 'webview.contoso.com/commit///Users/codey/file.html#frag' ,
112112 'Unix should preserve fragment'
113113 ) ;
114114
115115 assert . strictEqual (
116- stripEndpointUuid ( webview . webview . toWebviewResource ( URI . parse ( 'file:///Users/codey/f%20ile.html' ) ) . toString ( ) ) ,
116+ stripEndpointUuid ( webview . webview . asWebviewUri ( URI . parse ( 'file:///Users/codey/f%20ile.html' ) ) . toString ( ) ) ,
117117 'webview.contoso.com/commit///Users/codey/f%20ile.html' ,
118118 'Unix with encoding'
119119 ) ;
120120
121121 assert . strictEqual (
122- stripEndpointUuid ( webview . webview . toWebviewResource ( URI . parse ( 'file://localhost/Users/codey/file.html' ) ) . toString ( ) ) ,
122+ stripEndpointUuid ( webview . webview . asWebviewUri ( URI . parse ( 'file://localhost/Users/codey/file.html' ) ) . toString ( ) ) ,
123123 'webview.contoso.com/commit//localhost/Users/codey/file.html' ,
124124 'Unix should preserve authority'
125125 ) ;
126126
127127 assert . strictEqual (
128- stripEndpointUuid ( webview . webview . toWebviewResource ( URI . parse ( 'file:///c:/codey/file.txt' ) ) . toString ( ) ) ,
128+ stripEndpointUuid ( webview . webview . asWebviewUri ( URI . parse ( 'file:///c:/codey/file.txt' ) ) . toString ( ) ) ,
129129 'webview.contoso.com/commit///c%3A/codey/file.txt' ,
130130 'Windows C drive'
131131 ) ;
0 commit comments