Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: content/test/data/media/getusermedia.html

Issue 216353003: Allow #pixelsX = #pixelsY +-1 to fix WebRtcGetUserMediaBrowserTest.TestGetUserMediaAspectX (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/media/getusermedia.html
diff --git a/content/test/data/media/getusermedia.html b/content/test/data/media/getusermedia.html
index ddd0f0906b98f295dc7921aae51a08ca1a012176..7da11753b19c1a0b528772aa2cfce73275d93165 100644
--- a/content/test/data/media/getusermedia.html
+++ b/content/test/data/media/getusermedia.html
@@ -340,7 +340,7 @@
}
// Walk vertically counting light green pixels.
for (var y = 0; y < aperture; ++y) {
- if (pixels.data[4 * y * aperture + 1] != 135)
+ if (pixels.data[4 * y * aperture + 1] != COLOR_BACKGROUND_GREEN)
lightGreenPixelsY++;
}
if (lightGreenPixelsX > maxLightGreenPixelsX)
@@ -350,10 +350,10 @@
if (++iterations > maxIterations) {
clearInterval(detectorInterval);
- // Allow maxLightGreenPixelsY = maxLightGreenPixelsX -1 due to sub pixel
- // rendering on Mac.
- if ((maxLightGreenPixelsY != maxLightGreenPixelsX &&
- maxLightGreenPixelsY != maxLightGreenPixelsX -1) ||
+ // Allow maxLightGreenPixelsY = maxLightGreenPixelsX +-1 due to
+ // possible subpixel rendering on Mac and Android.
+ if (maxLightGreenPixelsY > maxLightGreenPixelsX + 1 ||
+ maxLightGreenPixelsY < maxLightGreenPixelsX -1 ||
maxLightGreenPixelsY == 0 ||
maxLightGreenPixelsX == width || maxLightGreenPixelsY == height) {
failTest("Aspect ratio corrupted. X " + maxLightGreenPixelsX +
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698