1
0
Fork 0
firefox/testing/web-platform/tests/shape-detection
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00
..
resources Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detected-boundingBox-read-only.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detected-postMessage.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-Blob.https.window.js Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-getSupportedFormats.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-HTMLCanvasElement.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-HTMLImageElement-empty-src.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-HTMLImageElement-zero-dimension-image.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-HTMLImageElement.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-HTMLVideoElement.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-ImageBitmap-closed.https.window.js Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-ImageBitmap.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-ImageData-detached.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-ImageData.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-on-worker.https.worker.js Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-options.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-security-test.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-SVGImageElement.https.window.js Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detection-VideoFrame.https.window.js Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
detector-same-object.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
idlharness.https.any.js Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
META.yml Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
README.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
shapedetection-cross-origin.sub.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
single-barcode-detection.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
single-face-detection.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
single-text-detection.https.html Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00

The shapedetection-helpers.js tests require implementations of the FaceDetectionTest, BarcodeDetectionTest and TextDetectionTest interfaces, which should emulate platform shape detection backends.

The FaceDetectionTest interface is defined as:

  class FaceDetectionTest {
    async initialize();  // Sets up the testing environment.
    async reset(); // Frees the resources.
    MockFaceDetectionProvider(); //Returns `MockFaceDetectionProvider` interface.
  };

  class MockFaceDetectionProvider {
    getFrameData(); //Gets frame data of detection result.
    getMaxDetectedFaces(); //Gets value of `maxDetectedFaces` in `FaceDetector` constructor
    getFastMode(); //Gets value of `fastMode` in `FaceDetector` constructor
  };

The Chromium implementation of the FaceDetectionTest interface is located in mock-facedetection.js.

The BarcodeDetectionTest interface is defined as:

  class BarcodeDetectionTest {
    async initialize();  // Sets up the testing environment.
    async reset(); // Frees the resources.
    MockBarcodeDetectionProvider(); //Returns `MockBarcodeDetectionProvider` interface.
  };

  class MockBarcodeDetectionProvider {
    async enumerateSupportedFormats(); //Enumerates supported formats
    getFrameData(); //Gets frame data of detection result.
    getFormats(); //Gets value of `formats` in `BarcodeDetector` constructor
    simulateNoImplementation(); // simulate a 'no implementation available' case
  };

The Chromium implementation of the BarcodeDetectionTest interface is located in mock-barcodedetection.js.

The TextDetectionTest interface is defined as:

  class TextDetectionTest {
    async initialize();  // Sets up the testing environment.
    async reset(); // Frees the resources.
    MockTextDetection(); //Returns `MockTextDetection` interface.
  };

  class MockTextDetection {
    getFrameData(); //Gets frame data of detection result.
  };

The Chromium implementation of the TextDetectionTest interface is located in mock-textdetection.js.

Other browser vendors should provide their own implementations of the FaceDetectionTest, BarcodeDetectionTest and TextDetectionTest interfaces.