OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 localStrings = new LocalStrings(); | 5 localStrings = new LocalStrings(); |
6 | 6 |
7 /** | 7 /** |
8 * Requests the list of crashes from the backend. | 8 * Requests the list of crashes from the backend. |
9 */ | 9 */ |
10 function requestCrashes() { | 10 function requestCrashes() { |
(...skipping 28 matching lines...) Expand all Loading... | |
39 var title = document.createElement('h3'); | 39 var title = document.createElement('h3'); |
40 title.textContent = localStrings.getStringF('crashHeaderFormat', | 40 title.textContent = localStrings.getStringF('crashHeaderFormat', |
41 crash['id']); | 41 crash['id']); |
42 crashBlock.appendChild(title); | 42 crashBlock.appendChild(title); |
43 var date = document.createElement('p'); | 43 var date = document.createElement('p'); |
44 date.textContent = localStrings.getStringF('crashTimeFormat', | 44 date.textContent = localStrings.getStringF('crashTimeFormat', |
45 crash['time']); | 45 crash['time']); |
46 crashBlock.appendChild(date); | 46 crashBlock.appendChild(date); |
47 var linkBlock = document.createElement('p'); | 47 var linkBlock = document.createElement('p'); |
48 var link = document.createElement('a'); | 48 var link = document.createElement('a'); |
49 link.href = 'http://code.google.com/p/chromium/issues/entry?' + | 49 var commentLines = [ |
Dan Beam
2012/04/30 23:42:04
2 \s in JS
| |
50 'template=Crash%20Report&comment=' + | 50 'Chrome Version: ' + version, |
51 'Chrome%20Version:%20' + version + '%0A' + | 51 // TODO(tbreisacher): fill in the OS automatically? |
52 'Operating%20System:%20e.g.,%20"Windows%207",%20' + | 52 'Operating System: e.g., "Windows 7", "Mac OSX 10.6"', |
53 '"Mac%20OS%20X%2010.6"%0A%0A' + | 53 '', |
54 'URL%20(if%20applicable)%20where%20crash%20occurred:%20%0A%0A' + | 54 'URL (if applicable) where crash occurred:', |
55 'Can%20you%20reproduce%20this%20crash?%0A%0A' + | 55 '', |
56 'What%20steps%20will%20reproduce%20this%20crash%20' + | 56 'Can you reproduce this crash?', |
57 '(or%20if%20it\'s%20not%20reproducible,%20what%20were%20you%20doing' + | 57 '', |
58 '%20just%20before%20the%20crash)?%0A1.%0A2.%0A3.%0A%0A' + | 58 'What steps will reproduce this crash? (or if it\'s not ' + |
59 '*Please%20note%20that%20issues%20filed%20with%20no%20information%20' + | 59 'reproducible, what were you doing just before the crash)?', |
60 'filled%20in%20above%20will%20be%20marked%20as%20WontFix*%0A%0A' + | 60 '', |
61 '****DO%20NOT%20CHANGE%20BELOW%20THIS%20LINE****%0Areport_id:' + | 61 '1.', '2.', '3.', |
62 crash['id']; | 62 '', |
63 '*Please note that issues filed with no information filled in ' + | |
64 'above will be marked as WontFix*', | |
65 '', | |
66 '****DO NOT CHANGE BELOW THIS LINE****', | |
67 'report_id:' + crash.id | |
68 ]; | |
69 var params = { | |
70 template: 'Crash Report', | |
71 comment: commentLines.join('\n'), | |
72 }; | |
73 var href = 'http://code.google.com/p/chromium/issues/entry'; | |
74 for (var param in params) { | |
75 href = appendParam(href, param, params[param]); | |
76 } | |
77 link.href = href; | |
63 link.target = '_blank'; | 78 link.target = '_blank'; |
64 link.textContent = localStrings.getString('bugLinkText'); | 79 link.textContent = localStrings.getString('bugLinkText'); |
65 linkBlock.appendChild(link); | 80 linkBlock.appendChild(link); |
66 crashBlock.appendChild(linkBlock); | 81 crashBlock.appendChild(linkBlock); |
67 crashSection.appendChild(crashBlock); | 82 crashSection.appendChild(crashBlock); |
68 } | 83 } |
69 | 84 |
70 $('noCrashes').hidden = crashes.length != 0; | 85 $('noCrashes').hidden = crashes.length != 0; |
71 } | 86 } |
72 | 87 |
73 document.addEventListener('DOMContentLoaded', requestCrashes); | 88 document.addEventListener('DOMContentLoaded', requestCrashes); |
OLD | NEW |