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
|
--- electron/spec-main/api-app-spec.ts.orig 2021-04-20 23:32:33 UTC
+++ electron/spec-main/api-app-spec.ts
@@ -123,7 +123,7 @@ describe('app module', () => {
describe('app.getLocaleCountryCode()', () => {
it('should be empty or have length of two', () => {
let expectedLength = 2;
- if (process.platform === 'linux') {
+ if (process.platform === 'linux' || process.platform === 'freebsd') {
// Linux CI machines have no locale.
expectedLength = 0;
}
@@ -179,7 +179,7 @@ describe('app module', () => {
});
it('exits gracefully', async function () {
- if (!['darwin', 'linux'].includes(process.platform)) {
+ if (!['darwin', 'linux', 'freebsd'].includes(process.platform)) {
this.skip();
return;
}
@@ -321,7 +321,7 @@ describe('app module', () => {
// let w = null
// before(function () {
- // if (process.platform !== 'linux') {
+ // if (process.platform !== 'linux' && process.platform !== 'freebsd') {
// this.skip()
// }
// })
@@ -558,7 +558,7 @@ describe('app module', () => {
describe('app.badgeCount', () => {
const platformIsNotSupported =
(process.platform === 'win32') ||
- (process.platform === 'linux' && !app.isUnityRunning());
+ ((process.platform === 'linux' || process.platform === 'freebsd') && !app.isUnityRunning());
const expectedBadgeCount = 42;
@@ -620,7 +620,7 @@ describe('app module', () => {
];
before(function () {
- if (process.platform === 'linux' || process.mas) this.skip();
+ if (process.platform === 'linux' || process.platform === 'freebsd' || process.mas) this.skip();
});
beforeEach(() => {
@@ -923,7 +923,7 @@ describe('app module', () => {
});
});
- ifdescribe(process.platform !== 'linux')('accessibilitySupportEnabled property', () => {
+ ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('accessibilitySupportEnabled property', () => {
it('with properties', () => {
it('can set accessibility support enabled', () => {
expect(app.accessibilitySupportEnabled).to.eql(false);
@@ -1037,7 +1037,7 @@ describe('app module', () => {
let w: BrowserWindow;
before(function () {
- if (process.platform === 'linux') {
+ if (process.platform === 'linux' || process.platform === 'freebsd') {
this.skip();
}
session.fromPartition('empty-certificate').setCertificateVerifyProc((req, cb) => { cb(0); });
@@ -1178,7 +1178,7 @@ describe('app module', () => {
// We can't expect particular app names here, but these protocols should
// at least have _something_ registered. Except on our Linux CI
// environment apparently.
- if (process.platform === 'linux') {
+ if (process.platform === 'linux' || process.platform === 'freebsd') {
this.skip();
}
@@ -1196,7 +1196,7 @@ describe('app module', () => {
});
});
- ifdescribe(process.platform !== 'linux')('getApplicationInfoForProtocol()', () => {
+ ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('getApplicationInfoForProtocol()', () => {
it('returns promise rejection for a bogus protocol', async function () {
await expect(
app.getApplicationInfoForProtocol('bogus-protocol://')
@@ -1252,7 +1252,7 @@ describe('app module', () => {
});
// FIXME Get these specs running on Linux CI
- ifdescribe(process.platform !== 'linux')('getFileIcon() API', () => {
+ ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('getFileIcon() API', () => {
const iconPath = path.join(__dirname, 'fixtures/assets/icon.ico');
const sizes = {
small: 16,
@@ -1333,7 +1333,7 @@ describe('app module', () => {
expect(entry.memory).to.have.property('privateBytes').that.is.greaterThan(0);
}
- if (process.platform !== 'linux') {
+ if (process.platform !== 'linux' && process.platform !== 'freebsd') {
expect(entry.sandboxed).to.be.a('boolean');
}
@@ -1359,7 +1359,7 @@ describe('app module', () => {
});
// FIXME https://github.com/electron/electron/issues/24224
- ifdescribe(process.platform !== 'linux')('getGPUInfo() API', () => {
+ ifdescribe(process.platform !== 'linux' && process.platform !== 'freebsd')('getGPUInfo() API', () => {
const appPath = path.join(fixturesPath, 'api', 'gpu-info.js');
const getGPUInfo = async (type: string) => {
@@ -1401,7 +1401,7 @@ describe('app module', () => {
it('succeeds with complete GPUInfo', async () => {
const completeInfo = await getGPUInfo('complete');
- if (process.platform === 'linux') {
+ if (process.platform === 'linux' || process.platform === 'freebsd') {
// For linux and macOS complete info is same as basic info
await verifyBasicGPUInfo(completeInfo);
const basicInfo = await getGPUInfo('basic');
@@ -1431,7 +1431,7 @@ describe('app module', () => {
const socketPath = process.platform === 'win32' ? '\\\\.\\pipe\\electron-mixed-sandbox' : '/tmp/electron-mixed-sandbox';
beforeEach(function (done) {
- if (process.platform === 'linux' && (process.arch === 'arm64' || process.arch === 'arm')) {
+ if ((process.platform === 'linux' || process.platform === 'freebsd') && (process.arch === 'arm64' || process.arch === 'arm')) {
// Our ARM tests are run on VSTS rather than CircleCI, and the Docker
// setup on VSTS disallows syscalls that Chrome requires for setting up
// sandboxing.
|