This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
forked from electron/electron
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add first-party-set chromium tests (electron#34827)
test: add first-part-set chromium feature tests
- Loading branch information
1 parent
afb2309
commit a12770a
Showing
5 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "electron-test-first-party-sets-base", | ||
"main": "main.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "electron-test-first-party-sets-command-line", | ||
"main": "main.js" | ||
} |