Chromium Code Reviews| Index: chrome/browser/resources/ssl/roadblock.html |
| diff --git a/chrome/browser/resources/ssl/roadblock.html b/chrome/browser/resources/ssl/roadblock.html |
| index 28b77f584848132c3113f5737e011673f6575f71..7d3111ddd7fda383d3ac1ef3a729324c30b9c0ca 100644 |
| --- a/chrome/browser/resources/ssl/roadblock.html |
| +++ b/chrome/browser/resources/ssl/roadblock.html |
| @@ -61,6 +61,18 @@ |
| text-decoration: underline; |
| } |
| + .test-image { |
| + float: right; |
| + height: 140px; |
| + padding-left: 30px; |
| + padding-right: 30px; |
| + width: 140px; |
| + } |
| + |
| + html[dir='rtl'] .test-image { |
| + float: left; |
| + } |
| + |
| .title { |
| color: #660000; |
| font-size: 18pt; |
| @@ -84,6 +96,7 @@ |
| var showedMore = false; |
| var keyPressState = 0; |
| var gainFocus = false; |
| + var setupExperiment = false; |
| function $(o) { |
| return document.getElementById(o); |
| @@ -160,8 +173,20 @@ |
| }); |
| } |
| + function setupIconExperiments() { |
| + if (setupExperiment) return; |
| + 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
|
| + var condition = templateData.trialType.split('SSL')[1].toLowerCase(); |
| + if (/policeman|stoplight|badguy/.test(condition)) { |
| + $('trial-' + condition).hidden = false; |
| + $('more-info-short').style.webkitMarginEnd = '30px'; |
| + $('more-info-long').style.webkitMarginEnd = '30px'; |
| + } |
| + } |
| + |
| window.addEventListener('focus', handleFocusEvent); |
| document.addEventListener('DOMContentLoaded', setupEvents); |
| + document.addEventListener('DOMContentLoaded', setupIconExperiments); |
| </script> |
| </head> |
| <body> |
| @@ -170,6 +195,18 @@ |
| <img src="roadblock_icon.png" alt="SSL Error Icon" id="roadblock-icon"> |
| </div> |
| <div class="title" i18n-content="headLine"></div> |
| + |
| + <!-- RHS images for the field trial. --> |
| + <div id="trial-badguy" class="test-image" hidden> |
| + <img src="badguy.png" alt="Bad guy"> |
| + </div> |
| + <div id="trial-policeman" class="test-image" hidden> |
| + <img src="policeman.png" alt="Policeman"> |
| + </div> |
| + <div id="trial-stoplight" class="test-image" hidden> |
| + <img src="stoplight.png" alt="Stoplight"> |
| + </div> |
| + |
| <div class="main" i18n-values=".innerHTML:description;dir:textdirection"></div> |
| <div class="main" i18n-values=".innerHTML:reasonForNotProceeding"></div> |
| <div class="main"> |