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

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

Issue 14752005: Finch experiments on SSL, malware, and phishing interstitials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Browsertest trybot fix Created 7 years, 7 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!-- This SSL interstitial is designed to look like the Firefox SSL error, with
3 permission from Firefox to copy the appearance of the page for an A/B
4 experiment. -->
5 <html i18n-values="dir:textdirection">
6 <head>
7 <meta charset="utf-8">
8 <title>Untrusted Connection</title>
9 <style>
10 body {
11 background-color: #dddad5;
Dan Beam 2013/05/07 08:07:16 rgb()
12 color: #000000;
Dan Beam 2013/05/07 08:07:16 black
13 margin: 0;
14 padding: 0 1em;
15 }
16 #box {
17 background-color: #ffffff;
Dan Beam 2013/05/07 08:07:16 white
18 border: 1px solid #ffbd09;
19 margin: 40px auto;
20 max-width: 52em;
21 min-width: 13em;
22 padding: 50px 0px 30px 0px;
Dan Beam 2013/05/07 08:07:16 0px -> 0 everywhere
23 position: relative;
24 -webkit-border-radius: 10px;
25 }
26 .clickable {
27 margin: 1em 0 0 60px;
28 }
29 h1 {
30 border-bottom: 1px solid #dddad5;
31 font-size: 160%;
32 margin: 0 0 .6em 0;
33 }
34 h2 {
35 font-size: 130%;
36 }
37 .icon {
38 position: absolute;
39 }
40 #inner-box {
41 margin: 0 40px 0 30px;
42 }
43 .main {
44 margin: 1em 0 0 80px;
45 }
46 .open {
47 display: none;
48 }
49 .subtext {
50 padding-left: 20px;
51 }
52 .subtitle {
53 cursor: pointer;
54 }
55 .title {
56 margin: 0 0 0 80px;
57 }
58 .twisty {
59 cursor: pointer;
60 float:left;
61 padding-right: 10px;
62 padding-top: 8px;
63 }
64 </style>
65
66 <script>
67 // Should match SSLBlockingPageCommands in ssl_blocking_page.cc.
68 var CMD_DONT_PROCEED = 0;
69 var CMD_PROCEED = 1;
70 var CMD_FOCUS = 2;
71 var CMD_MORE = 3;
72 var CMD_UNDERSTAND = 4;
73
74 var showedMore = false;
75 var showedUnderstand = false;
76 var keyPressState = 0;
77 var gainFocus = false;
78
79 function $(o) {
80 return document.getElementById(o);
81 }
82
83 function sendCommand(cmd) {
84 window.domAutomationController.setAutomationId(1);
85 window.domAutomationController.send(cmd);
86 }
87
88 function toggleMoreInfo() {
89 var status = !$('more-info-content').hidden;
90 $('more-info-content').hidden = status;
91 if (status) {
92 $('more-info-twisty-closed').style.display = 'inline';
93 $('more-info-twisty-open').style.display = 'none';
94 } else {
95 $('more-info-twisty-open').style.display = 'inline';
96 $('more-info-twisty-closed').style.display = 'none';
97 if (!showedMore) {
98 sendCommand(CMD_MORE);
99 showedMore = true;
100 }
101 }
102 }
103
104 function toggleUnderstand() {
105 var status = !$('understand-content').hidden;
106 $('understand-content').hidden = status;
107 if (status) {
108 $('understand-twisty-closed').style.display = 'inline';
109 $('understand-twisty-open').style.display = 'none';
110 } else {
111 $('understand-twisty-open').style.display = 'inline';
112 $('understand-twisty-closed').style.display = 'none';
113 if (!showedUnderstand) {
114 sendCommand(CMD_UNDERSTAND);
115 showedUnderstand = true;
116 }
117 }
118 }
119
120 // This allows errors to be skippped by typing "proceed" into the page.
121 function keyPressHandler(e) {
122 var sequence = 'proceed';
123 if (sequence.charCodeAt(keyPressState) == e.keyCode) {
124 keyPressState++;
125 if (keyPressState == sequence.length) {
126 sendCommand(CMD_PROCEED);
127 keyPressState = 0;
128 }
129 } else {
130 keyPressState = 0;
131 }
132 }
133
134 // Supports UMA timing, which starts after the warning is first viewed.
135 function handleFocusEvent() {
136 if (gainFocus == false) {
137 sendCommand(CMD_FOCUS);
138 gainFocus = true;
139 }
140 }
141
142 // UI modifications and event listeners that take place after load.
143 function setupEvents() {
144 if (templateData.errorType == 'overridable') {
145 $('proceed').hidden = false;
146 $('proceed-button').addEventListener('click', function() {
147 sendCommand(CMD_PROCEED);
148 });
149 } else {
150 document.addEventListener('keypress', keyPressHandler);
151 }
152
153 if (templateData.trialType == "Condition18SSLNoImages") {
154 $('icon-img').style.display = 'none';
155 }
156
157 $('exit-button').addEventListener('click', function() {
158 sendCommand(CMD_DONT_PROCEED);
159 });
160
161 $('more-info-title').addEventListener('click', function() {
162 toggleMoreInfo();
163 });
164
165 $('more-info-twisty-open').addEventListener('click', function() {
166 toggleMoreInfo();
167 });
168
169 $('more-info-twisty-closed').addEventListener('click', function() {
170 toggleMoreInfo();
171 });
172
173 $('understand-title').addEventListener('click', function() {
174 toggleUnderstand();
175 });
176
177 $('understand-twisty-open').addEventListener('click', function() {
178 toggleUnderstand();
179 });
180
181 $('understand-twisty-closed').addEventListener('click', function() {
182 toggleUnderstand();
183 });
184
185 document.addEventListener('contextmenu', function(e) {
186 e.preventDefault();
187 });
188 }
189
190 window.addEventListener('focus', handleFocusEvent);
191 document.addEventListener('DOMContentLoaded', setupEvents);
192 </script>
193 </head>
194 <body i18n-values=".style.fontFamily:fontfamily">
195 <div id="box">
196 <div id="inner-box">
197 <div class="icon">
198 <img src="firefox_icon.png" alt="SSL Error Icon" id="icon-img">
199 </div>
200
201 <div class="title">
202 <h1 class="titleText">This Connection is Untrusted</h1>
203 </div>
204
205 <div class="main">
206 <p>
207 You have asked Chrome to connect securely to <b><span
208 i18n-values=".innerHTML:domain"></span></b>, but we can't confirm that
209 your connection is secure.
210 </p>
211 <p>
212 Normally, when you try to connect securely, sites will present
213 trusted identification to prove that you are going to the right place.
214 However, this site's identity can't be verified.
215 </p>
216 </div>
217
218 <div class="main">
219 <h2>What Should I Do?</h2>
220 <p>If you usually connect to this site without problems, this error could
221 mean that someone is trying to impersonate the site, and you shouldn't
222 continue.</p>
223 <button id="exit-button">Get me out of here!</button>
224 </div>
225
226 <div class="clickable">
227 <img class="twisty" id="more-info-twisty-closed"
228 src="firefox_twisty_closed.png" border="0">
229 <img class="twisty open" id="more-info-twisty-open"
230 src="firefox_twisty_open.png" border="0">
231 <h2 id="more-info-title" class="subtitle">Technical Details</h2>
232 <div id="more-info-content" class="subtext" hidden>
233 <p i18n-values=".innerHTML:moreInfo1"></p>
234 <p i18n-values=".innerHTML:moreInfo2"></p>
235 <p i18n-values=".innerHTML:moreInfo3"></p>
236 <p i18n-values=".innerHTML:moreInfo4"></p>
237 <p i18n-values=".innerHTML:moreInfo5"></p>
238 </div>
239 </div>
240
241 <div class="clickable" id="proceed" hidden>
242 <img class="twisty" id="understand-twisty-closed"
243 src="firefox_twisty_closed.png" border="0">
244 <img class="twisty open" id="understand-twisty-open"
245 src="firefox_twisty_open.png" border="0">
246 <h2 id="understand-title" class="subtitle">I Understand the Risks</h2>
247 <div id="understand-content" class="subtext" hidden>
248 <p>If you understand what's going on, you can click the button below to
249 proceed to the site. <b>Even if you trust the site, this error could
250 mean that someone is tampering with your connection.</b></p>
251 <p>Don't proceed to the site unless you know there's a good reason why
252 this site doesn't use trusted identification.</p>
253 <button id="proceed-button">Proceed Anyway</button>
254 </div>
255 </div>
256 </div>
257 </div>
258
259 </body>
260 </html>
261
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698