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

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

Issue 2360783003: shapedetection module: Introduce basic structure for face detection (Closed)
Patch Set: Created 4 years, 3 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
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>

Powered by Google App Engine
This is Rietveld 408576698