1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
--- electron/spec-main/api-browser-window-spec.ts.orig 2022-08-03 15:31:58 UTC
+++ electron/spec-main/api-browser-window-spec.ts
@@ -58,7 +58,7 @@ describe('BrowserWindow module', () => {
}).not.to.throw();
});
- ifit(process.platform === 'linux')('does not crash when setting large window icons', async () => {
+ ifit(process.platform === 'linux' || process.platform === 'freebsd')('does not crash when setting large window icons', async () => {
const appPath = path.join(__dirname, 'spec-main', 'fixtures', 'apps', 'xwindow-icon');
const appProcess = childProcess.spawn(process.execPath, [appPath]);
await new Promise((resolve) => { appProcess.once('exit', resolve); });
@@ -736,7 +736,7 @@ describe('BrowserWindow module', () => {
});
// TODO(dsanders11): Enable for Linux once CI plays nice with these kinds of tests
- ifit(process.platform !== 'linux')('should not restore maximized windows', async () => {
+ ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('should not restore maximized windows', async () => {
const maximize = emittedOnce(w, 'maximize');
const shown = emittedOnce(w, 'show');
w.maximize();
@@ -773,7 +773,7 @@ describe('BrowserWindow module', () => {
expect(w.isFocused()).to.equal(true);
});
- ifit(process.platform !== 'linux')('acquires focus status from the other windows', async () => {
+ ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('acquires focus status from the other windows', async () => {
const w1 = new BrowserWindow({ show: false });
const w2 = new BrowserWindow({ show: false });
const w3 = new BrowserWindow({ show: false });
@@ -840,7 +840,7 @@ describe('BrowserWindow module', () => {
expect(w.isFocused()).to.equal(false);
});
- ifit(process.platform !== 'linux')('transfers focus status to the next window', async () => {
+ ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('transfers focus status to the next window', async () => {
const w1 = new BrowserWindow({ show: false });
const w2 = new BrowserWindow({ show: false });
const w3 = new BrowserWindow({ show: false });
@@ -1238,7 +1238,7 @@ describe('BrowserWindow module', () => {
});
});
- ifdescribe(process.platform !== 'linux')('Maximized state', () => {
+ ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('Maximized state', () => {
it('checks normal bounds when maximized', async () => {
const bounds = w.getBounds();
const maximize = emittedOnce(w, 'maximize');
@@ -1365,7 +1365,7 @@ describe('BrowserWindow module', () => {
});
});
- ifdescribe(process.platform !== 'linux')('Minimized state', () => {
+ ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('Minimized state', () => {
it('checks normal bounds when minimized', async () => {
const bounds = w.getBounds();
const minimize = emittedOnce(w, 'minimize');
@@ -2269,7 +2269,7 @@ describe('BrowserWindow module', () => {
describe('BrowserWindow.setOpacity(opacity)', () => {
afterEach(closeAllWindows);
- ifdescribe(process.platform !== 'linux')(('Windows and Mac'), () => {
+ ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')(('Windows and Mac'), () => {
it('make window with initial opacity', () => {
const w = new BrowserWindow({ show: false, opacity: 0.5 });
expect(w.getOpacity()).to.equal(0.5);
@@ -2295,7 +2295,7 @@ describe('BrowserWindow module', () => {
});
});
- ifdescribe(process.platform === 'linux')(('Linux'), () => {
+ ifdescribe(process.platform === 'linux' || process.platform === 'freebsd')(('Linux'), () => {
it('sets 1 regardless of parameter', () => {
const w = new BrowserWindow({ show: false });
w.setOpacity(0);
@@ -3227,7 +3227,7 @@ describe('BrowserWindow module', () => {
expect(test.versions).to.deep.equal(process.versions);
expect(test.contextId).to.be.a('string');
- if (process.platform === 'linux' && test.osSandbox) {
+ if ((process.platform === 'linux' || process.platform === 'freebsd') && test.osSandbox) {
expect(test.creationTime).to.be.null('creation time');
expect(test.systemMemoryInfo).to.be.null('system memory info');
} else {
@@ -3800,7 +3800,7 @@ describe('BrowserWindow module', () => {
});
});
- ifdescribe(process.platform !== 'linux')('max/minimize events', () => {
+ ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('max/minimize events', () => {
afterEach(closeAllWindows);
it('emits an event when window is maximized', async () => {
const w = new BrowserWindow({ show: false });
@@ -4059,7 +4059,7 @@ describe('BrowserWindow module', () => {
});
// TODO(dsanders11): Enable once maximize event works on Linux again on CI
- ifdescribe(process.platform !== 'linux')('BrowserWindow.maximize()', () => {
+ ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('BrowserWindow.maximize()', () => {
afterEach(closeAllWindows);
it('should show the window if it is not currently shown', async () => {
const w = new BrowserWindow({ show: false });
@@ -4096,7 +4096,7 @@ describe('BrowserWindow module', () => {
// TODO(dsanders11): Enable once minimize event works on Linux again.
// See https://github.com/electron/electron/issues/28699
- ifit(process.platform !== 'linux')('should not restore a minimized window', async () => {
+ ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('should not restore a minimized window', async () => {
const w = new BrowserWindow();
const minimize = emittedOnce(w, 'minimize');
w.minimize();
@@ -4459,7 +4459,7 @@ describe('BrowserWindow module', () => {
});
// On Linux there is no "resizable" property of a window.
- ifit(process.platform !== 'linux')('does affect maximizability when disabled and enabled', () => {
+ ifit(process.platform !== 'linux' && process.platform !== 'freebsd')('does affect maximizability when disabled and enabled', () => {
const w = new BrowserWindow({ show: false });
expect(w.resizable).to.be.true('resizable');
@@ -4551,7 +4551,7 @@ describe('BrowserWindow module', () => {
});
});
- ifdescribe(process.platform !== 'linux')('window states (excluding Linux)', () => {
+ ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('window states (excluding Linux)', () => {
// Not implemented on Linux.
afterEach(closeAllWindows);
@@ -5569,7 +5569,7 @@ describe('BrowserWindow module', () => {
});
// Linux and arm64 platforms (WOA and macOS) do not return any capture sources
- ifit(process.platform !== 'linux' && process.arch !== 'arm64')('should not display a visible background', async () => {
+ ifit((process.platform !== 'linux' && process.platform !== 'freebsd') && process.arch !== 'arm64')('should not display a visible background', async () => {
const display = screen.getPrimaryDisplay();
const backgroundWindow = new BrowserWindow({
@@ -5611,7 +5611,7 @@ describe('BrowserWindow module', () => {
afterEach(closeAllWindows);
// Linux/WOA doesn't return any capture sources.
- ifit(process.platform !== 'linux' && (process.platform !== 'win32' || process.arch !== 'arm64'))('should display the set color', async () => {
+ ifit((process.platform !== 'linux' && process.platform !== 'freebsd') && (process.platform !== 'win32' || process.arch !== 'arm64'))('should display the set color', async () => {
const display = screen.getPrimaryDisplay();
const w = new BrowserWindow({
|