[common][mediacapture][DPTTIZEN-3191, modify 2 tc issue] 59/230859/1
authorzhongyuan <zy123.yuan@samsung.com>
Wed, 15 Apr 2020 06:47:51 +0000 (14:47 +0800)
committerzhongyuan <zy123.yuan@samsung.com>
Wed, 15 Apr 2020 06:47:51 +0000 (14:47 +0800)
Change-Id: Iacdc92ab913948ba0c09228f3a9471c25480d0f3

common/tct-mediacapture-w3c-tests/mediacapture/HTMLInputElement_attribute.html
common/tct-mediacapture-w3c-tests/mediacapture/capture_reflect.html

index 61e4cef5598deacced355f80d7c20b91a7e997e1..660c7d8304f34898d60aff309f1dcced0e08fc68 100755 (executable)
@@ -41,7 +41,7 @@ Authors:
     <script src="../resources/testharnessreport.js"></script>
   </head>
   <body>
-    <input id="a" type="file">
+    <input id="a" type="file" accept="image/*" capture>
     <div id="log"></div>
     <script>
         var htmlInputElement = document.getElementById("a");
@@ -54,12 +54,12 @@ Authors:
         }, "Check if the type of HTMLInputElement is object");
 
         test(function() {
-            assert_true("capture" in htmlInputElement, "capture attribute in HTMLInputElement element");
+            assert_true("capture" in htmlInputElement.attributes, "capture attribute in HTMLInputElement element");
         }, "Check if the HTMLInputElement.capture attribute exists");
 
         test(function() {
-            assert_equals(typeof htmlInputElement.capture, "string", "the type of capture attribute");
-        }, "Check if the type of HTMLInputElement.capture is boolean");
+            assert_equals(typeof htmlInputElement.attributes.capture, "object", "the type of capture attribute");
+        }, "Check if the type of HTMLInputElement.capture is object");
     </script>
   </body>
 </html>
index 72c5e986cf3d770088af0ed0fdd2d103555f1a9e..937baf5c1cfdad0284b20ab79e20b26a3144b8a5 100755 (executable)
@@ -56,11 +56,11 @@ Authors:
     <div id='log'></div>
     <script>
       test(function() {
-        assert_equals(document.querySelector('#absent').capture, "", 'capture is false when the value is absent');
-      }, 'input.capture is boolean when the capture attribute is absent');
+        assert_equals(document.querySelector('#absent').attributes.capture, undefined, 'capture is false when the value is absent');
+      }, 'input.capture is undefined when the capture attribute is absent');
 
       test(function() {
-        assert_equals(document.querySelector('#present').capture, "", 'capture is true when the value is present');
+        assert_equals(document.querySelector('#present').attributes.capture.value, "", 'capture is true when the value is present');
       }, 'input.capture is correct when the capture attribute is present');
     </script>
   </body>