| Index: third_party/WebKit/LayoutTests/shapedetection/detection-ImageData.html
|
| diff --git a/third_party/WebKit/LayoutTests/shapedetection/detection-ImageData.html b/third_party/WebKit/LayoutTests/shapedetection/detection-ImageData.html
|
| index 45842afc1691aaba78ac141b09b779b25d9369f0..9f0b936101961997921f70ae415da24d83b8e1cf 100644
|
| --- a/third_party/WebKit/LayoutTests/shapedetection/detection-ImageData.html
|
| +++ b/third_party/WebKit/LayoutTests/shapedetection/detection-ImageData.html
|
| @@ -4,6 +4,7 @@
|
| <script src="../resources/mojo-helpers.js"></script>
|
| <script src="resources/mock-barcodedetection.js"></script>
|
| <script src="resources/mock-facedetection.js"></script>
|
| +<script src="resources/mock-textdetection.js"></script>
|
| <script>
|
|
|
| var createTestForImageData = function(createDetector, mockReady,
|
| @@ -57,6 +58,12 @@ function BarcodeDetectorDetectionResultTest(detectionResult, mock) {
|
| assert_equals(detectionResult[1].rawValue, "dogs", "barcode 2");
|
| }
|
|
|
| +function TextDetectorDetectionResultTest(detectionResult, mock) {
|
| + assert_equals(detectionResult.length, 2, "Number of textBlocks");
|
| + assert_equals(detectionResult[0].rawValue, "cats", "textBlock 1");
|
| + assert_equals(detectionResult[1].rawValue, "dogs", "textBlock 2");
|
| +}
|
| +
|
| // These tests verify that a Detector's detect() works on an ImageBitmap. Use
|
| // the mock mojo server implemented in mock-{barcode,face}detection.js.
|
| generate_tests(createTestForImageData, [
|
| @@ -72,6 +79,12 @@ generate_tests(createTestForImageData, [
|
| () => { return mockBarcodeDetectionReady; },
|
| BarcodeDetectorDetectionResultTest
|
| ],
|
| + [
|
| + "Text",
|
| + () => { return new TextDetector(); },
|
| + () => { return mockTextDetectionReady; },
|
| + TextDetectorDetectionResultTest
|
| + ]
|
| ]);
|
|
|
| </script>
|
|
|