mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
|
@ -0,0 +1,14 @@
|
|||
function checkLinePos(spanID,expectedPos,coordToCheck) {
|
||||
if(coordToCheck == "top")
|
||||
var spanToCheck = document.getElementById(spanID).getBoundingClientRect().top;
|
||||
else if(coordToCheck == "right")
|
||||
var spanToCheck = document.getElementById(spanID).getBoundingClientRect().right;
|
||||
else if(coordToCheck == "left")
|
||||
var spanToCheck = document.getElementById(spanID).getBoundingClientRect().left;
|
||||
else
|
||||
var spanToCheck = document.getElementById(spanID).getBoundingClientRect().bottom;
|
||||
|
||||
/* Verify that the span appears where expected. It should be at expectedPos
|
||||
Test will allow 1/4 line height (3px) of leeway for minor spacing differences */
|
||||
return( (spanToCheck >= expectedPos) && (spanToCheck <= (expectedPos+3)) )
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue