1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
8 <p>Test appearances of input-speech-button.</p>
9 <div id="console"></div>
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];
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]) {
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);
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');
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');