OLD | NEW |
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 | 9 var insecureContentStatus = { ranMixedContent: false, displayedMixedContent:
false, ranContentWithCertErrors: false, displayedContentWithCertErrors: true, r
anInsecureContentStyle: SecurityAgent.SecurityState.Insecure, displayedInsecureC
ontentStyle: SecurityAgent.SecurityState.Neutral }; |
10 InspectorTest.mainTarget.model(WebInspector.SecurityModel).dispatchEventToLi
steners(WebInspector.SecurityModel.Events.SecurityStateChanged, new WebInspector
.PageSecurityState(SecurityAgent.SecurityState.Secure, [], mixedContentStatus, t
rue)); | 10 InspectorTest.mainTarget.model(WebInspector.SecurityModel).dispatchEventToLi
steners(WebInspector.SecurityModel.Events.SecurityStateChanged, new WebInspector
.PageSecurityState(SecurityAgent.SecurityState.Secure, [], insecureContentStatus
, true)); |
11 | 11 |
12 var request = new WebInspector.NetworkRequest(InspectorTest.mainTarget, 0, "
http://foo.test", "https://foo.test", 0, 0, null); | 12 var request = new WebInspector.NetworkRequest(InspectorTest.mainTarget, 0, "
http://foo.test", "https://foo.test", 0, 0, null); |
| 13 request.setBlockedReason(NetworkAgent.BlockedReason.MixedContent); |
| 14 request.mixedContentType = "blockable"; |
13 InspectorTest.dispatchRequestFinished(request); | 15 InspectorTest.dispatchRequestFinished(request); |
14 | 16 |
15 var explanations = WebInspector.SecurityPanel._instance()._mainView.contentE
lement.getElementsByClassName("security-explanation"); | 17 var explanations = WebInspector.SecurityPanel._instance()._mainView.contentE
lement.getElementsByClassName("security-explanation"); |
16 for (var i = 0; i < explanations.length; i++) | 18 for (var i = 0; i < explanations.length; i++) |
17 InspectorTest.dumpDeepInnerHTML(explanations[i]); | 19 InspectorTest.dumpDeepInnerHTML(explanations[i]); |
| 20 |
18 InspectorTest.completeTest(); | 21 InspectorTest.completeTest(); |
19 } | 22 } |
20 </script> | 23 </script> |
21 </head> | 24 </head> |
22 <body onload="runTest()"> | 25 <body onload="runTest()"> |
23 <p>Tests addition of explanation when all page resources are transferred securel
y (no-mixed-content).</p> | 26 <p>Tests active mixed content blocking in the security panel, along with subreso
urces with cert errors.</p> |
24 </body> | 27 </body> |
25 </html> | 28 </html> |
OLD | NEW |