Index: content/test/data/media/webrtc_test_utilities.js |
diff --git a/content/test/data/media/webrtc_test_utilities.js b/content/test/data/media/webrtc_test_utilities.js |
index 6e9cde639dcdf5299182c84cb4a785eca4391d13..02aac59b325d27b8711e000f03a5027db4f52243 100644 |
--- a/content/test/data/media/webrtc_test_utilities.js |
+++ b/content/test/data/media/webrtc_test_utilities.js |
@@ -187,7 +187,9 @@ function isVideoPlaying(pixels, previousPixels) { |
function isVideoBlack(pixels) { |
for (var i = 0; i < pixels.length; i++) { |
// |pixels| is in RGBA. Ignore the alpha channel. |
- if (pixels[i] != 0 && (i + 1) % 4 != 0) { |
+ // We allow it to be off by 1, to account for rounding errors in YUV |
+ // conversion. |
+ if (pixels[i] != 0 && pixels[i] != 1 && (i + 1) % 4 != 0) { |
return false; |
} |
} |