OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <style> |
| 3 <include src="../../../../ui/webui/resources/css/i18n_process.css"> |
| 4 </style> |
| 5 <h1 i18n-content="buy"></h1> |
| 6 <span i18n-values=".innerHTML:link"></span> |
| 7 <script> |
| 8 |
| 9 function testI18nProcess_NbspPlaceholder() { |
| 10 var h1 = document.querySelector('h1'); |
| 11 var span = document.querySelector('span'); |
| 12 |
| 13 assertFalse(document.documentElement.hasAttribute('i18n-processed')); |
| 14 assertEquals('', h1.textContent); |
| 15 assertEquals('', span.textContent); |
| 16 |
| 17 /* We can't check that the non-breaking space hack actually works because it |
| 18 * uses :psuedo-elements that are inaccessible to the DOM. Let's just check |
| 19 * that they're not auto-collapsed. */ |
| 20 assertNotEqual(0, h1.offsetHeight); |
| 21 assertNotEqual(0, span.offsetHeight); |
| 22 |
| 23 h1.removeAttribute('i18n-content'); |
| 24 assertEquals(0, h1.offsetHeight); |
| 25 |
| 26 span.removeAttribute('i18n-values'); |
| 27 assertEquals(0, span.offsetHeight); |
| 28 } |
| 29 |
| 30 </script> |
OLD | NEW |