Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
screenshot: replace the unit test for Screenshot
This unit test is copied from puppeteer. The Screenshot action is updated to handle fractional dimensions properly too.
- Loading branch information
Showing
9 changed files
with
136 additions
and
32 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
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
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,73 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<title>screenshot</title> | ||
<style> | ||
#padding-border { | ||
border: 2px solid blue; | ||
background: green; | ||
width: 50px; | ||
height: 50px; | ||
} | ||
|
||
#larger-than-viewport { | ||
border: 1px solid blue; | ||
width: 600px; | ||
height: 600px; | ||
margin-left: 50px; | ||
} | ||
|
||
#above { | ||
border: 2px solid blue; | ||
background: red; | ||
height: 1500px; | ||
} | ||
|
||
#outside-viewport { | ||
border: 2px solid blue; | ||
background: green; | ||
width: 50px; | ||
height: 50px; | ||
} | ||
|
||
#rotated { | ||
position: absolute; | ||
top: 100px; | ||
right: 100px; | ||
width: 100px; | ||
height: 100px; | ||
background: green; | ||
transform: rotateZ(200deg); | ||
} | ||
|
||
#fractional-dimensions { | ||
width: 48.51px; | ||
height: 19.8px; | ||
border: 1px solid black; | ||
} | ||
|
||
#fractional-offset { | ||
position: absolute; | ||
top: 10.3px; | ||
left: 200.4px; | ||
width: 50.3px; | ||
height: 20.2px; | ||
border: 1px solid black; | ||
} | ||
|
||
::-webkit-scrollbar { | ||
display: none; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="padding-border"></div> | ||
<div id="larger-than-viewport"></div> | ||
<div id="above"></div> | ||
<div id="outside-viewport"></div> | ||
<div id="rotated"></div> | ||
<div id="fractional-dimensions"></div> | ||
<div id="fractional-offset" ></div> | ||
</body> | ||
</html> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.