freebsd-ports/devel/electron26/files/patch-electron_spec_api-desktop-capturer-spec.ts
Hiroki Tagato 9ad5184453 devel/electron26: add port: Build cross-platform desktop apps with JavaScript, HTML, and CSS
Build cross platform desktop apps with JavaScript, HTML, and CSS.

It's easier than you think.

If you can build a website, you can build a desktop app. Electron is a
framework for creating native applications with web technologies like
JavaScript, HTML, and CSS. It takes care of the hard parts so you can
focus on the core of your application.

WWW: https://electronjs.org/
2023-10-06 18:26:35 +09:00

47 lines
2.6 KiB
TypeScript

--- electron/spec/api-desktop-capturer-spec.ts.orig 2023-08-14 18:19:06 UTC
+++ electron/spec/api-desktop-capturer-spec.ts
@@ -43,7 +43,7 @@ ifdescribe(!process.arch.includes('arm') && process.pl
});
// Linux doesn't return any window sources.
- ifit(process.platform !== 'linux')('returns an empty display_id for window sources', async () => {
+ ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('returns an empty display_id for window sources', async () => {
const w = new BrowserWindow({ width: 200, height: 200 });
await w.loadURL('about:blank');
@@ -55,7 +55,7 @@ ifdescribe(!process.arch.includes('arm') && process.pl
}
});
- ifit(process.platform !== 'linux')('returns display_ids matching the Screen API', async () => {
+ ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('returns display_ids matching the Screen API', async () => {
const displays = screen.getAllDisplays();
const sources = await desktopCapturer.getSources({ types: ['screen'] });
expect(sources).to.be.an('array').of.length(displays.length);
@@ -100,7 +100,7 @@ ifdescribe(!process.arch.includes('arm') && process.pl
// TODO(julien.isorce): investigate why |sources| is empty on the linux
// bots while it is not on my workstation, as expected, with and without
// the --ci parameter.
- if (process.platform === 'linux' && sources.length === 0) {
+ if ((process.platform === 'linux' || process.platform === 'freebsd') && sources.length === 0) {
it.skip('desktopCapturer.getSources returned an empty source list');
return;
}
@@ -136,7 +136,7 @@ ifdescribe(!process.arch.includes('arm') && process.pl
// TODO(julien.isorce): investigate why |sources| is empty on the linux
// bots while it is not on my workstation, as expected, with and without
// the --ci parameter.
- if (process.platform === 'linux' && sources.length === 0) {
+ if ((process.platform === 'linux' || process.platform === 'freebsd') && sources.length === 0) {
it.skip('desktopCapturer.getSources returned an empty source list');
return;
}
@@ -191,7 +191,7 @@ ifdescribe(!process.arch.includes('arm') && process.pl
// TODO(julien.isorce): investigate why |sources| is empty on the linux
// bots while it is not on my workstation, as expected, with and without
// the --ci parameter.
- if (process.platform === 'linux' && sources.length === 0) {
+ if ((process.platform === 'linux' || process.platform === 'freebsd') && sources.length === 0) {
destroyWindows();
it.skip('desktopCapturer.getSources returned an empty source list');
return;