mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode e0762af258c0b20320ed03f3871a41967acc4421 (#7404)
* Merge from vscode e0762af258c0b20320ed03f3871a41967acc4421 * readd svgs
This commit is contained in:
@@ -52,37 +52,37 @@ suite('ExtHostWebview', () => {
|
||||
const shape = createNoopMainThreadWebviews();
|
||||
const extHostWebviews = new ExtHostWebviews(SingleProxyRPCProtocol(shape), {
|
||||
webviewCspSource: '',
|
||||
webviewResourceRoot: 'vscode-resource:{{resource}}'
|
||||
webviewResourceRoot: 'vscode-resource://{{resource}}'
|
||||
});
|
||||
const webview = extHostWebviews.createWebviewPanel({} as any, 'type', 'title', 1, {});
|
||||
|
||||
assert.strictEqual(
|
||||
webview.webview.asWebviewUri(URI.parse('file:///Users/codey/file.html')).toString(),
|
||||
'vscode-resource:/Users/codey/file.html',
|
||||
'vscode-resource://file///Users/codey/file.html',
|
||||
'Unix basic'
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
webview.webview.asWebviewUri(URI.parse('file:///Users/codey/file.html#frag')).toString(),
|
||||
'vscode-resource:/Users/codey/file.html#frag',
|
||||
'vscode-resource://file///Users/codey/file.html#frag',
|
||||
'Unix should preserve fragment'
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
webview.webview.asWebviewUri(URI.parse('file:///Users/codey/f%20ile.html')).toString(),
|
||||
'vscode-resource:/Users/codey/f%20ile.html',
|
||||
'vscode-resource://file///Users/codey/f%20ile.html',
|
||||
'Unix with encoding'
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
webview.webview.asWebviewUri(URI.parse('file://localhost/Users/codey/file.html')).toString(),
|
||||
'vscode-resource://localhost/Users/codey/file.html',
|
||||
'vscode-resource://file//localhost/Users/codey/file.html',
|
||||
'Unix should preserve authority'
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
webview.webview.asWebviewUri(URI.parse('file:///c:/codey/file.txt')).toString(),
|
||||
'vscode-resource:/c%3A/codey/file.txt',
|
||||
'vscode-resource://file///c%3A/codey/file.txt',
|
||||
'Windows C drive'
|
||||
);
|
||||
});
|
||||
@@ -92,7 +92,7 @@ suite('ExtHostWebview', () => {
|
||||
|
||||
const extHostWebviews = new ExtHostWebviews(SingleProxyRPCProtocol(shape), {
|
||||
webviewCspSource: '',
|
||||
webviewResourceRoot: `https://{{uuid}}.webview.contoso.com/commit{{resource}}`
|
||||
webviewResourceRoot: `https://{{uuid}}.webview.contoso.com/commit/{{resource}}`
|
||||
});
|
||||
const webview = extHostWebviews.createWebviewPanel({} as any, 'type', 'title', 1, {});
|
||||
|
||||
@@ -102,31 +102,31 @@ suite('ExtHostWebview', () => {
|
||||
|
||||
assert.strictEqual(
|
||||
stripEndpointUuid(webview.webview.asWebviewUri(URI.parse('file:///Users/codey/file.html')).toString()),
|
||||
'webview.contoso.com/commit///Users/codey/file.html',
|
||||
'webview.contoso.com/commit/file///Users/codey/file.html',
|
||||
'Unix basic'
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
stripEndpointUuid(webview.webview.asWebviewUri(URI.parse('file:///Users/codey/file.html#frag')).toString()),
|
||||
'webview.contoso.com/commit///Users/codey/file.html#frag',
|
||||
'webview.contoso.com/commit/file///Users/codey/file.html#frag',
|
||||
'Unix should preserve fragment'
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
stripEndpointUuid(webview.webview.asWebviewUri(URI.parse('file:///Users/codey/f%20ile.html')).toString()),
|
||||
'webview.contoso.com/commit///Users/codey/f%20ile.html',
|
||||
'webview.contoso.com/commit/file///Users/codey/f%20ile.html',
|
||||
'Unix with encoding'
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
stripEndpointUuid(webview.webview.asWebviewUri(URI.parse('file://localhost/Users/codey/file.html')).toString()),
|
||||
'webview.contoso.com/commit//localhost/Users/codey/file.html',
|
||||
'webview.contoso.com/commit/file//localhost/Users/codey/file.html',
|
||||
'Unix should preserve authority'
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
stripEndpointUuid(webview.webview.asWebviewUri(URI.parse('file:///c:/codey/file.txt')).toString()),
|
||||
'webview.contoso.com/commit///c%3A/codey/file.txt',
|
||||
'webview.contoso.com/commit/file///c%3A/codey/file.txt',
|
||||
'Windows C drive'
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user