blob: 809a051bba3d9b3500d7a0ea9ed980dc4062c048 [file] [log] [blame]
<html>
<head>
<title>HTML5 Input Types for Text Controls</title>
<style>
body {font-size: 60%;}
</style>
<script type="text/javascript">
function test()
{
if (!window.testRunner)
return;
const items = [ "email", "password", "tel", "text" , "url" ];
var result = "";
var success = true;
for (i = 0; i < items.length; ++i)
{
var expectedTypeName = items[i];
var actualTypeName = document.getElementById(expectedTypeName).type;
success = (actualTypeName == expectedTypeName);
if (!success)
result += "Expected: \"" + expectedTypeName + "\" for \"" + actualTypeName + "\"<br>";
}
if (success)
result = "Success.";
document.getElementById('result').innerHTML = result;
testRunner.dumpAsText();
}
</script>
</head>
<body onload="test()">
A<input type="email" id="email">
B<input type="number" id="number">
C<input type="password" id="password">
D<input type="tel" id="tel">
E<input type="text" id="text">
F<input type="url" id="url">
<div id="result">
</body>
</html>