ports/devel/electron22/files/patch-electron_spec_chromium-spec.ts
Hiroki Tagato db078015b3 devel/electron22: update to 22.3.6
While here, switch to USES=iconv:wchar_t to make stage-qa happy.

Changelog: https://github.com/electron/electron/releases/tag/v22.3.6

Reported by:	GitHub (watch releases)
2023-04-18 15:43:20 +09:00

53 lines
3.3 KiB
TypeScript

--- electron/spec/chromium-spec.ts.orig 2023-04-13 06:10:54 UTC
+++ electron/spec/chromium-spec.ts
@@ -473,13 +473,13 @@ describe('command line switches', () => {
it('should not set an invalid locale', async () => testLocale('asdfkl', `${currentLocale}|${currentSystemLocale}|${currentPreferredLanguages}`));
const lcAll = String(process.env.LC_ALL);
- ifit(process.platform === 'linux')('current process has a valid LC_ALL env', async () => {
+ ifit(process.platform === 'linux' || process.platform === 'freebsd')('current process has a valid LC_ALL env', async () => {
// The LC_ALL env should not be set to DOM locale string.
expect(lcAll).to.not.equal(app.getLocale());
});
- ifit(process.platform === 'linux')('should not change LC_ALL', async () => testLocale('fr', lcAll, true));
- ifit(process.platform === 'linux')('should not change LC_ALL when setting invalid locale', async () => testLocale('asdfkl', lcAll, true));
- ifit(process.platform === 'linux')('should not change LC_ALL when --lang is not set', async () => testLocale('', lcAll, true));
+ ifit(process.platform === 'linux' || process.platform === 'freebsd')('should not change LC_ALL', async () => testLocale('fr', lcAll, true));
+ ifit(process.platform === 'linux' || process.platform === 'freebsd')('should not change LC_ALL when setting invalid locale', async () => testLocale('asdfkl', lcAll, true));
+ ifit(process.platform === 'linux' || process.platform === 'freebsd')('should not change LC_ALL when --lang is not set', async () => testLocale('', lcAll, true));
});
describe('--remote-debugging-pipe switch', () => {
@@ -2073,7 +2073,7 @@ describe('chromium features', () => {
});
});
- ifdescribe(process.platform !== 'win32' && process.platform !== 'linux')('webgl', () => {
+ ifdescribe(process.platform !== 'win32' && process.platform !== 'linux' && process.platform !== 'freebsd')('webgl', () => {
it('can be gotten as context in canvas', async () => {
const w = new BrowserWindow({ show: false });
w.loadURL('about:blank');
@@ -2288,12 +2288,12 @@ describe('font fallback', () => {
expect(fonts[0].familyName).to.equal('Arial');
} else if (process.platform === 'darwin') {
expect(fonts[0].familyName).to.equal('Helvetica');
- } else if (process.platform === 'linux') {
+ } else if (process.platform === 'linux' || process.platform === 'freebsd') {
expect(fonts[0].familyName).to.equal('DejaVu Sans');
} // I think this depends on the distro? We don't specify a default.
});
- ifit(process.platform !== 'linux')('should fall back to Japanese font for sans-serif Japanese script', async function () {
+ ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('should fall back to Japanese font for sans-serif Japanese script', async function () {
const html = `
<html lang="ja-JP">
<head>
@@ -2684,7 +2684,7 @@ describe('navigator.clipboard.write', () => {
});
});
-ifdescribe((process.platform !== 'linux' || app.isUnityRunning()))('navigator.setAppBadge/clearAppBadge', () => {
+ifdescribe(((process.platform !== 'linux' && process.platform !== 'freebsd') || app.isUnityRunning()))('navigator.setAppBadge/clearAppBadge', () => {
let w: BrowserWindow;
const expectedBadgeCount = 42;