tree: 981fff802e40babd8b1e5cce653ea1a136840eb8 [path history] [tgz]
  1. resources/
  2. detected-boundingBox-read-only.html
  3. detection-getSupportedFormats.html
  4. detection-HTMLCanvasElement.html
  5. detection-HTMLImageElement.html
  6. detection-HTMLVideoElement-invalid-state.html
  7. detection-HTMLVideoElement.html
  8. detection-ImageBitmap.html
  9. detection-ImageData-detached.html
  10. detection-ImageData.html
  11. detection-on-worker.worker.js
  12. detection-options.html
  13. detection-security-test.html
  14. detector-same-object.html
  15. idlharness.any-expected.txt
  16. idlharness.any.js
  17. idlharness.any.worker-expected.txt
  18. META.yml
  19. README.md
  20. shapedetection-cross-origin.sub.html
  21. shapedetection-empty-input.html
third_party/blink/web_tests/external/wpt/shape-detection/README.md

The shapedetection-helpers.js tests require implementations of the FaceDetectionTest and BarcodeDetectionTest 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
  };

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

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