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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/security/security-explanation-ordering.html

Issue 2286553002: DevTools security panel: explain subresources with cert errors separately (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: some missed renames Created 4 years, 3 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 <script src="../security-test.js"></script> 4 <script src="../security-test.js"></script>
5 <script> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 var mixedContentStatus = { ranInsecureContent: false, displayedInsecureConte nt: false}; 8 /** @type {!SecurityAgent.InsecureContentStatus} */
9 var insecureContentStatus = { ranMixedContent: false, displayedMixedContent: false, ranContentWithCertErrors: false, displayedContentWithCertErrors: false, ranInsecureContentStyle: SecurityAgent.SecurityState.Insecure, displayedInsecure ContentStyle: SecurityAgent.SecurityState.Neutral };
9 10
10 // Explanations from https://cbc.badssl.com/ as of 2016-06-13. 11 // Explanations from https://cbc.badssl.com/ as of 2016-06-13.
11 // We explicitly place the explanation with the security state "info" 12 // We explicitly place the explanation with the security state "info"
12 // first to make sure it gets reordered. 13 // first to make sure it gets reordered.
13 var explanations = [ 14 var explanations = [
14 { 15 {
15 "description": "Public-key pinning was bypassed by a local root cert ificate.", 16 "description": "Public-key pinning was bypassed by a local root cert ificate.",
16 "securityState": "info", 17 "securityState": "info",
17 "summary": "Public-Key Pinning Bypassed" 18 "summary": "Public-Key Pinning Bypassed"
18 }, 19 },
19 { 20 {
20 "certificateId": 1, 21 "certificateId": 1,
21 "description": "The connection to this site is using a valid, truste d server certificate.", 22 "description": "The connection to this site is using a valid, truste d server certificate.",
22 "securityState": "secure", 23 "securityState": "secure",
23 "summary": "Valid Certificate" 24 "summary": "Valid Certificate"
24 }, 25 },
25 { 26 {
26 "description": "The connection to this site uses a strong protocol ( TLS 1.2), a strong key exchange (ECDHE_RSA), and an obsolete cipher (AES_256_CBC with HMAC-SHA1).", 27 "description": "The connection to this site uses a strong protocol ( TLS 1.2), a strong key exchange (ECDHE_RSA), and an obsolete cipher (AES_256_CBC with HMAC-SHA1).",
27 "securityState": "secure", 28 "securityState": "secure",
28 "summary": "Obsolete Connection Settings" 29 "summary": "Obsolete Connection Settings"
29 30
30 } 31 }
31 ]; 32 ];
32 33
33 InspectorTest.mainTarget.model(WebInspector.SecurityModel).dispatchEventToLi steners(WebInspector.SecurityModel.Events.SecurityStateChanged, new WebInspector .PageSecurityState(SecurityAgent.SecurityState.Secure, explanations, mixedConten tStatus, true)); 34 InspectorTest.mainTarget.model(WebInspector.SecurityModel).dispatchEventToLi steners(WebInspector.SecurityModel.Events.SecurityStateChanged, new WebInspector .PageSecurityState(SecurityAgent.SecurityState.Secure, explanations, insecureCon tentStatus, true));
34 35
35 var request = new WebInspector.NetworkRequest(InspectorTest.mainTarget, 0, " http://foo.test", "https://foo.test", 0, 0, null); 36 var request = new WebInspector.NetworkRequest(InspectorTest.mainTarget, 0, " http://foo.test", "https://foo.test", 0, 0, null);
36 InspectorTest.dispatchRequestFinished(request); 37 InspectorTest.dispatchRequestFinished(request);
37 38
38 var explanations = WebInspector.SecurityPanel._instance()._mainView.contentE lement.getElementsByClassName("security-explanation"); 39 var explanations = WebInspector.SecurityPanel._instance()._mainView.contentE lement.getElementsByClassName("security-explanation");
39 for (var i = 0; i < explanations.length; i++) 40 for (var i = 0; i < explanations.length; i++)
40 InspectorTest.dumpDeepInnerHTML(explanations[i]); 41 InspectorTest.dumpDeepInnerHTML(explanations[i]);
41 InspectorTest.completeTest(); 42 InspectorTest.completeTest();
42 } 43 }
43 </script> 44 </script>
44 </head> 45 </head>
45 <body onload="runTest()"> 46 <body onload="runTest()">
46 <p>Tests that info explanations are placed after regular explanations.</p> 47 <p>Tests that info explanations are placed after regular explanations.</p>
47 </body> 48 </body>
48 </html> 49 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698