* src: fix typo formated -> formatted

* src: fix typo recieve -> receive

* src: fix typo successfuly -> successfully

* src: fix typo neccessary -> necessary

* extensions: fix typo existance -> existence

* src: fix typo appearence -> appearance

* src: fix typo choosen -> chosen

* src: fix typo unkown -> unknown

* src: fix typo whenever -> whenever

* src: fix typo proccess -> process

* src: fix typo occured -> occurred

* src: fix typo occuring -> occurring

* src: fix typo defintion -> definition
This commit is contained in:
Caio Agiani
2022-02-01 14:16:37 -03:00
committed by GitHub
parent a1a7da7d51
commit 09c2e177ea
24 changed files with 64 additions and 64 deletions

View File

@@ -113,7 +113,7 @@ suite('vscode API - webview', () => {
</script>`);
await ready;
const firstResponse = await sendRecieveMessage(webview, { type: 'add' });
const firstResponse = await sendReceiveMessage(webview, { type: 'add' });
assert.strictEqual(firstResponse.value, 1);
// Swap away from the webview
@@ -126,7 +126,7 @@ suite('vscode API - webview', () => {
await ready2;
// We should still have old state
const secondResponse = await sendRecieveMessage(webview, { type: 'get' });
const secondResponse = await sendReceiveMessage(webview, { type: 'get' });
assert.strictEqual(secondResponse.value, 1);
});
@@ -140,14 +140,14 @@ suite('vscode API - webview', () => {
webview.webview.html = statefulWebviewHtml;
await ready;
const firstResponse = await sendRecieveMessage(webview, { type: 'add' });
const firstResponse = await sendReceiveMessage(webview, { type: 'add' });
assert.strictEqual(firstResponse.value, 1);
// Now move webview to new view column
webview.reveal(vscode.ViewColumn.Two);
// We should still have old state
const secondResponse = await sendRecieveMessage(webview, { type: 'get' });
const secondResponse = await sendReceiveMessage(webview, { type: 'get' });
assert.strictEqual(secondResponse.value, 1);
});
@@ -160,7 +160,7 @@ suite('vscode API - webview', () => {
webview.webview.html = statefulWebviewHtml;
await ready;
const firstResponse = await sendRecieveMessage(webview, { type: 'add' });
const firstResponse = await sendReceiveMessage(webview, { type: 'add' });
assert.strictEqual((await firstResponse).value, 1);
// Swap away from the webview
@@ -171,7 +171,7 @@ suite('vscode API - webview', () => {
webview.reveal(vscode.ViewColumn.One);
// We should still have old state
const secondResponse = await sendRecieveMessage(webview, { type: 'get' });
const secondResponse = await sendReceiveMessage(webview, { type: 'get' });
assert.strictEqual(secondResponse.value, 1);
});
@@ -211,7 +211,7 @@ suite('vscode API - webview', () => {
webview.reveal(vscode.ViewColumn.One);
// We should still have old scroll pos
const secondResponse = await sendRecieveMessage(webview, { type: 'get' });
const secondResponse = await sendReceiveMessage(webview, { type: 'get' });
assert.strictEqual(Math.round(secondResponse.value), 100);
});
@@ -222,7 +222,7 @@ suite('vscode API - webview', () => {
webview.webview.html = statefulWebviewHtml;
await ready;
const firstResponse = await sendRecieveMessage(webview, { type: 'add' });
const firstResponse = await sendReceiveMessage(webview, { type: 'add' });
assert.strictEqual((await firstResponse).value, 1);
// Swap away from the webview
@@ -230,14 +230,14 @@ suite('vscode API - webview', () => {
await vscode.window.showTextDocument(doc);
// Try posting a message to our hidden webview
const secondResponse = await sendRecieveMessage(webview, { type: 'add' });
const secondResponse = await sendReceiveMessage(webview, { type: 'add' });
assert.strictEqual((await secondResponse).value, 2);
// Now show webview again
webview.reveal(vscode.ViewColumn.One);
// We should still have old state
const thirdResponse = await sendRecieveMessage(webview, { type: 'get' });
const thirdResponse = await sendReceiveMessage(webview, { type: 'get' });
assert.strictEqual(thirdResponse.value, 2);
});
@@ -277,29 +277,29 @@ suite('vscode API - webview', () => {
{
const imagePath = webview.webview.asWebviewUri(workspaceFile('image.png'));
const response = await sendRecieveMessage(webview, { src: imagePath.toString() });
const response = await sendReceiveMessage(webview, { src: imagePath.toString() });
assert.strictEqual(response.value, true);
}
// {
// // #102188. Resource filename containing special characters like '%', '#', '?'.
// const imagePath = webview.webview.asWebviewUri(workspaceFile('image%02.png'));
// const response = await sendRecieveMessage(webview, { src: imagePath.toString() });
// const response = await sendReceiveMessage(webview, { src: imagePath.toString() });
// assert.strictEqual(response.value, true);
// }
// {
// // #102188. Resource filename containing special characters like '%', '#', '?'.
// const imagePath = webview.webview.asWebviewUri(workspaceFile('image%.png'));
// const response = await sendRecieveMessage(webview, { src: imagePath.toString() });
// const response = await sendReceiveMessage(webview, { src: imagePath.toString() });
// assert.strictEqual(response.value, true);
// }
{
const imagePath = webview.webview.asWebviewUri(workspaceFile('no-such-image.png'));
const response = await sendRecieveMessage(webview, { src: imagePath.toString() });
const response = await sendReceiveMessage(webview, { src: imagePath.toString() });
assert.strictEqual(response.value, false);
}
{
const imagePath = webview.webview.asWebviewUri(workspaceFile('..', '..', '..', 'resources', 'linux', 'code.png'));
const response = await sendRecieveMessage(webview, { src: imagePath.toString() });
const response = await sendReceiveMessage(webview, { src: imagePath.toString() });
assert.strictEqual(response.value, false);
}
});
@@ -323,11 +323,11 @@ suite('vscode API - webview', () => {
</script>`);
{
const response = sendRecieveMessage(webview, { src: webview.webview.asWebviewUri(workspaceFile('sub', 'image.png')).toString() });
const response = sendReceiveMessage(webview, { src: webview.webview.asWebviewUri(workspaceFile('sub', 'image.png')).toString() });
assert.strictEqual((await response).value, true);
}
{
const response = sendRecieveMessage(webview, { src: webview.webview.asWebviewUri(workspaceFile('image.png')).toString() });
const response = sendReceiveMessage(webview, { src: webview.webview.asWebviewUri(workspaceFile('image.png')).toString() });
assert.strictEqual((await response).value, false);
}
});
@@ -357,7 +357,7 @@ suite('vscode API - webview', () => {
// Firefox service workers never seem to get any 'fetch' requests here. Other browsers work fine
return;
}
const firstResponse = await sendRecieveMessage(webview, { src: imagePath.toString() });
const firstResponse = await sendReceiveMessage(webview, { src: imagePath.toString() });
assert.strictEqual(firstResponse.value, true);
});
@@ -574,7 +574,7 @@ function getMessage<R = any>(webview: vscode.WebviewPanel): Promise<R> {
});
}
function sendRecieveMessage<T = {}, R = any>(webview: vscode.WebviewPanel, message: T): Promise<R> {
function sendReceiveMessage<T = {}, R = any>(webview: vscode.WebviewPanel, message: T): Promise<R> {
const p = getMessage<R>(webview);
webview.webview.postMessage(message);
return p;