Skip to content

Commit

Permalink
make the test more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Oct 26, 2021
1 parent fe21fc6 commit f635a34
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ func Example_main() {
WebGL Renderer: Intel Iris OpenGL Engine
Hairline Feature: missing
Broken Image Dimensions: 16x16
*/
}
Expand All @@ -66,6 +64,10 @@ func printReport(page *rod.Page) {
key := cells[0].MustProperty("textContent")
if strings.HasPrefix(key.String(), "User Agent") {
fmt.Printf("\t\t%s: %t\n\n", key, !strings.Contains(cells[1].MustProperty("textContent").String(), "HeadlessChrome/"))
} else if strings.HasPrefix(key.String(), "Hairline Feature") {
// Detects support for hidpi/retina hairlines, which are CSS borders with less than 1px in width, for being physically 1px on hidpi screens.
// Not all the machine suppports it.
continue
} else {
fmt.Printf("\t\t%s: %s\n\n", key, cells[1].MustProperty("textContent"))
}
Expand Down

0 comments on commit f635a34

Please sign in to comment.