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

Side by Side Diff: grit/testdata/script.html

Issue 1442863002: Remove contents of grit's SVN repository. (Closed) Base URL: http://grit-i18n.googlecode.com/svn/trunk/
Patch Set: Created 5 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « grit/testdata/resource_ids ('k') | grit/testdata/searchbox.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <script>
2 function run(n,cut){
3 var out = "", str = "abcdefghijklmnopqrstuvwxyz 1234567890ABCDEFGHIJKLMN OPQRSTUVWXYZ,./:;'\"()*!?-_@[]{}#%`+=|\\>";
4 n.innerHTML = 'aa';
5
6 var base = n.scrollWidth;
7 for(var i=0;i<str.length;i++) {
8 n.innerHTML = 'a'+str.charAt(i)+'a';
9 out += str.charAt(i) + (n.scrollWidth-base) +";";
10
11 if(cut && !i && (n.scrollWidth-base == cut)) {
12 return '\x02'+"0;";
13 }
14 }
15 // extra cases for literals
16 n.innerHTML = 'a&lt;a';
17 out += '<' + (n.scrollWidth-base) +";";
18 n.innerHTML = 'a&amp;a';
19 out += '&' + (n.scrollWidth-base) +";";
20
21 var base_height = n.scrollHeight;
22 n.innerHTML += '<br>a';
23 out += '\x01' + (n.scrollHeight-base_height) +";";
24
25 return out;
26 }
27
28 function TEST_WIDTH() {
29 var n = document.getElementById('test');
30 var out = run(n[$~CUT~$]);
31 if (out.length>4){
32 n.style.fontWeight='bold';
33 out += run(n);
34 }
35 n.outerHTML = "";
36 (new Image()).src="[$~SETWIDTH~$]?src=[COMPONENT]&data="+escape(out).rep lace(/\+/g,"%2B");
37 }
38 </script>
OLDNEW
« no previous file with comments | « grit/testdata/resource_ids ('k') | grit/testdata/searchbox.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698