OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <link rel="stylesheet" href="../../fast/js/resources/js-test-style.css"> | 4 <link rel="stylesheet" href="../../fast/js/resources/js-test-style.css"> |
5 <script src="../../fast/js/resources/js-test-pre.js"></script> | 5 <script src="../../fast/js/resources/js-test-pre.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <p>Tests for value sanitization algorithm.</p> | 8 <p>Tests for value sanitization algorithm.</p> |
9 <div id="console"></div> | 9 <div id="console"></div> |
10 <script> | 10 <script> |
11 var input; | 11 var input; |
12 | 12 |
13 debug(''); | 13 debug(''); |
| 14 debug('Email with multiple:'); |
| 15 input = document.createElement('input'); |
| 16 input.multiple = true; |
| 17 input.type = 'email'; |
| 18 input.setAttribute('value', ' tkent@chromium.org, tkent@example.!!! '); |
| 19 shouldBe('input.value', '"tkent@chromium.org,tkent@example.!!!"'); |
| 20 debug('Email without multiple:'); |
| 21 input = document.createElement('input'); |
| 22 input.multiple = false; |
| 23 input.type = 'email'; |
| 24 input.setAttribute('value', ' tkent@chromium.org, tkent@example.*** \r\n'); |
| 25 shouldBe('input.value', '" tkent@chromium.org, tkent@example.*** "'); |
| 26 |
| 27 debug(''); |
14 debug('Number:'); | 28 debug('Number:'); |
15 input = document.createElement('input'); | 29 input = document.createElement('input'); |
16 input.setAttribute('value', '65536'); | 30 input.setAttribute('value', '65536'); |
17 input.type = 'number'; | 31 input.type = 'number'; |
18 shouldBe('input.value', '"65536"'); | 32 shouldBe('input.value', '"65536"'); |
19 shouldBe('input.value = "256"; input.value', '"256"'); | 33 shouldBe('input.value = "256"; input.value', '"256"'); |
20 shouldBe('input.value = ""; input.value', '""'); | 34 shouldBe('input.value = ""; input.value', '""'); |
21 | 35 |
22 | 36 |
23 debug(''); | 37 debug(''); |
(...skipping 18 matching lines...) Expand all Loading... |
42 // FIXME: Add more sanitization tests. | 56 // FIXME: Add more sanitization tests. |
43 // https://bugs.webkit.org/show_bug.cgi?id=37024 | 57 // https://bugs.webkit.org/show_bug.cgi?id=37024 |
44 | 58 |
45 container.innerHTML = ''; | 59 container.innerHTML = ''; |
46 var successfullyParsed = true; | 60 var successfullyParsed = true; |
47 | 61 |
48 </script> | 62 </script> |
49 <script src="../../fast/js/resources/js-test-post.js"></script> | 63 <script src="../../fast/js/resources/js-test-post.js"></script> |
50 </body> | 64 </body> |
51 </html> | 65 </html> |
OLD | NEW |