| Index: chrome/test/data/webui/i18n_process_css_test.html
|
| diff --git a/chrome/test/data/webui/i18n_process_css_test.html b/chrome/test/data/webui/i18n_process_css_test.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..85ba748050a79b00836fd88b856f208311820ab7
|
| --- /dev/null
|
| +++ b/chrome/test/data/webui/i18n_process_css_test.html
|
| @@ -0,0 +1,30 @@
|
| +<!doctype html>
|
| +<style>
|
| +<include src="../../../../ui/webui/resources/css/i18n_process.css">
|
| +</style>
|
| +<h1 i18n-content="buy"></h1>
|
| +<span i18n-values=".innerHTML:link"></span>
|
| +<script>
|
| +
|
| +function testI18nProcess_NbspPlaceholder() {
|
| + var h1 = document.querySelector('h1');
|
| + var span = document.querySelector('span');
|
| +
|
| + assertFalse(document.documentElement.hasAttribute('i18n-processed'));
|
| + assertEquals('', h1.textContent);
|
| + assertEquals('', span.textContent);
|
| +
|
| + /* We can't check that the non-breaking space hack actually works because it
|
| + * uses :psuedo-elements that are inaccessible to the DOM. Let's just check
|
| + * that they're not auto-collapsed. */
|
| + assertNotEqual(0, h1.offsetHeight);
|
| + assertNotEqual(0, span.offsetHeight);
|
| +
|
| + h1.removeAttribute('i18n-content');
|
| + assertEquals(0, h1.offsetHeight);
|
| +
|
| + span.removeAttribute('i18n-values');
|
| + assertEquals(0, span.offsetHeight);
|
| +}
|
| +
|
| +</script>
|
|
|