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

Side by Side Diff: third_party/WebKit/LayoutTests/shapedetection/detection-ImageBitmap.html

Issue 2553343003: ShapeDetection: add support for all CanvasImageSource input types (Closed)
Patch Set: Support case for peekPixels() and isImageBitmap() Created 4 years 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="../resources/mojo-helpers.js"></script> 4 <script src="../resources/mojo-helpers.js"></script>
5 <script src="resources/mock-barcodedetection.js"></script> 5 <script src="resources/mock-barcodedetection.js"></script>
6 <script src="resources/mock-facedetection.js"></script> 6 <script src="resources/mock-facedetection.js"></script>
7 <script> 7 <script>
8 8
9 var createTestForImageBitmap = function(detectorName, mockReady, 9 var createTestForImageBitmap = function(detectorName, mockReady,
10 detectionResultTest) { 10 detectionResultTest) {
(...skipping 11 matching lines...) Expand all
22 }) 22 })
23 .catch(error => { 23 .catch(error => {
24 assert_unreached('createImageBitmap() error: ' + error); 24 assert_unreached('createImageBitmap() error: ' + error);
25 }) 25 })
26 .then(mock => { 26 .then(mock => {
27 theMock = mock; 27 theMock = mock;
28 var detector = eval("new " + detectorName + "();"); 28 var detector = eval("new " + detectorName + "();");
29 return detector; 29 return detector;
30 }) 30 })
31 .catch(error => { 31 .catch(error => {
32 assert_unreached("Error creating MockFaceDetection: " + error); 32 assert_unreached("Error creating Mock Detector: " + error);
33 }) 33 })
34 .then(detector => { 34 .then(detector => {
35 return detector.detect(theImageBitmap); 35 return detector.detect(theImageBitmap);
36 }) 36 })
37 .then(detectionResult => { 37 .then(detectionResult => {
38 detectionResultTest(detectionResult, theMock); 38 detectionResultTest(detectionResult, theMock);
39 t.done(); 39 t.done();
40 }) 40 })
41 .catch(error => { 41 .catch(error => {
42 assert_unreached("Error during detect(img): " + error); 42 assert_unreached("Error during detect(img): " + error);
(...skipping 28 matching lines...) Expand all
71 ], 71 ],
72 [ 72 [
73 "Barcode", 73 "Barcode",
74 "BarcodeDetector", 74 "BarcodeDetector",
75 () => { return mockBarcodeDetectionReady; }, 75 () => { return mockBarcodeDetectionReady; },
76 BarcodeDetectorDetectionResultTest 76 BarcodeDetectorDetectionResultTest
77 ] 77 ]
78 ]); 78 ]);
79 79
80 </script> 80 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698