OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <script> | 4 <script> |
5 | 5 |
6 function setUpPage() { | 6 function setUpPage() { |
7 loadTimeData.data = { | 7 loadTimeData.data = { |
8 'allowedByDefault': '<a href="https://google.com">Google!</a>', | 8 'allowedByDefault': '<a href="https://google.com">Google!</a>', |
9 'customAttr': '<a is="action-link">Take action!</a>', | 9 'customAttr': '<a is="action-link">Take action!</a>', |
10 'customTag': "<x-foo>I'm an X, foo!</x-foo>", | 10 'customTag': "<x-foo>I'm an X, foo!</x-foo>", |
(...skipping 17 matching lines...) Expand all Loading... |
28 I18nBehavior.i18nAdvanced('customAttr', { | 28 I18nBehavior.i18nAdvanced('customAttr', { |
29 attrs: { | 29 attrs: { |
30 is: function(el, val) { | 30 is: function(el, val) { |
31 return el.tagName == 'A' && val == 'action-link'; | 31 return el.tagName == 'A' && val == 'action-link'; |
32 }, | 32 }, |
33 }, | 33 }, |
34 }); | 34 }); |
35 I18nBehavior.i18nAdvanced('customTag', {tags: ['X-FOO']}); | 35 I18nBehavior.i18nAdvanced('customTag', {tags: ['X-FOO']}); |
36 } | 36 } |
37 | 37 |
| 38 function testI18nExists() { |
| 39 assertTrue(I18nBehavior.i18nExists('text')); |
| 40 assertFalse(I18nBehavior.i18nExists('missingText')); |
| 41 } |
| 42 |
38 </script> | 43 </script> |
39 </body> | 44 </body> |
40 </html> | 45 </html> |
OLD | NEW |