tree: 3d3b6aa15591aa45a4ff1c9baa3b1c25fd6b83bf [path history] [tgz]
  1. resources/
  2. detected-boundingBox-read-only.https.html
  3. detected-postMessage.https.html
  4. detection-Blob.https.window.js
  5. detection-getSupportedFormats.https.html
  6. detection-HTMLCanvasElement.https.html
  7. detection-HTMLImageElement-empty-src.https.html
  8. detection-HTMLImageElement-zero-dimension-image.https.html
  9. detection-HTMLImageElement.https.html
  10. detection-HTMLVideoElement.https.html
  11. detection-ImageBitmap-closed.https.window.js
  12. detection-ImageBitmap.https.html
  13. detection-ImageData-detached.https.html
  14. detection-ImageData.https.html
  15. detection-on-worker.https.worker.js
  16. detection-options.https.html
  17. detection-security-test.https.html
  18. detection-SVGImageElement.https.window.js
  19. detection-VideoFrame.https.window.js
  20. detector-same-object.https.html
  21. idlharness.https.any.js
  22. META.yml
  23. README.md
  24. shapedetection-cross-origin.sub.https.html
shape-detection/README.md

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.