mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Don't check for equal image size and all white pixels for flaky tests.
Workaround for #7730.
This commit is contained in:
parent
217c7da413
commit
987f00efbd
1 changed files with 9 additions and 6 deletions
3
tests/reftest.rs
vendored
3
tests/reftest.rs
vendored
|
@ -340,6 +340,8 @@ fn check_reftest(reftest: Reftest) {
|
||||||
let (left_width, left_height, left_bytes) = capture(&reftest, 0);
|
let (left_width, left_height, left_bytes) = capture(&reftest, 0);
|
||||||
let (right_width, right_height, right_bytes) = capture(&reftest, 1);
|
let (right_width, right_height, right_bytes) = capture(&reftest, 1);
|
||||||
|
|
||||||
|
// TODO(gw): This is a workaround for https://github.com/servo/servo/issues/7730
|
||||||
|
if !reftest.is_flaky {
|
||||||
assert_eq!(left_width, right_width);
|
assert_eq!(left_width, right_width);
|
||||||
assert_eq!(left_height, right_height);
|
assert_eq!(left_height, right_height);
|
||||||
|
|
||||||
|
@ -349,6 +351,7 @@ fn check_reftest(reftest: Reftest) {
|
||||||
if left_all_white && right_all_white {
|
if left_all_white && right_all_white {
|
||||||
panic!("Both renderings are empty")
|
panic!("Both renderings are empty")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let pixels = left_bytes.iter().zip(right_bytes.iter()).map(|(&a, &b)| {
|
let pixels = left_bytes.iter().zip(right_bytes.iter()).map(|(&a, &b)| {
|
||||||
if a == b {
|
if a == b {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue