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

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

Issue 2502723002: ShapeDetection: implement barcode detection, blink part (Closed)
Patch Set: haraken@ 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-HTMLImageElement.html
diff --git a/third_party/WebKit/LayoutTests/shapedetection/detectface-HTMLImageElement.html b/third_party/WebKit/LayoutTests/shapedetection/detectface-HTMLImageElement.html
deleted file mode 100644
index e94e1eb83ca004b32384618d156fc04d6f827682..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/shapedetection/detectface-HTMLImageElement.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="../resources/mojo-helpers.js"></script>
-<script src="resources/mock-shapedetection.js"></script>
-<body>
-<img id='img' src='../media/content/greenbox.png'/>
-</body>
-<script>
-
-// This test verifies that FaceDetector.detect works on an HTMLImageElement.
-// Uses the mock mojo server implemented in mock-shapedetection.js.
-async_test(function(t) {
- var img = document.getElementById("img");
-
- var theMock = null;
- mockShapeDetectionReady
- .then(mock => {
- theMock = mock;
- return new FaceDetector();
- })
- .catch(error => {
- assert_unreached("Error creating MockShapeDetection: " + error);
- })
- .then(detector => {
- return detector.detect(img);
- })
- .then(faceDetectionResult => {
- const imageReceivedByMock = theMock.getFrameData();
- assert_equals(imageReceivedByMock.byteLength, 2500, "Image length");
- const GREEN_PIXEL = 0xFF00FF00;
- assert_equals(imageReceivedByMock[0], GREEN_PIXEL, "Pixel color");
- assert_equals(faceDetectionResult.length, 3, "Number of faces");
- t.done();
- })
- .catch(error => {
- assert_unreached("Error during detect(img): " + error);
- });
-
-}, 'exercises the ShapeDetection API detect(HTMLImageElement)');
-
-</script>

Powered by Google App Engine
This is Rietveld 408576698