mirror of
https://github.com/servo/servo.git
synced 2025-08-22 05:45:33 +01:00
Update web-platform-tests to revision 44702f2bc8ea98bc32b5b244f2fe63c6ce66d49d
This commit is contained in:
parent
85fa6409bb
commit
c227604a2c
997 changed files with 45660 additions and 14650 deletions
|
@ -66,6 +66,7 @@
|
|||
var originalWidth = 0;
|
||||
var originalHeight = 0;
|
||||
var originalInnerWidth = 0;
|
||||
var originalInnerHeight = 0;
|
||||
|
||||
addManualTestStep(
|
||||
function() {},
|
||||
|
@ -77,7 +78,16 @@
|
|||
function() {
|
||||
originalWidth = window.visualViewport.width;
|
||||
originalHeight = window.visualViewport.height;
|
||||
// Remember the inner dimensions here for the next test to
|
||||
// address an edge case where originalInnerWidth is an odd
|
||||
// number of pixels. The test expects that at 2x browser-zoom,
|
||||
// visualViewport.width = innerWidth - customScrollbarThickness
|
||||
// The equality only holds if originalInnerWidth / innerWidth is
|
||||
// exactly 2, which is not the case in the aforementioned
|
||||
// scenario because innerWidth always has to be an integer
|
||||
// number of CSS pixels. Ditto for the height computation.
|
||||
originalInnerWidth = window.innerWidth;
|
||||
originalInnerHeight = window.innerHeight;
|
||||
|
||||
assert_equals(
|
||||
window.visualViewport.width,
|
||||
|
@ -100,13 +110,15 @@
|
|||
0.1,
|
||||
"Browser zoom to correct level");
|
||||
|
||||
// The custom scrollbars are also 2x larger on the screen, so
|
||||
// the viewport is smaller than half of the original size.
|
||||
assert_equals(
|
||||
window.visualViewport.width,
|
||||
window.innerWidth - 20,
|
||||
originalInnerWidth / 2 - 20,
|
||||
"Custom scrollbar width subtracted from viewport.");
|
||||
assert_equals(
|
||||
window.visualViewport.height,
|
||||
window.innerHeight - 25,
|
||||
originalInnerHeight / 2 - 25,
|
||||
"Custom scrollbar height subtracted from viewport.");
|
||||
},
|
||||
'With 200% browser zoom',
|
||||
|
|
|
@ -55,6 +55,8 @@
|
|||
var originalWidth = 0;
|
||||
var originalHeight = 0;
|
||||
var originalInnerWidth = 0;
|
||||
var originalVisualViewportWidthExpectation = 0;
|
||||
var originalVisualViewportHeightExpectation = 0;
|
||||
|
||||
addManualTestStep(
|
||||
function() {},
|
||||
|
@ -67,14 +69,26 @@
|
|||
originalWidth = window.visualViewport.width;
|
||||
originalHeight = window.visualViewport.height;
|
||||
originalInnerWidth = window.innerWidth;
|
||||
// Remember the visualViewport size here for the next test to
|
||||
// address an edge case where originalInnerWidth is an odd
|
||||
// number of pixels. The test expects that at 2x browser-zoom,
|
||||
// visualViewport.width = innerWidth - scrollbarThickness / 2.0
|
||||
// The equality only holds if originalInnerWidth / innerWidth is
|
||||
// exactly 2, which is not the case in the aforementioned
|
||||
// scenario because innerWidth always has to be an integer
|
||||
// number of CSS pixels. Ditto for the height computation.
|
||||
originalVisualViewportWidthExpectation =
|
||||
window.innerWidth - scrollbarThickness;
|
||||
originalVisualViewportHeightExpectation =
|
||||
window.innerHeight - scrollbarThickness;
|
||||
|
||||
assert_equals(
|
||||
window.visualViewport.width,
|
||||
window.innerWidth - scrollbarThickness,
|
||||
originalVisualViewportWidthExpectation,
|
||||
"Scrollbar width subtracted from viewport.");
|
||||
assert_equals(
|
||||
window.visualViewport.height,
|
||||
window.innerHeight - scrollbarThickness,
|
||||
originalVisualViewportHeightExpectation,
|
||||
"Scrollbar height subtracted from viewport.");
|
||||
},
|
||||
'No zoom or scale applied',
|
||||
|
@ -92,11 +106,11 @@
|
|||
// they'll be fewer CSS pixels as the user zooms in.
|
||||
assert_equals(
|
||||
window.visualViewport.width,
|
||||
window.innerWidth - scrollbarThickness / 2,
|
||||
originalVisualViewportWidthExpectation / 2,
|
||||
"Scrollbar width subtracted from viewport.");
|
||||
assert_equals(
|
||||
window.visualViewport.height,
|
||||
window.innerHeight - scrollbarThickness / 2,
|
||||
originalVisualViewportHeightExpectation / 2,
|
||||
"Scrollbar height subtracted from viewport.");
|
||||
},
|
||||
'With 200% browser zoom',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue