mirror of
https://github.com/servo/servo.git
synced 2025-08-30 09:38:19 +01:00
Update web-platform-tests to revision 70fdd27f4cecb8a5cae3dafa76ba05265531c9e2
This commit is contained in:
parent
e5689df6b4
commit
bea56037ef
701 changed files with 13864 additions and 1909 deletions
|
@ -0,0 +1,30 @@
|
|||
// META: global=window,dedicatedworker,sharedworker,serviceworker
|
||||
'use strict';
|
||||
|
||||
promise_test(async testCase => {
|
||||
assert_class_string(navigator.screen, 'ScreenManager');
|
||||
assert_equals(typeof navigator.screen.getScreens, 'function');
|
||||
}, 'navigator.screen.getScreens is present');
|
||||
|
||||
promise_test(async testCase => {
|
||||
const screens = await navigator.screen.getScreens();
|
||||
assert_greater_than(screens.length, 0);
|
||||
|
||||
assert_equals(typeof screens[0].availWidth, 'number');
|
||||
assert_equals(typeof screens[0].availHeight, 'number');
|
||||
assert_equals(typeof screens[0].width, 'number');
|
||||
assert_equals(typeof screens[0].height, 'number');
|
||||
assert_equals(typeof screens[0].colorDepth, 'number');
|
||||
assert_equals(typeof screens[0].pixelDepth, 'number');
|
||||
|
||||
assert_equals(typeof screens[0].availLeft, 'number');
|
||||
assert_equals(typeof screens[0].availTop, 'number');
|
||||
assert_equals(typeof screens[0].left, 'number');
|
||||
assert_equals(typeof screens[0].top, 'number');
|
||||
assert_equals(typeof screens[0].orientation, 'object');
|
||||
|
||||
assert_equals(typeof screens[0].primary, 'boolean');
|
||||
assert_equals(typeof screens[0].internal, 'boolean');
|
||||
assert_equals(typeof screens[0].scaleFactor, 'number');
|
||||
assert_equals(typeof screens[0].name, 'string');
|
||||
}, 'navigator.screen.getScreens returns at least 1 Screen');
|
|
@ -1,21 +0,0 @@
|
|||
// META: global=window,dedicatedworker,sharedworker,serviceworker
|
||||
'use strict';
|
||||
|
||||
promise_test(async testCase => {
|
||||
assert_class_string(navigator.screen, 'ScreenManager');
|
||||
assert_equals(typeof navigator.screen.requestDisplays, 'function');
|
||||
}, 'navigator.screen.requestDisplays is present');
|
||||
|
||||
promise_test(async testCase => {
|
||||
const displays = await navigator.screen.requestDisplays();
|
||||
assert_greater_than(displays.length, 0);
|
||||
assert_equals(typeof displays[0].name, 'string');
|
||||
assert_equals(typeof displays[0].scaleFactor, 'number');
|
||||
assert_equals(typeof displays[0].width, 'number');
|
||||
assert_equals(typeof displays[0].height, 'number');
|
||||
assert_equals(typeof displays[0].left, 'number');
|
||||
assert_equals(typeof displays[0].top, 'number');
|
||||
assert_equals(typeof displays[0].colorDepth, 'number');
|
||||
assert_equals(typeof displays[0].isPrimary, 'boolean');
|
||||
assert_equals(typeof displays[0].isInternal, 'boolean');
|
||||
}, 'navigator.screen.requestDisplays returns at least 1 Display');
|
Loading…
Add table
Add a link
Reference in a new issue