@@ -48,7 +48,7 @@ suite('ExtHostWebview', () => {
48
48
assert . strictEqual ( lastInvokedDeserializer , serializerB ) ;
49
49
} ) ;
50
50
51
- test ( 'toWebviewResource for desktop vscode-resource scheme' , ( ) => {
51
+ test ( 'asWebviewUri for desktop vscode-resource scheme' , ( ) => {
52
52
const shape = createNoopMainThreadWebviews ( ) ;
53
53
const extHostWebviews = new ExtHostWebviews ( SingleProxyRPCProtocol ( shape ) , {
54
54
webviewCspSource : '' ,
@@ -57,37 +57,37 @@ suite('ExtHostWebview', () => {
57
57
const webview = extHostWebviews . createWebviewPanel ( { } as any , 'type' , 'title' , 1 , { } ) ;
58
58
59
59
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 ( ) ,
61
61
'vscode-resource:/Users/codey/file.html' ,
62
62
'Unix basic'
63
63
) ;
64
64
65
65
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 ( ) ,
67
67
'vscode-resource:/Users/codey/file.html#frag' ,
68
68
'Unix should preserve fragment'
69
69
) ;
70
70
71
71
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 ( ) ,
73
73
'vscode-resource:/Users/codey/f%20ile.html' ,
74
74
'Unix with encoding'
75
75
) ;
76
76
77
77
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 ( ) ,
79
79
'vscode-resource://localhost/Users/codey/file.html' ,
80
80
'Unix should preserve authority'
81
81
) ;
82
82
83
83
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 ( ) ,
85
85
'vscode-resource:/c%3A/codey/file.txt' ,
86
86
'Windows C drive'
87
87
) ;
88
88
} ) ;
89
89
90
- test ( 'toWebviewResource for web endpoint' , ( ) => {
90
+ test ( 'asWebviewUri for web endpoint' , ( ) => {
91
91
const shape = createNoopMainThreadWebviews ( ) ;
92
92
93
93
const extHostWebviews = new ExtHostWebviews ( SingleProxyRPCProtocol ( shape ) , {
@@ -101,31 +101,31 @@ suite('ExtHostWebview', () => {
101
101
}
102
102
103
103
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 ( ) ) ,
105
105
'webview.contoso.com/commit///Users/codey/file.html' ,
106
106
'Unix basic'
107
107
) ;
108
108
109
109
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 ( ) ) ,
111
111
'webview.contoso.com/commit///Users/codey/file.html#frag' ,
112
112
'Unix should preserve fragment'
113
113
) ;
114
114
115
115
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 ( ) ) ,
117
117
'webview.contoso.com/commit///Users/codey/f%20ile.html' ,
118
118
'Unix with encoding'
119
119
) ;
120
120
121
121
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 ( ) ) ,
123
123
'webview.contoso.com/commit//localhost/Users/codey/file.html' ,
124
124
'Unix should preserve authority'
125
125
) ;
126
126
127
127
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 ( ) ) ,
129
129
'webview.contoso.com/commit///c%3A/codey/file.txt' ,
130
130
'Windows C drive'
131
131
) ;
0 commit comments