Index: content/test/data/media/depth_stream_test_utilities.js |
diff --git a/content/test/data/media/depth_stream_test_utilities.js b/content/test/data/media/depth_stream_test_utilities.js |
index 4350c30d068fc78aedb6dabe6cad386922c0a849..c316abac4efc1a2e519e3d8aafe2ba222d2f2d03 100644 |
--- a/content/test/data/media/depth_stream_test_utilities.js |
+++ b/content/test/data/media/depth_stream_test_utilities.js |
@@ -54,22 +54,11 @@ function verifyPixels( |
[height - 1, width - 1], |
[height - 3, width - 3]]; |
- // Same value is expected for all color components. |
- if (data[0] != data[1] || data[0] != data[2]) { |
- return Promise.reject(test_name + ": values " + data[0] + ", " + data[1] + |
- ", " + data[2] + " differ at top left."); |
- } |
- |
// Calculate all reference points based on top left and compare. |
for (var j = 0; j < rowsColumnsToCheck.length; ++j) { |
var row = rowsColumnsToCheck[j][0]; |
var column = rowsColumnsToCheck[j][1]; |
var i = (width * row + column) * 4; |
- if (data[i] != data[i + 1] || data[i] != data[i + 2]) { |
- return Promise.reject(test_name + ": values " + data[i] + ", " + |
- data[i + 1] + ", " + data[i + 2] + |
- " differ at index " + i); |
- } |
var calculated = (data[0] + wrap_around + |
step * ((flip_y ? -row : row) + column)) % wrap_around; |
if (Math.abs(calculated - data[i]) > tolerance) { |
@@ -82,33 +71,3 @@ function verifyPixels( |
} |
return true; |
} |
- |
-// Although RED texture is bound to framebuffer, we read RGBA pixels to |data|. |
-// Value at point (row, column) is calculated as |
-// (top_left_value + (row + column) * step) % wrap_around. wrap_around is 255 |
-// (for Uint8) or 1.0 for float. See FakeVideoCaptureDevice for details. |
-function verifyPixelsRed( |
- data, width, height, flip_y, step, wrap_around, tolerance, test_name) { |
- var rowsColumnsToCheck = [[1, 1], |
- [0, width - 1], |
- [height - 1, 0], |
- [height - 1, width - 1], |
- [height - 3, width - 3]]; |
- |
- // Calculate all reference points based on top left and compare. |
- for (var j = 0; j < rowsColumnsToCheck.length; ++j) { |
- var row = rowsColumnsToCheck[j][0]; |
- var column = rowsColumnsToCheck[j][1]; |
- var i = (width * row + column) * 4; |
- var calculated = (data[0] + wrap_around + |
- step * ((flip_y ? -row : row) + column)) % wrap_around; |
- if (Math.abs(calculated - data[i]) > tolerance) { |
- return Promise.reject(test_name + ": reference value " + data[i] + |
- " differs from calculated: " + calculated + |
- " at index (row, column) " + i + " (" + row + ", " + column + |
- "). TopLeft value:" + data[0] + ", step:" + step + ", flip_y:" + |
- flip_y); |
- } |
- } |
- return true; |
-} |