Update web-platform-tests to revision 30a08266e1951b16ab2587068de64041095bbc2f

This commit is contained in:
WPT Sync Bot 2020-04-08 08:19:32 +00:00
parent 7b5ec99d25
commit 19a2b8047d
185 changed files with 3858 additions and 329 deletions

View file

@ -4,7 +4,7 @@
<script src="resources/shapedetection-helpers.js"></script>
<script>
// These tests verify that detect()ed Detected{Barcode,Face}'s individual
// These tests verify that detect()ed Detected{Barcode,Face, Text}'s individual
// fields are [SameObject].
const imageDataTests =
[
@ -19,6 +19,12 @@ const imageDataTests =
mockTestName: "BarcodeDetectionTest",
detectionResultTest: CheckDetectedBarcodesSameObjects,
name: "Barcode - detect(ImageData), [SameObject]"
},
{
createDetector: () => { return new TextDetector(); },
mockTestName: "TextDetectionTest",
detectionResultTest: CheckDetectedTextBlocksSameObjects,
name: "Text - detect(ImageData), [SameObject]",
}
];
@ -52,4 +58,10 @@ function CheckDetectedBarcodesSameObjects(detectedBarcodes) {
assert_equals(detectedBarcodes[0].cornerPoints, detectedBarcodes[0].cornerPoints);
}
function CheckDetectedTextBlocksSameObjects(detectedTextBlocks) {
assert_greater_than(detectedTextBlocks.length, 0, "Number of textBlocks");
assert_equals(detectedTextBlocks[0].rawValue, detectedTextBlocks[0].rawValue);
assert_equals(detectedTextBlocks[0].boundingBox, detectedTextBlocks[0].boundingBox);
}
</script>