| Index: third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement.html
|
| diff --git a/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement.html b/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement.html
|
| index aafd5656a3ad3aa02c84af99c8e1b63df79c8d4e..92465e3a67b28d14322415e9b578453f99f63989 100644
|
| --- a/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement.html
|
| +++ b/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement.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 createTestForVideoElement = function(createDetector, mockReady,
|
| @@ -56,6 +57,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 HTMLVideoElement.
|
| // Use the mock mojo server implemented in mock-{barcode,face}detection.js.
|
| generate_tests(createTestForVideoElement, [
|
| @@ -70,6 +77,12 @@ generate_tests(createTestForVideoElement, [
|
| () => { return new BarcodeDetector(); },
|
| () => { return mockBarcodeDetectionReady; },
|
| BarcodeDetectorDetectionResultTest
|
| + ],
|
| + [
|
| + "Text",
|
| + () => { return new TextDetector(); },
|
| + () => { return mockTextDetectionReady; },
|
| + TextDetectorDetectionResultTest
|
| ]
|
| ]);
|
|
|
|
|