Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / test / data / webui / i18n_process_css_test.html
blob85ba748050a79b00836fd88b856f208311820ab7
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>
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);
30 </script>