Skip to content
Permalink
Browse files

Make sure reftests aren't passing because nothing == nothing

In the test harness, assert that the two images aren't all white.

Fixes #3481
  • Loading branch information...
gilles-leblanc committed Oct 10, 2014
1 parent be6cde9 commit b15860e53163d964fb6b107ad51b1bce5b893a66
@@ -15,7 +15,7 @@
</style>
</head>
<body>
<div id=a></div>
<div id=a>Background: none test</div>
</body>
</html>

@@ -10,7 +10,7 @@
</style>
</head>
<body>
<div id=a></div>
<div id=a>Background: none test</div>
</body>
</html>

@@ -11,6 +11,7 @@
</style>
</head>
<body>
iframe test
<iframe sandbox="allow-scripts" src="multiple_external_child.html"> </iframe>
<iframe sandbox="allow-scripts" src="multiple_external_child.html"> </iframe>
</body>
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
<body>
iframe test
</body>
</html>
@@ -1,4 +1,5 @@
<!doctype html>
Image dynamic remove
<img src=400x400_green.png>
<script>
document.getElementsByTagName("img")[0].removeAttribute("src");
@@ -1,2 +1,3 @@
<!doctype html>
Image dynamic remove
<img>
@@ -259,6 +259,13 @@ fn check_reftest(reftest: Reftest) {
assert_eq!(left_width, right_width);
assert_eq!(left_height, right_height);

let left_all_white = left_bytes.iter().all(|&p| p == 255);
let right_all_white = right_bytes.iter().all(|&p| p == 255);

if left_all_white && right_all_white {
fail!("Both rendering are empty")
}

let pixels = left_bytes.iter().zip(right_bytes.iter()).map(|(&a, &b)| {
if a as i8 - b as i8 == 0 {
// White for correct

17 comments on commit b15860e

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 13, 2014

saw approval from kmcallister
at gilles-leblanc@b15860e

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 13, 2014

merging gilles-leblanc/servo/issue-3481 = b15860e into auto

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 13, 2014

gilles-leblanc/servo/issue-3481 = b15860e merged ok, testing candidate = 6a0b00e

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 13, 2014

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

saw approval from kmcallister
at gilles-leblanc@b15860e

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

merging gilles-leblanc/servo/issue-3481 = b15860e into auto

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

gilles-leblanc/servo/issue-3481 = b15860e merged ok, testing candidate = 77d13d4

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

saw approval from kmcallister
at gilles-leblanc@b15860e

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

merging gilles-leblanc/servo/issue-3481 = b15860e into auto

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

gilles-leblanc/servo/issue-3481 = b15860e merged ok, testing candidate = 58da439

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

saw approval from kmcallister
at gilles-leblanc@b15860e

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

merging gilles-leblanc/servo/issue-3481 = b15860e into auto

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

gilles-leblanc/servo/issue-3481 = b15860e merged ok, testing candidate = c9ce56a

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo replied Oct 14, 2014

fast-forwarding master to auto = c9ce56a

Please sign in to comment.
You can’t perform that action at this time.