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

Unified Diff: third_party/WebKit/LayoutTests/shapedetection/detectface-ImageBitmap.html

Issue 2455973007: FaceDetection: add support for <video> input (Closed)
Patch Set: xianglu@ comments Created 4 years, 1 month 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
Index: third_party/WebKit/LayoutTests/shapedetection/detectface-ImageBitmap.html
diff --git a/third_party/WebKit/LayoutTests/shapedetection/detectface-ImageBitmap.html b/third_party/WebKit/LayoutTests/shapedetection/detectface-ImageBitmap.html
index 28f60adbee29286137a04eb633104a676fe288c3..b2c25cd333787c2cac2ec14b83387a126f70ba7d 100644
--- a/third_party/WebKit/LayoutTests/shapedetection/detectface-ImageBitmap.html
+++ b/third_party/WebKit/LayoutTests/shapedetection/detectface-ImageBitmap.html
@@ -5,8 +5,8 @@
<script src="resources/mock-shapedetection.js"></script>
<script>
-// This test verifies that FaceDetector can detect(ImageBitmap). Uses the mock
-// mojo server under mock-shapedetection.js.
+// This test verifies that FaceDetector.detect works on an ImageBitmap.
+// Uses the mock mojo server implemented in mock-shapedetection.js.
async_test(function(t) {
var img = new Image();
@@ -34,11 +34,10 @@ async_test(function(t) {
})
.then(faceDetectionResult => {
const imageReceivedByMock = theMock.getFrameData();
- assert_equals(imageReceivedByMock.byteLength, 2500,
- "imageReceivedByMock.byteLength");
+ assert_equals(imageReceivedByMock.byteLength, 2500,"Image length");
const GREEN_PIXEL = 0xFF00FF00;
- assert_equals(imageReceivedByMock[0], GREEN_PIXEL, "pixel must be green");
- assert_equals(faceDetectionResult.length, 3, "faceDetectionResult.length");
+ assert_equals(imageReceivedByMock[0], GREEN_PIXEL, "Pixel color");
+ assert_equals(faceDetectionResult.length, 3, "Number of faces");
t.done();
})
.catch(error => {

Powered by Google App Engine
This is Rietveld 408576698