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

Side by Side Diff: content/test/data/media/face_detection_test.html

Issue 2711893003: Shape detection: moar content_browsertests (face, qr/barcode) (Closed)
Patch Set: Make initialization of std::vector<std::vector<float>> explicit to avoid 'error: chosen constructor… Created 3 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 unified diff | Download patch
« no previous file with comments | « content/test/BUILD.gn ('k') | content/test/data/media/shape_detection_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 <html>
3 <head>
4 </head>
5
6 <body>
7 <img id="myImage">
8 </body>
9
10 <script>
11 var img = document.getElementById("myImage");
12
13 function detectFacesOnImageUrl(url) {
14 img.src = url;
15 img.onload = function() {
16 var detector = new FaceDetector();
17 var results = "";
18 detector.detect(img)
19 .then(detectedFaces => {
20 for (var i = 0; i < detectedFaces.length; i++) {
21 var boundingBox = detectedFaces[i].boundingBox;
22 var result = boundingBox.x + "," + boundingBox.y + "," +
23 boundingBox.width + "," + boundingBox.height;
24 results += result + "#";
25 }
26 window.domAutomationController.send(results);
27 })
28 .catch(error => {
29 error = new Error("Error during detection:" + error.message);
30 window.domAutomationController.send(error.message);
31 });
32 }
33 }
34 </script>
35 </html>
OLDNEW
« no previous file with comments | « content/test/BUILD.gn ('k') | content/test/data/media/shape_detection_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698