test: add first-party-set chromium tests (#34827)
test: add first-part-set chromium feature tests
This commit is contained in:
parent
7ec88584b5
commit
e83c3ec744
5 changed files with 71 additions and 0 deletions
20
spec/fixtures/api/first-party-sets/base/main.js
vendored
Normal file
20
spec/fixtures/api/first-party-sets/base/main.js
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
const { app } = require('electron');
|
||||
|
||||
const sets = [
|
||||
'https://fps-member1.glitch.me',
|
||||
'https://fps-member2.glitch.me',
|
||||
'https://fps-member3.glitch.me'
|
||||
];
|
||||
|
||||
app.commandLine.appendSwitch('use-first-party-set', sets.join(','));
|
||||
|
||||
app.whenReady().then(function () {
|
||||
const hasSwitch = app.commandLine.hasSwitch('use-first-party-set');
|
||||
const value = app.commandLine.getSwitchValue('use-first-party-set');
|
||||
if (hasSwitch) {
|
||||
process.stdout.write(JSON.stringify(value));
|
||||
process.stdout.end();
|
||||
}
|
||||
|
||||
app.quit();
|
||||
});
|
4
spec/fixtures/api/first-party-sets/base/package.json
vendored
Normal file
4
spec/fixtures/api/first-party-sets/base/package.json
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "electron-test-first-party-sets-base",
|
||||
"main": "main.js"
|
||||
}
|
12
spec/fixtures/api/first-party-sets/command-line/main.js
vendored
Normal file
12
spec/fixtures/api/first-party-sets/command-line/main.js
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
const { app } = require('electron');
|
||||
|
||||
app.whenReady().then(function () {
|
||||
const hasSwitch = app.commandLine.hasSwitch('use-first-party-set');
|
||||
const value = app.commandLine.getSwitchValue('use-first-party-set');
|
||||
if (hasSwitch) {
|
||||
process.stdout.write(JSON.stringify(value));
|
||||
process.stdout.end();
|
||||
}
|
||||
|
||||
app.quit();
|
||||
});
|
4
spec/fixtures/api/first-party-sets/command-line/package.json
vendored
Normal file
4
spec/fixtures/api/first-party-sets/command-line/package.json
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "electron-test-first-party-sets-command-line",
|
||||
"main": "main.js"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue