tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / fast / speech / input-appearance-speechbutton.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <style>
5 </style>
6 </head>
7 <body>
8 <p>Test appearances of input-speech-button.</p>
9 <div id="console"></div>
10
11 <script>
12 var parent = document.createElement('div');
13 document.body.appendChild(parent);
14 parent.innerHTML = '<table><tr><td id=p1><td id=p2><td id=p3></tr></table>';
15 var cells = ["", "", ""];
16 var maxCellCount = [7, 5, 5];
17 var cellCount = 0;
18 var index = 0;
19 for (var size = 8; size < 24; size++) {
20     cells[index] += '<input style="font-size:' + size + 'px" value="A quick brown fox jumps over the lazy dog"><br>'
21         + '<input style="font-size:' + size + 'px" value="A quick brown fox jumps over the lazy dog" x-webkit-speech><br>';
22     if (++cellCount >= maxCellCount[index]) {
23         ++index;
24         cellCount = 0;
25     }
26 }
27 for (var i = 0; i < cells.length; ++i) {
28   var div = document.createElement('div');
29   div.innerHTML = cells[i];
30   document.getElementById('p' + (i + 1)).appendChild(div);
31 }
32
33 // Also check that setting the attribute from script renders similarly.
34 var inputWithAttribute = document.createElement('input');
35 document.body.appendChild(inputWithAttribute);
36 inputWithAttribute.setAttribute('x-webkit-speech', 'x-webkit-speech');
37
38 // Similar to above, check if removing the attribute with script renders an empty input field.
39 var inputWithoutAttribute = document.createElement('input');
40 inputWithoutAttribute.setAttribute('x-webkit-speech', 'x-webkit-speech');
41 document.body.appendChild(inputWithoutAttribute);
42 inputWithoutAttribute.removeAttribute('x-webkit-speech');
43
44 </script>
45 </body>
46 </html>