Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!doctype html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title i18n-content="title"></title> | |
| 5 <link rel="import" href="data:text/html, | |
| 6 <link rel=import href="data:text/html, | |
|
arv (Not doing code reviews)
2015/07/08 22:29:16
Can you use ' instead?
Dan Beam
2015/07/08 23:25:50
Done.
| |
| 7 <div i18n-content=nested>">"> | |
| 8 </head> | |
| 9 <body i18n-values="type:type"> | |
| 10 <span i18n-values=".innerHTML:content;.style.display:display"><3</span> | |
| 11 <template> | |
| 12 <template> | |
| 13 <div i18n-content="nested"></div> | |
| 14 </template> | |
| 15 </template> | |
| 16 <script> | |
| 17 function setUpPage() { | |
| 18 loadTimeData.data = { | |
| 19 'content': "doesn't matter; you can't see me!", | |
| 20 'display': 'none', | |
| 21 'title': 'BUY NOW!', | |
| 22 'type': 'ectomorph', | |
| 23 'nested': 'real deep', | |
| 24 }; | |
| 25 i18nTemplate.process(document, loadTimeData); | |
| 26 } | |
| 27 | |
| 28 function testI18nProcess_Attributes() { | |
| 29 assertNotEqual(0, document.title.length); | |
| 30 assertTrue(document.body.hasAttribute('type')); | |
| 31 assertTrue(document.querySelector('span').textContent.length > 5); | |
| 32 assertEquals('none', document.querySelector('span').style.display); | |
| 33 } | |
| 34 | |
| 35 function testI18nProcess_Imports() { | |
| 36 var outerImportDoc = document.querySelector('link').import; | |
| 37 var innerImportDoc = outerImportDoc.querySelector('link').import; | |
| 38 assertNotEqual(0, innerImportDoc.querySelector('div').textContent.length); | |
| 39 } | |
| 40 | |
| 41 function testI18nProcess_Templates() { | |
| 42 var outerDocFrag = document.querySelector('template').content; | |
| 43 var innerDocFrag = outerDocFrag.querySelector('template').content; | |
| 44 assertNotEqual(0, innerDocFrag.querySelector('div').textContent.length); | |
| 45 } | |
| 46 </script> | |
| 47 </body> | |
| 48 </html> | |
| OLD | NEW |