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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-empty-input.html

Issue 2448193002: ShapeDetection: support CanvasImageSource as detect() source (Closed)
Patch Set: esprehn@ comments and specific LayoutTest for empty HTMLImageElement 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src=../../resources/testharness.js></script>
3 <script src=../../resources/testharnessreport.js></script>
4 <script>
5
6 // This test verifies FaceDetector.detect() with an empty HTMLImageElement.
7 async_test(function(t) {
8 var image = new Image();
9 var faceDetector = new FaceDetector();
10 var tryFaceDetection = function() {
11 faceDetector.detect(image)
12 .then(faceDetectionResult => {
13 assert_equals(faceDetectionResult.length, 0);
14 t.done();
15 })
16 .catch(error => {
17 assert_unreached("detect() should not reject: " + error)
18 });
19 };
20 image.onload = tryFaceDetection;
21 image.onerror = tryFaceDetection;
22 image.src = "";
23 }, "FaceDetector should resolve empty images with empty results.");
24
25 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698