Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: chrome/test/data/webui/i18n_behavior_test.html

Issue 2938483002: [MD settings] use regex to replace all nbsp (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/webui/resources/js/i18n_behavior.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script> 4 <script>
5 5
6 /* Execute these tests with the browser_tests executable. */ 6 /* Execute these tests with the browser_tests executable. */
7 7
8 var allowedByDefault = '<a href="https://google.com">Google!</a>'; 8 var allowedByDefault = '<a href="https://google.com">Google!</a>';
9 var text = 'I\'m just text, nobody should have a problem with me!'; 9 var text = 'I\'m just text, nobody should have a problem with me!';
10 var nonBreakingSpace = 'A\u00a0B'; // 0xa0 is a unicode nbsp. 10 var nonBreakingSpace = 'A\u00a0B\u00a0C'; // \u00a0 is a unicode nbsp.
11 11
12 function setUpPage() { 12 function setUpPage() {
13 loadTimeData.data = { 13 loadTimeData.data = {
14 'allowedByDefault': allowedByDefault, 14 'allowedByDefault': allowedByDefault,
15 'customAttr': '<a is="action-link">Take action!</a>', 15 'customAttr': '<a is="action-link">Take action!</a>',
16 'customTag': "<x-foo>I'm an X, foo!</x-foo>", 16 'customTag': "<x-foo>I'm an X, foo!</x-foo>",
17 'javascriptHref': '<a href="javascript:alert(1)">teh hax</a>', 17 'javascriptHref': '<a href="javascript:alert(1)">teh hax</a>',
18 'script': '<script>alert(/xss/)</scr' + 'ipt>', 18 'script': '<script>alert(/xss/)</scr' + 'ipt>',
19 'text': text, 19 'text': text,
20 'nonBreakingSpace': nonBreakingSpace, 20 'nonBreakingSpace': nonBreakingSpace,
(...skipping 23 matching lines...) Expand all
44 } 44 }
45 45
46 function testI18nExists() { 46 function testI18nExists() {
47 assertTrue(I18nBehavior.i18nExists('text')); 47 assertTrue(I18nBehavior.i18nExists('text'));
48 assertFalse(I18nBehavior.i18nExists('missingText')); 48 assertFalse(I18nBehavior.i18nExists('missingText'));
49 } 49 }
50 50
51 </script> 51 </script>
52 </body> 52 </body>
53 </html> 53 </html>
OLDNEW
« no previous file with comments | « no previous file | ui/webui/resources/js/i18n_behavior.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698