gecko-dev/testing/web-platform/tests/shape-detection
Wanming Lin 39d6e2da87 Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly
Automatic update from web-platform-tests
Upstream shapedetection tests to WPT

Moved shapedetection tests under
third_party/blink/web_tests/shapedetection/,
third_party/blink/web_tests/fast/shapedetection/,
third_party/blink/web_tests/http/tests/shapedetection/,
to third_party/blink/web_tests/external/wpt/shape-detection/, excludes
the Text detection part as which is still a sister informative
specification of Shape Detection.

Copyed third_party/blink/web_tests/shapedetection/resources/big-buffer-helpers.js
to wpt/shape-detection/resources/shapedetection-helpers.js and extended it by
adding a wrapper promise test, detection_test.

Moved third_party/blink/web_tests/shapedetection/resources/mock-barcodedetection.js
and third_party/blink/web_tests/shapedetection/resources/mock-facedetection.js
to wpt/resources/chromium/

Used the testharness from wpt/ and rewrited tests to remove use of
generate_tests as which is discouraged in wpt.

Rewrite detection-on-worker.html as detection-on-worker.worker.js by using
wpt preferred worker test framework.

Rename detection-support.html as detection-getSupportedFormats.html as *-support.html
is treated as support file rather than test file in wpt.

No new tests have been added.

BUG=932382

Change-Id: I321e7b9f986f407b83325bb4c6bdc366c9769264
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1510754
Commit-Queue: Wanming Lin <wanming.lin@intel.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641504}

--

wpt-commits: 7183ea12000b9edaac650b1211c35aa6e0abba88
wpt-pr: 15761
2019-04-24 11:18:03 +01:00
..
resources Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
detected-boundingBox-read-only.html Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
detection-getSupportedFormats.html Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
detection-HTMLCanvasElement.html Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
detection-HTMLImageElement.html Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
detection-HTMLVideoElement.html Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
detection-ImageBitmap.html Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
detection-ImageData.html Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
detection-on-worker.worker.js Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
detection-options.html Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
detection-security-test.html Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
detector-same-object.html Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
idlharness.any.js Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
META.yml
README.md Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
shapedetection-cross-origin.sub.html Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
shapedetection-empty-input.html Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00

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.