Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-empty-input.html

Issue 2626743002: Shape Detection: resolve with empty results if any input element's dimension is zero (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-empty-input.html
diff --git a/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-empty-input.html b/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-empty-input.html
index 73b2ded615144383d1423b45dd673ae486c56ebb..c773bbf6b8e6d7d20e761628eab2b1cc8125d046 100644
--- a/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-empty-input.html
+++ b/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-empty-input.html
@@ -3,11 +3,12 @@
<script src=../../resources/testharnessreport.js></script>
<script>
-// This test verifies FaceDetector.detect() with an empty HTMLImageElement.
-var createTestForEmptyInput = function(detectorName) {
+// This test verifies *Detector.detect() returns an empty list when fed with
+// an empty HTMLImageElement.
+var createTestForEmptyInput = function(createDetector) {
async_test(function(t) {
var image = new Image();
- var detector = eval("new " + detectorName + "();");
+ var detector = createDetector();
var tryDetection = function() {
detector.detect(image)
.then(detectionResult => {
@@ -25,9 +26,9 @@ var createTestForEmptyInput = function(detectorName) {
};
generate_tests(createTestForEmptyInput, [
- [ "Face", "FaceDetector" ],
- [ "Barcode", "BarcodeDetector" ],
- [ "Text", "TextDetector" ]
+ [ "Face", () => { return new FaceDetector(); } ],
+ [ "Barcode", () => { return new BarcodeDetector(); } ],
+ [ "Text", () => { return new TextDetector(); } ]
]);
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698