test: slightly rewrite getGPUInfo() tests (#14863)

Rewrite GPUInfo tests for linux and update `getGPUInfo` functionality for linux.
`basic` and `complete` GPUInfo is same for linux.
This commit is contained in:
Alexey Kuzmin 2018-10-02 03:34:52 +02:00 committed by Nitish Sakhawalkar
parent f1b097024e
commit c9edf77e8e
3 changed files with 89 additions and 34 deletions

17
spec/fixtures/api/gpu-info.js vendored Normal file
View file

@ -0,0 +1,17 @@
const { app } = require('electron')
app.commandLine.appendSwitch('--disable-software-rasterizer')
app.on('ready', () => {
const infoType = process.argv.pop()
app.getGPUInfo(infoType).then(
(gpuInfo) => {
console.log(JSON.stringify(gpuInfo))
app.exit(0)
},
(error) => {
console.error(error)
app.exit(1)
}
)
})