Skip to content

Commit 73d87b2

Browse files
authored
Merge branch 'master' into fix_apc
2 parents 785c3cb + 9d24099 commit 73d87b2

6 files changed

Lines changed: 56 additions & 36 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -207,31 +207,31 @@ jobs:
207207
- name: Build demo server
208208
run: npm run esbuild-demo-server
209209
- name: Integration tests (core) # Tests use 50% workers to reduce flakiness
210-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=core
210+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=core
211211
- name: Integration tests (addon-attach)
212-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-attach
212+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=addon-attach
213213
- name: Integration tests (addon-clipboard)
214-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-clipboard
214+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=addon-clipboard
215215
- name: Integration tests (addon-fit)
216-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-fit
216+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=addon-fit
217217
- name: Integration tests (addon-image)
218-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-image
218+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=addon-image
219219
- name: Integration tests (addon-progress)
220-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-progress
220+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=addon-progress
221221
- name: Integration tests (addon-search)
222-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-search
222+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=addon-search
223223
- name: Integration tests (addon-serialize)
224-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-serialize
224+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=addon-serialize
225225
- name: Integration tests (addon-unicode-graphemes)
226-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-unicode-graphemes
226+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=addon-unicode-graphemes
227227
- name: Integration tests (addon-unicode11)
228-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-unicode11
228+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=addon-unicode11
229229
- name: Integration tests (addon-web-fonts)
230-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-web-fonts
230+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=addon-web-fonts
231231
- name: Integration tests (addon-web-links)
232-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-web-links
232+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=addon-web-links
233233
- name: Integration tests (addon-webgl)
234-
run: npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-webgl
234+
run: npm run test-integration-${{ matrix.browser }} -- --workers=50% --forbid-only --suite=addon-webgl
235235

236236
release-dry-run:
237237
needs: build

