|
4 | 4 | <title>dom_test</title> |
5 | 5 | <script src="test_bootstrap.js"></script> |
6 | 6 | <script type="text/javascript"> |
| 7 | + goog.require('bot.dom'); |
7 | 8 | goog.require('bot.dom.core'); |
8 | 9 | goog.require('bot.userAgent'); |
9 | 10 | goog.require('goog.testing.jsunit'); |
10 | 11 | goog.require('goog.userAgent'); |
11 | 12 | </script> |
12 | 13 | <body> |
13 | 14 | <script type="text/javascript"> |
| 15 | + var INPUT_IDS = ['text', 'search', 'tel', 'url', 'email', 'password', 'number', |
| 16 | + 'range', 'date', 'month', 'week', 'time', 'datetime-local', 'color']; |
| 17 | + |
14 | 18 | function testStandardizeStyleAttributeReturnsIdenticalStringWithLowercasedPropertyNames() { |
15 | 19 | var toTest = [ |
16 | 20 | {input: "Left: 0px; Text-align: center;", |
|
68 | 72 | bot.dom.core.standardizeStyleAttribute_(toTest[i].input)); |
69 | 73 | } |
70 | 74 | } |
| 75 | + |
| 76 | + function testEditableFields() { |
| 77 | + for (var i = 0; i < INPUT_IDS.length; i++) { |
| 78 | + var inputBox = document.getElementById(INPUT_IDS[i]); |
| 79 | + assertTrue(INPUT_IDS[i], bot.dom.isEditable(inputBox)); |
| 80 | + } |
| 81 | + } |
71 | 82 | </script> |
| 83 | +<form action="" onsubmit="return false;"> |
| 84 | + <input type="text" id="text"/> |
| 85 | + <input type="search" id="search"/> |
| 86 | + <input type="tel" id="tel"/> |
| 87 | + <input type="url" id="url"/> |
| 88 | + <input type="email" id="email"/> |
| 89 | + <input type="password" id="password"/> |
| 90 | + <input type="number" id="number"/> |
| 91 | + <input type="range" id="range"/> |
| 92 | + <input type="date" id="date"/> |
| 93 | + <input type="month" id="month"/> |
| 94 | + <input type="week" id="week"/> |
| 95 | + <input type="time" id="time"/> |
| 96 | + <input type="datetime-local" id="datetime-local"/> |
| 97 | + <input type="color" id="color"/> |
| 98 | +</form> |
72 | 99 | </body> |
73 | 100 | </html> |
74 | 101 |
|
0 commit comments