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