test: fix modernizer tests (#7553)
This commit is contained in:
parent
869ef072e7
commit
7fa67c9204
|
|
@ -1,7 +1,7 @@
|
||||||
<script src='modernizr.js'></script>
|
<script src='modernizr.js'></script>
|
||||||
<body></body>
|
<body></body>
|
||||||
<script>
|
<script>
|
||||||
window.report = {};
|
const report = {};
|
||||||
for (const name in Modernizr) {
|
for (const name in Modernizr) {
|
||||||
if (name.startsWith('_'))
|
if (name.startsWith('_'))
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -11,5 +11,6 @@ for (const name in Modernizr) {
|
||||||
report[name] = value;
|
report[name] = value;
|
||||||
}
|
}
|
||||||
document.body.style.whiteSpace = 'pre';
|
document.body.style.whiteSpace = 'pre';
|
||||||
document.body.textContent = JSON.stringify(window.report, undefined, 4);
|
document.body.textContent = JSON.stringify(report, undefined, 4);
|
||||||
</script>
|
window.report = JSON.parse(document.body.textContent);
|
||||||
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -30,35 +30,6 @@ async function checkFeatures(name: string, context: any, server: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
it('safari-14-1', async ({ browser, browserName, platform, server }) => {
|
it('safari-14-1', async ({ browser, browserName, platform, server }) => {
|
||||||
it.fixme();
|
|
||||||
|
|
||||||
/* macOS
|
|
||||||
+ "atRule": undefined,
|
|
||||||
"atob-btoa": true,
|
|
||||||
"atobbtoa": true,
|
|
||||||
- "audio": true,
|
|
||||||
+ "audio": Object {
|
|
||||||
+ "m4a": "maybe",
|
|
||||||
+ "mp3": "probably",
|
|
||||||
+ "ogg": "",
|
|
||||||
+ "opus": "",
|
|
||||||
+ "wav": "",
|
|
||||||
+ },
|
|
||||||
- "hairline": true,
|
|
||||||
+ "hairline": false,
|
|
||||||
+ "hasEvent": undefined,
|
|
||||||
+ "mq": undefined,
|
|
||||||
+ "testStyles": undefined,
|
|
||||||
- "video": true,
|
|
||||||
+ "video": Object {
|
|
||||||
+ "h264": "probably",
|
|
||||||
+ "hls": "probably",
|
|
||||||
+ "ogg": "",
|
|
||||||
+ "vp9": "",
|
|
||||||
+ "webm": "",
|
|
||||||
+ },
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* GTK
|
/* GTK
|
||||||
- "gamepads": true,
|
- "gamepads": true,
|
||||||
+ "gamepads": false,
|
+ "gamepads": false,
|
||||||
|
|
@ -102,7 +73,9 @@ it('safari-14-1', async ({ browser, browserName, platform, server }) => {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
it.skip(browserName !== 'webkit' || platform !== 'darwin');
|
it.skip(browserName !== 'webkit' || platform !== 'darwin');
|
||||||
const context = await browser.newContext();
|
const context = await browser.newContext({
|
||||||
|
deviceScaleFactor: 2
|
||||||
|
});
|
||||||
await checkFeatures('safari-14-1', context, server);
|
await checkFeatures('safari-14-1', context, server);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -110,17 +83,6 @@ it('mobile-safari-14-1', async ({ playwright, browser, browserName, platform, se
|
||||||
it.fixme();
|
it.fixme();
|
||||||
|
|
||||||
/* macOS
|
/* macOS
|
||||||
+ "atRule": undefined,
|
|
||||||
"atob-btoa": true,
|
|
||||||
"atobbtoa": true,
|
|
||||||
- "audio": true,
|
|
||||||
+ "audio": Object {
|
|
||||||
+ "m4a": "maybe",
|
|
||||||
+ "mp3": "probably",
|
|
||||||
+ "ogg": "",
|
|
||||||
+ "opus": "",
|
|
||||||
+ "wav": "",
|
|
||||||
+ },
|
|
||||||
- "capture": true,
|
- "capture": true,
|
||||||
+ "capture": false,
|
+ "capture": false,
|
||||||
- "cssscrollbar": false,
|
- "cssscrollbar": false,
|
||||||
|
|
@ -132,34 +94,21 @@ it('mobile-safari-14-1', async ({ playwright, browser, browserName, platform, se
|
||||||
- "devicemotion": true,
|
- "devicemotion": true,
|
||||||
- "deviceorientation": true,
|
- "deviceorientation": true,
|
||||||
+ "devicemotion": false,
|
+ "devicemotion": false,
|
||||||
+ "deviceorientation": falsef,
|
+ "deviceorientation": false,
|
||||||
- "fullscreen": false,
|
- "fullscreen": false,
|
||||||
+ "fullscreen": true,
|
+ "fullscreen": true,
|
||||||
- "hairline": true,
|
|
||||||
+ "hairline": false,
|
|
||||||
+ "hasEvent": undefined,
|
|
||||||
"inputtypes": Object {
|
"inputtypes": Object {
|
||||||
- "month": true,
|
- "month": true,
|
||||||
+ "month": false,
|
+ "month": false,
|
||||||
- "week": true,
|
- "week": true,
|
||||||
+ "week": false,
|
+ "week": false,
|
||||||
},
|
},
|
||||||
+ "mq": undefined,
|
|
||||||
- "notification": false,
|
- "notification": false,
|
||||||
+ "notification": true,
|
+ "notification": true,
|
||||||
- "overflowscrolling": true,
|
- "overflowscrolling": true,
|
||||||
+ "overflowscrolling": false,
|
+ "overflowscrolling": false,
|
||||||
- "pointerlock": false,
|
- "pointerlock": false,
|
||||||
+ "pointerlock": true,
|
+ "pointerlock": true,
|
||||||
+ "testStyles": undefined,
|
|
||||||
- "video": true,
|
|
||||||
+ "video": Object {
|
|
||||||
+ "h264": "probably",
|
|
||||||
+ "hls": "probably",
|
|
||||||
+ "ogg": "",
|
|
||||||
+ "vp9": "",
|
|
||||||
+ "webm": "",
|
|
||||||
+ },
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* GTK
|
/* GTK
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue