OLD | NEW |
---|---|
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html i18n-values="dir:textdirection"> | 2 <html i18n-values="dir:textdirection"> |
3 <head> | 3 <head> |
4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
5 <title i18n-content="title"></title> | 5 <title i18n-content="title"></title> |
6 <style type="text/css"> | 6 <style type="text/css"> |
7 | 7 |
8 html { | 8 html { |
9 background-color: rgb(92, 0, 0); | 9 background-color: rgb(92, 0, 0); |
10 background-image: url(roadblock_background.png); | 10 background-image: url(roadblock_background.png); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 margin-left: 5px; | 54 margin-left: 5px; |
55 margin-right: 5px; | 55 margin-right: 5px; |
56 } | 56 } |
57 | 57 |
58 .more-link { | 58 .more-link { |
59 color: #0000FF; | 59 color: #0000FF; |
60 cursor: pointer; | 60 cursor: pointer; |
61 text-decoration: underline; | 61 text-decoration: underline; |
62 } | 62 } |
63 | 63 |
64 .test-image { | |
65 float: right; | |
66 height: 140px; | |
67 padding-left: 30px; | |
68 padding-right: 30px; | |
69 width: 140px; | |
70 } | |
71 | |
72 html[dir='rtl'] .test-image { | |
73 float: left; | |
74 } | |
75 | |
64 .title { | 76 .title { |
65 color: #660000; | 77 color: #660000; |
66 font-size: 18pt; | 78 font-size: 18pt; |
67 font-weight: bold; | 79 font-weight: bold; |
68 line-height: 140%; | 80 line-height: 140%; |
69 margin: 0 77px 6pt; | 81 margin: 0 77px 6pt; |
70 } | 82 } |
71 | 83 |
72 .twisty { | 84 .twisty { |
73 display: inline; | 85 display: inline; |
74 } | 86 } |
75 </style> | 87 </style> |
76 | 88 |
77 <script> | 89 <script> |
78 // Should match SSLBlockingPageCommands in ssl_blocking_page.cc. | 90 // Should match SSLBlockingPageCommands in ssl_blocking_page.cc. |
79 var CMD_DONT_PROCEED = 0; | 91 var CMD_DONT_PROCEED = 0; |
80 var CMD_PROCEED = 1; | 92 var CMD_PROCEED = 1; |
81 var CMD_FOCUS = 2; | 93 var CMD_FOCUS = 2; |
82 var CMD_MORE = 3; | 94 var CMD_MORE = 3; |
83 | 95 |
84 var showedMore = false; | 96 var showedMore = false; |
85 var keyPressState = 0; | 97 var keyPressState = 0; |
86 var gainFocus = false; | 98 var gainFocus = false; |
99 var setupExperiment = false; | |
87 | 100 |
88 function $(o) { | 101 function $(o) { |
89 return document.getElementById(o); | 102 return document.getElementById(o); |
90 } | 103 } |
91 | 104 |
92 function sendCommand(cmd) { | 105 function sendCommand(cmd) { |
93 window.domAutomationController.setAutomationId(1); | 106 window.domAutomationController.setAutomationId(1); |
94 window.domAutomationController.send(cmd); | 107 window.domAutomationController.send(cmd); |
95 } | 108 } |
96 | 109 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
153 | 166 |
154 $('exit-button').addEventListener('click', function() { | 167 $('exit-button').addEventListener('click', function() { |
155 sendCommand(CMD_DONT_PROCEED); | 168 sendCommand(CMD_DONT_PROCEED); |
156 }); | 169 }); |
157 | 170 |
158 document.addEventListener('contextmenu', function(e) { | 171 document.addEventListener('contextmenu', function(e) { |
159 e.preventDefault(); | 172 e.preventDefault(); |
160 }); | 173 }); |
161 } | 174 } |
162 | 175 |
176 function setupIconExperiments() { | |
177 if (setupExperiment) return; | |
178 else setupExperiment = true; | |
Dan Beam
2013/06/20 20:58:08
nit: no else after if () { return; }
Dan Beam
2013/06/20 20:58:08
nit: assert(!setupExperiment); (if you plan on nev
felt
2013/06/20 21:57:04
Done.
felt
2013/06/20 21:57:04
Hi Dan, where does the assert function come from?
Dan Beam
2013/06/20 22:26:22
src/ui/webui/resources/js/util.js
| |
179 var condition = templateData.trialType.split('SSL')[1].toLowerCase(); | |
180 if (/policeman|stoplight|badguy/.test(condition)) { | |
181 $('trial-' + condition).hidden = false; | |
182 $('more-info-short').style.webkitMarginEnd = '30px'; | |
183 $('more-info-long').style.webkitMarginEnd = '30px'; | |
184 } | |
185 } | |
186 | |
163 window.addEventListener('focus', handleFocusEvent); | 187 window.addEventListener('focus', handleFocusEvent); |
164 document.addEventListener('DOMContentLoaded', setupEvents); | 188 document.addEventListener('DOMContentLoaded', setupEvents); |
189 document.addEventListener('DOMContentLoaded', setupIconExperiments); | |
165 </script> | 190 </script> |
166 </head> | 191 </head> |
167 <body> | 192 <body> |
168 <div class="box"> | 193 <div class="box"> |
169 <div class="icon"> | 194 <div class="icon"> |
170 <img src="roadblock_icon.png" alt="SSL Error Icon" id="roadblock-icon"> | 195 <img src="roadblock_icon.png" alt="SSL Error Icon" id="roadblock-icon"> |
171 </div> | 196 </div> |
172 <div class="title" i18n-content="headLine"></div> | 197 <div class="title" i18n-content="headLine"></div> |
198 | |
199 <!-- RHS images for the field trial. --> | |
200 <div id="trial-badguy" class="test-image" hidden> | |
201 <img src="badguy.png" alt="Bad guy"> | |
202 </div> | |
203 <div id="trial-policeman" class="test-image" hidden> | |
204 <img src="policeman.png" alt="Policeman"> | |
205 </div> | |
206 <div id="trial-stoplight" class="test-image" hidden> | |
207 <img src="stoplight.png" alt="Stoplight"> | |
208 </div> | |
209 | |
173 <div class="main" i18n-values=".innerHTML:description;dir:textdirection"></d iv> | 210 <div class="main" i18n-values=".innerHTML:description;dir:textdirection"></d iv> |
174 <div class="main" i18n-values=".innerHTML:reasonForNotProceeding"></div> | 211 <div class="main" i18n-values=".innerHTML:reasonForNotProceeding"></div> |
175 <div class="main"> | 212 <div class="main"> |
176 <button i18n-content="proceed" id="proceed-button" hidden></button> | 213 <button i18n-content="proceed" id="proceed-button" hidden></button> |
177 <button i18n-content="exit" id="exit-button"></button> | 214 <button i18n-content="exit" id="exit-button"></button> |
178 </div> | 215 </div> |
179 <div class="more" id="more-info-short"> | 216 <div class="more" id="more-info-short"> |
180 <span class="more-link"> | 217 <span class="more-link"> |
181 <img id="twisty-closed" class="twisty" src="twisty_closed.png" | 218 <img id="twisty-closed" class="twisty" src="twisty_closed.png" |
182 border="0"><span i18n-content="moreInfoTitle" id="more-info-title" | 219 border="0"><span i18n-content="moreInfoTitle" id="more-info-title" |
183 class="show-more-info-title"></span> | 220 class="show-more-info-title"></span> |
184 </span> | 221 </span> |
185 </div> | 222 </div> |
186 <div class="more" id="more-info-long" hidden> | 223 <div class="more" id="more-info-long" hidden> |
187 <span class="more-link"> | 224 <span class="more-link"> |
188 <img class="twisty" src="twisty_open.png" border="0"><span | 225 <img class="twisty" src="twisty_open.png" border="0"><span |
189 i18n-content="moreInfoTitle" class="more-info-title"></span> | 226 i18n-content="moreInfoTitle" class="more-info-title"></span> |
190 </span> | 227 </span> |
191 <p i18n-values=".innerHTML:moreInfo1"></p> | 228 <p i18n-values=".innerHTML:moreInfo1"></p> |
192 <p i18n-values=".innerHTML:moreInfo2"></p> | 229 <p i18n-values=".innerHTML:moreInfo2"></p> |
193 <p i18n-values=".innerHTML:moreInfo3"></p> | 230 <p i18n-values=".innerHTML:moreInfo3"></p> |
194 <p i18n-values=".innerHTML:moreInfo4"></p> | 231 <p i18n-values=".innerHTML:moreInfo4"></p> |
195 <p i18n-values=".innerHTML:moreInfo5"></p> | 232 <p i18n-values=".innerHTML:moreInfo5"></p> |
196 </div> | 233 </div> |
197 </div> | 234 </div> |
198 </table> | 235 </table> |
199 </body> | 236 </body> |
200 </html> | 237 </html> |
OLD | NEW |