3 <include src=
"../../../../ui/webui/resources/css/i18n_process.css">
5 <h1 i18n-content=
"buy"></h1>
6 <span i18n-values=
".innerHTML:link"></span>
9 function testI18nProcess_NbspPlaceholder() {
10 var h1
= document
.querySelector('h1');
11 var span
= document
.querySelector('span');
13 assertFalse(document
.documentElement
.hasAttribute('i18n-processed'));
14 assertEquals('', h1
.textContent
);
15 assertEquals('', span
.textContent
);
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
);
23 h1
.removeAttribute('i18n-content');
24 assertEquals(0, h1
.offsetHeight
);
26 span
.removeAttribute('i18n-values');
27 assertEquals(0, span
.offsetHeight
);