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

@ -17,7 +17,13 @@ const imageBitmapTests =
createDetector: () => { return new BarcodeDetector(); },
mockTestName: "BarcodeDetectionTest",
detectionResultTest: BarcodeDetectorDetectionResultTest,
name: "Barcode - detect(ImageBitmap)",
name: "Barcode - detect(ImageBitmap)"
},
{
createDetector: () => { return new TextDetector(); },
mockTestName: "TextDetectionTest",
detectionResultTest: TextDetectorDetectionResultTest,
name: "Text - detect(ImageBitmap)",
}
];
@ -51,4 +57,10 @@ function BarcodeDetectorDetectionResultTest(detectionResult, mockTest) {
assert_equals(detectionResult[1].format, "code_128", "barcode 2 format");
}
function TextDetectorDetectionResultTest(detectionResult, mockTest) {
assert_equals(detectionResult.length, 2, "Number of textBlocks");
assert_equals(detectionResult[0].rawValue, "cats", "textBlock 1");
assert_equals(detectionResult[1].rawValue, "dogs", "textBlock 2");
}
</script>