addons/addon-image/src/ImageRenderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export class ImageRenderer extends Disposable implements IDisposable {
358358
canvas.style.zIndex = '0';
359359
screenElement.appendChild(canvas);
360360
}
361-
const ctx = canvas.getContext('2d', { alpha: true, desynchronized: true });
361+
const ctx = canvas.getContext('2d', { alpha: true });
362362
if (!ctx) {
363363
canvas.remove();
364364
return;

addons/addon-web-fonts/test/WebFontsAddon.test.ts

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ test.describe('WebFontsAddon', () => {
3333
test.describe('font loading at runtime', () => {
3434
test('loadFonts (JS)', async () => {
3535
await ctx.page.evaluate(`
36-
const ff1 = new FontFace('Kongtext', "url(/kongtext.regular.ttf) format('truetype')");
37-
const ff2 = new FontFace('BPdots', "url(/bpdots.regular.otf) format('opentype')");
36+
const ff1 = new FontFace('Kongtext', "url(/fonts/kongtext.regular.ttf) format('truetype')");
37+
const ff2 = new FontFace('BPdots', "url(/fonts/bpdots.regular.otf) format('opentype')");
3838
loadFonts([ff1, ff2]);
3939
`);
4040
deepStrictEqual(await getDocumentFonts(), [{ family: 'Kongtext', status: 'loaded' }, { family: 'BPdots', status: 'loaded' }]);
4141
});
4242
test('loadFonts (CSS, unquoted)', async () => {
4343
await ctx.page.evaluate(`
44-
document.styleSheets[0].insertRule("@font-face {font-family: Kongtext; src: url(/kongtext.regular.ttf) format('truetype')}", 0);
45-
document.styleSheets[0].insertRule("@font-face {font-family: BPdots; src: url(/bpdots.regular.otf) format('opentype')}", 1);
44+
document.styleSheets[0].insertRule("@font-face {font-family: Kongtext; src: url(/fonts/kongtext.regular.ttf) format('truetype')}", 0);
45+
document.styleSheets[0].insertRule("@font-face {font-family: BPdots; src: url(/fonts/bpdots.regular.otf) format('opentype')}", 1);
4646
loadFonts(['Kongtext', 'BPdots']);
4747
`);
4848
deepStrictEqual(await getDocumentFonts(), [{ family: 'Kongtext', status: 'loaded' }, { family: 'BPdots', status: 'loaded' }]);
4949
});
5050
test('loadFonts (CSS, quoted)', async ({ browser }) => {
5151
// NOTE: firefox preserves family quotes from CSS rules in fontface, all other browsers unquote them
5252
await ctx.page.evaluate(`
53-
document.styleSheets[0].insertRule("@font-face {font-family: 'Kongtext'; src: url(/kongtext.regular.ttf) format('truetype')}", 0);
54-
document.styleSheets[0].insertRule("@font-face {font-family: 'BPdots'; src: url(/bpdots.regular.otf) format('opentype')}", 1);
53+
document.styleSheets[0].insertRule("@font-face {font-family: 'Kongtext'; src: url(/fonts/kongtext.regular.ttf) format('truetype')}", 0);
54+
document.styleSheets[0].insertRule("@font-face {font-family: 'BPdots'; src: url(/fonts/bpdots.regular.otf) format('opentype')}", 1);
5555
loadFonts(['Kongtext', 'BPdots']);
5656
`);
5757
if (browser.browserType().name() === 'firefox') {
@@ -63,8 +63,8 @@ test.describe('WebFontsAddon', () => {
6363
test('FontFace hashing', async () => {
6464
// multiple calls of `loadFonts` with the same objects shall not bloat document.fonts
6565
await ctx.page.evaluate(`
66-
const ff1 = new FontFace('Kongtext', "url(/kongtext.regular.ttf) format('truetype')");
67-
const ff2 = new FontFace('BPdots', "url(/bpdots.regular.otf) format('opentype')");
66+
const ff1 = new FontFace('Kongtext', "url(/fonts/kongtext.regular.ttf) format('truetype')");
67+
const ff2 = new FontFace('BPdots', "url(/fonts/bpdots.regular.otf) format('opentype')");
6868
loadFonts([ff1, ff2]);
6969
loadFonts([ff1, ff2]);
7070
loadFonts([ff1, ff2]).then(() => loadFonts([ff1, ff2]));
@@ -76,7 +76,7 @@ test.describe('WebFontsAddon', () => {
7676
// to make this test work, we exclude the default measurement char W (x57) by restricting unicode-range
7777
// now the browser will postpone font loading until codepoint is hit --> wrong glyph metrics on first usage
7878
const data = await ctx.page.evaluate(`
79-
document.styleSheets[0].insertRule("@font-face {font-family: Kongtext; src: url(/kongtext.regular.ttf) format('truetype'); unicode-range: U+00A0-00FF}", 0);
79+
document.styleSheets[0].insertRule("@font-face {font-family: Kongtext; src: url(/fonts/kongtext.regular.ttf) format('truetype'); unicode-range: U+00A0-00FF}", 0);
8080
`);
8181
deepStrictEqual(await getDocumentFonts(), [{ family: 'Kongtext', status: 'unloaded' }]);
8282

@@ -88,7 +88,11 @@ test.describe('WebFontsAddon', () => {
8888

8989
// safari loads the font, firefox & chrome dont
9090
if (browser.browserType().name() === 'webkit') {
91-
deepStrictEqual(await getDocumentFonts(), [{ family: 'Kongtext', status: 'loaded' }]);
91+
try {
92+
deepStrictEqual(await getDocumentFonts(), [{ family: 'Kongtext', status: 'loading' }]);
93+
} catch (e) {
94+
deepStrictEqual(await getDocumentFonts(), [{ family: 'Kongtext', status: 'loaded' }]);
95+
}
9296
} else {
9397
deepStrictEqual(await getDocumentFonts(), [{ family: 'Kongtext', status: 'unloaded' }]);
9498
}
@@ -103,7 +107,10 @@ test.describe('WebFontsAddon', () => {
103107
window.helperTerm.open(term.element);
104108
`);
105109
await timeout(100);
106-
deepStrictEqual(await getDocumentFonts(), [{ family: 'Kongtext', status: 'loaded' }]);
110+
if (browser.browserType().name() !== 'webkit') {
111+
// safari sometimes reports 'unloadeed'?
112+
deepStrictEqual(await getDocumentFonts(), [{ family: 'Kongtext', status: 'loaded' }]);
113+
}
107114

108115
// cleanup this messy test case
109116
await ctx.page.evaluate(`

addons/addon-webgl/test/WebglRenderer.test.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,29 @@ test.beforeAll(async ({ browser }) => {
1515
await openTerminal(ctx);
1616
ctxWrapper.value = ctx;
1717
await ctx.page.evaluate(`
18-
window.addon = new window.WebglAddon(true);
19-
window.term.loadAddon(window.addon);
18+
try {
19+
window.addon = new window.WebglAddon(true);
20+
window.term.loadAddon(window.addon);
21+
} catch (e) {}
2022
`);
2123
});
2224
test.afterAll(async () => await ctx.page.close());
2325

2426
test.describe('WebGL Renderer Integration Tests', async () => {
2527
// HACK: webgl2 is often not supported in headless firefox on Linux
2628
// https://github.com/microsoft/playwright/issues/11566
29+
// also disable safari due to #5852
2730
if (platform() === 'linux') {
28-
test.skip(({ browserName }) => browserName === 'firefox');
31+
test.skip(({ browserName }) => browserName === 'firefox' || browserName === 'webkit');
2932
}
3033

3134
injectSharedRendererTests(ctxWrapper);
3235
injectSharedRendererTestsStandalone(ctxWrapper, async () => {
3336
await ctx.page.evaluate(`
34-
window.addon = new window.WebglAddon(true);
35-
window.term.loadAddon(window.addon);
37+
try {
38+
window.addon = new window.WebglAddon(true);
39+
window.term.loadAddon(window.addon);
40+
} catch (e) {}
3641
`);
3742
});
3843
});

addons/addon-webgl/test/playwright.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ const config: PlaywrightTestConfig = {
77
{
88
name: 'Chromium',
99
use: {
10-
browserName: 'chromium'
10+
browserName: 'chromium',
11+
launchOptions: {
12+
args: ['--enable-unsafe-swiftshader']
13+
}
1114
}
1215
},
1316
{

test/playwright/SharedRendererTests.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
169169
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 8, 1), [0, 0, 0, 255]);
170170
});
171171

172-
test('background 0-15 invisible', async () => {
172+
// due to #5852
173+
test.skip('background 0-15 invisible', async () => {
173174
const theme: ITheme = {
174175
black: '#010203',
175176
red: '#040506',
@@ -335,7 +336,8 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
335336
}
336337
});
337338

338-
test('background 16-255 invisible', async () => {
339+
// due to #5852
340+
test.skip('background 16-255 invisible', async () => {
339341
let data = '';
340342
for (let y = 0; y < 240 / 16; y++) {
341343
for (let x = 0; x < 16; x++) {
@@ -715,7 +717,8 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
715717
}
716718
});
717719

718-
test('background true color grey invisible', async () => {
720+
// due to #5852
721+
test.skip('background true color grey invisible', async () => {
719722
let data = '';
720723
for (let y = 0; y < 16; y++) {
721724
for (let x = 0; x < 16; x++) {
@@ -872,7 +875,8 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
872875
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 8, 2), [64, 64, 64, 255]);
873876
});
874877

875-
test('should enforce half the contrast for dim cells', async () => {
878+
// due to #5852
879+
test.skip('should enforce half the contrast for dim cells', async () => {
876880
const theme: ITheme = {
877881
background: '#ffffff',
878882
black: '#2e3436',
@@ -1177,7 +1181,8 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
11771181
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 2, 3), [0, 0, 255, 255]);
11781182
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 3, 3), [0, 0, 255, 255]);
11791183
});
1180-
test('#4758: multiple invisible text characters without SGR change should not be rendered', async () => {
1184+
// due to #5852
1185+
test.skip('#4758: multiple invisible text characters without SGR change should not be rendered', async () => {
11811186
// Regression test: #4758 when multiple invisible characters are used
11821187
await ctx.value.proxy.writeln(`■\x1b[8m■■`);
11831188
// Full refresh as the before result is the same as after

0 commit comments

Comments
 (0)