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

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

Issue 2930833004: [MD settings] use regex replace all nbsp (Closed)
Patch Set: review changes 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 28 matching lines...) Expand all
49 } 49 }
50 50
51 function testI18nExists() { 51 function testI18nExists() {
52 assertTrue(I18nBehavior.i18nExists('text')); 52 assertTrue(I18nBehavior.i18nExists('text'));
53 assertFalse(I18nBehavior.i18nExists('missingText')); 53 assertFalse(I18nBehavior.i18nExists('missingText'));
54 } 54 }
55 55
56 </script> 56 </script>
57 </body> 57 </body>
58 </html> 58 </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