mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #7916 - glennw:flaky-mac, r=jdm
Don't check for equal image size and all white pixels for flaky tests. Workaround for #7730. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7916) <!-- Reviewable:end -->
This commit is contained in:
commit
b34e8b86b8
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