Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-creation.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-creation.html b/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-creation.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5fa1f55ddd3f177589c3d9efa57d5398e85753d5 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-creation.html |
| @@ -0,0 +1,36 @@ |
| +<!DOCTYPE html> |
| +<script src=../../resources/testharness.js></script> |
| +<script src=../../resources/testharnessreport.js></script> |
| +<script> |
| + |
| +// This test verifies that DetectedObject can not be created |
| +test(function() { |
| + try{ |
| + var detectedObject = new DetectedObject(); |
| + }catch(e){ |
|
mcasas
2016/09/21 23:25:48
There seems to be way more instances of, e.g.
} ca
xianglu
2016/09/22 22:48:39
Done.
|
| + assert_true(e instanceof TypeError); |
| + } |
|
mcasas
2016/09/21 23:25:48
Consider using assert_throws, here and in a simila
xianglu
2016/09/22 22:48:40
Done.
|
| +}, 'new DetectedObject() should throw illegal constructor exception'); |
| + |
| +// This test verifies that Detector not can be created |
|
mcasas
2016/09/21 23:25:48
s/not can/can not/
xianglu
2016/09/22 22:48:39
Done.
|
| +test(function() { |
| + try{ |
| + var detector = new Detector(); |
| + }catch(e){ |
| + assert_true(e instanceof TypeError); |
| + } |
| +}, 'new Detector() should throw illegal constructor exception'); |
| + |
| +// This test verifies that DetectedFace can be created |
| +test(function() { |
| + var detectedFace = new DetectedFace(); |
| + assert_true(detectedFace instanceof DetectedFace); |
| +}, 'new DetectedFace()'); |
| + |
| +// This test verifies that FaceDetector can be created |
| +test(function() { |
| + var faceDetector = new FaceDetector(); |
| + assert_true(faceDetector instanceof FaceDetector); |
| +}, 'new FaceDetector()'); |
| + |
| +</script> |