On Github ibelem / ttwf-sz-belem
Belem Zhang, Intel
User agents must not allow the user to set the value to a non-empty string that is not a valid date string.
User agents must not allow the user to set the value to a non-empty string that is not a valid date string.
User agents must not allow the user to set the value to a non-empty string that is not a valid date string.
User agents must not allow the user to set the value to a non-empty string that is not a valid date string.
User agents must not allow the user to set the value to a non-empty string that is not a valid date string.
User agents must not allow the user to set the value to a non-empty string that is not a valid date string.
<input id="invalid" type="date" value="invalid_value"> <script> console.log(document.querySelector("#invalid").value == ""); </script>
宗旨:以中文(简体或繁体)协调及讨论 HTML5 规范以及 HTML5 相关的规范,收集这些规范的评论与问题,以及在这些规范中文环境下的特殊测试案例。
加入:寄一封标题为「subscribe」的信至 public-html-ig-zh-request@w3.org
http://www.w3.org/html/ig/zh/testharness.js and testharnessreport.js
<script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script>
test(test_function, name, properties)
test(test_function, name, properties)
test(function() { assert_true(true) }, name, properties)
test(test_function, name, properties)
test(function() { assert_true(true) }, "test_name", properties)
test(test_function, name, properties)
test(function() { assert_true(true) }, "test_name", { timeout:1000, assert: 'This should always be true.' } )
assert_equals(actual, expected, description)
assert_equals(getData("myElement"), 100, "Expected value for myElement is 100")
<!DOCTYPE html> <meta charset='utf-8'> <title>[Test Area]: [Title/Scope of Test]</title> <link rel="author" title="[Name of Author]" href="mailto: or http://.."> <link rel="help" href="http://www.w3.org/TR/[link to tested section]">
... <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script>
<div id="myDiv" style="display: none"> <input id="invalid_value" type="date" value="invalid-date"> </div> <div id="log"></div> <script> test(function() { assert_equals(document.getElementById("invalid_value").value, ""); }, "User agents must not allow the user to set the value to" + " a non-empty string that is not a valid date string."); </script>
<!DOCTYPE html> <meta charset='utf-8'> <title>HTML Test: Forms date state</title> <link rel="author" title="your name" href="mailto: yourmail@address.com"> <link rel="help" href="http://www.w3.org/html/wg/drafts/html/CR/forms.html#date-state-(type=date)"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <div id="myDiv" style="display: none"> <input id="invalid_value" type="date" value="invalid-date"> </div> <div id="log"></div> <script> test(function() { assert_equals(document.getElementById("invalid_value").value, ""); }, "User agents must not allow the user to set the value to" + " a non-empty string that is not a valid date string."); </script>
You have completed a W3C JavaScript Test.
Q: Which of the path to the testharness scripts is expected?
Q: Which of the path to the testharness scripts is expected?