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

Side by Side Diff: chrome/browser/resources/ssl/roadblock.html

Issue 17416003: Adding 3 new SSL experimental conditions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added assert Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_blocking_page.cc » ('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 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
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 <script src="../../../../ui/webui/resources/js/assert.js"></script>
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
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 (templateData.trialType == '') return;
178 assert(!setupExperiment);
179 setupExperiment = true;
180 var condition = templateData.trialType.split('SSL')[1].toLowerCase();
181 if (/policeman|stoplight|badguy/.test(condition)) {
182 $('trial-' + condition).hidden = false;
183 $('more-info-short').style.webkitMarginEnd = '30px';
184 $('more-info-long').style.webkitMarginEnd = '30px';
185 }
186 }
187
163 window.addEventListener('focus', handleFocusEvent); 188 window.addEventListener('focus', handleFocusEvent);
164 document.addEventListener('DOMContentLoaded', setupEvents); 189 document.addEventListener('DOMContentLoaded', setupEvents);
190 document.addEventListener('DOMContentLoaded', setupIconExperiments);
165 </script> 191 </script>
166 </head> 192 </head>
167 <body> 193 <body>
168 <div class="box"> 194 <div class="box">
169 <div class="icon"> 195 <div class="icon">
170 <img src="roadblock_icon.png" alt="SSL Error Icon" id="roadblock-icon"> 196 <img src="roadblock_icon.png" alt="SSL Error Icon" id="roadblock-icon">
171 </div> 197 </div>
172 <div class="title" i18n-content="headLine"></div> 198 <div class="title" i18n-content="headLine"></div>
199
200 <!-- RHS images for the field trial. -->
201 <div id="trial-badguy" class="test-image" hidden>
202 <img src="badguy.png" alt="Bad guy">
203 </div>
204 <div id="trial-policeman" class="test-image" hidden>
205 <img src="policeman.png" alt="Policeman">
206 </div>
207 <div id="trial-stoplight" class="test-image" hidden>
208 <img src="stoplight.png" alt="Stoplight">
209 </div>
210
173 <div class="main" i18n-values=".innerHTML:description;dir:textdirection"></d iv> 211 <div class="main" i18n-values=".innerHTML:description;dir:textdirection"></d iv>
174 <div class="main" i18n-values=".innerHTML:reasonForNotProceeding"></div> 212 <div class="main" i18n-values=".innerHTML:reasonForNotProceeding"></div>
175 <div class="main"> 213 <div class="main">
176 <button i18n-content="proceed" id="proceed-button" hidden></button> 214 <button i18n-content="proceed" id="proceed-button" hidden></button>
177 <button i18n-content="exit" id="exit-button"></button> 215 <button i18n-content="exit" id="exit-button"></button>
178 </div> 216 </div>
179 <div class="more" id="more-info-short"> 217 <div class="more" id="more-info-short">
180 <span class="more-link"> 218 <span class="more-link">
181 <img id="twisty-closed" class="twisty" src="twisty_closed.png" 219 <img id="twisty-closed" class="twisty" src="twisty_closed.png"
182 border="0"><span i18n-content="moreInfoTitle" id="more-info-title" 220 border="0"><span i18n-content="moreInfoTitle" id="more-info-title"
183 class="show-more-info-title"></span> 221 class="show-more-info-title"></span>
184 </span> 222 </span>
185 </div> 223 </div>
186 <div class="more" id="more-info-long" hidden> 224 <div class="more" id="more-info-long" hidden>
187 <span class="more-link"> 225 <span class="more-link">
188 <img class="twisty" src="twisty_open.png" border="0"><span 226 <img class="twisty" src="twisty_open.png" border="0"><span
189 i18n-content="moreInfoTitle" class="more-info-title"></span> 227 i18n-content="moreInfoTitle" class="more-info-title"></span>
190 </span> 228 </span>
191 <p i18n-values=".innerHTML:moreInfo1"></p> 229 <p i18n-values=".innerHTML:moreInfo1"></p>
192 <p i18n-values=".innerHTML:moreInfo2"></p> 230 <p i18n-values=".innerHTML:moreInfo2"></p>
193 <p i18n-values=".innerHTML:moreInfo3"></p> 231 <p i18n-values=".innerHTML:moreInfo3"></p>
194 <p i18n-values=".innerHTML:moreInfo4"></p> 232 <p i18n-values=".innerHTML:moreInfo4"></p>
195 <p i18n-values=".innerHTML:moreInfo5"></p> 233 <p i18n-values=".innerHTML:moreInfo5"></p>
196 </div> 234 </div>
197 </div> 235 </div>
198 </table> 236 </table>
199 </body> 237 </body>
200 </html> 238 </html>
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698