-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
'use strict' | ||
|
||
const { getBrowser } = require('@browserless/test/util') | ||
const cheerio = require('cheerio') | ||
const test = require('ava') | ||
|
||
const browser = getBrowser() | ||
|
||
test('graphics features', async t => { | ||
const browserless = await browser.createContext() | ||
|
||
t.teardown(browserless.destroyContext) | ||
|
||
const page = await browserless.page() | ||
await page.goto('chrome://gpu/') | ||
|
||
const html = await page.evaluate(() => document.querySelector('info-view').shadowRoot.innerHTML) | ||
await page.close() | ||
|
||
const $ = cheerio.load(html) | ||
|
||
const props = [] | ||
|
||
$('.feature-status-list li').each(function () { | ||
props.push($(this).text().split(': ')) | ||
}) | ||
|
||
const gpu = Object.fromEntries(props) | ||
t.is(gpu.WebGL, 'Software only, hardware acceleration unavailable') | ||
t.is(gpu.WebGL2, 'Software only, hardware acceleration unavailable') | ||
}) |