| Index: LayoutTests/http/tests/inspector-protocol/resources/mixed-content-type-test.js
|
| diff --git a/LayoutTests/http/tests/inspector-protocol/resources/mixed-content-type-test.js b/LayoutTests/http/tests/inspector-protocol/resources/mixed-content-type-test.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..10888f4cb671f7f28a4f8c4317de4ced34ac61c5
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/inspector-protocol/resources/mixed-content-type-test.js
|
| @@ -0,0 +1,30 @@
|
| +if (window.testRunner) {
|
| + testRunner.overridePreference("WebKitAllowRunningInsecureContent", true);
|
| + testRunner.overridePreference("WebKitAllowDisplayingInsecureContent", true);
|
| +}
|
| +
|
| +function test()
|
| +{
|
| + InspectorTest.eventHandler["Network.requestWillBeSent"] = onRequestWillBeSent;
|
| + InspectorTest.sendCommand("Network.enable", {}, didEnableNetwork);
|
| +
|
| + function didEnableNetwork(messageObject)
|
| + {
|
| + if (messageObject.error) {
|
| + InspectorTest.log("FAIL: Couldn't enable network agent" + messageObject.error.message);
|
| + InspectorTest.completeTest();
|
| + return;
|
| + }
|
| + InspectorTest.log("Network agent enabled");
|
| + InspectorTest.sendCommand("Runtime.evaluate", { "expression": "addIframeWithMixedContent()" });
|
| + }
|
| +
|
| + var numRequests = 0;
|
| + function onRequestWillBeSent(event) {
|
| + var req = event.params.request;
|
| + InspectorTest.log("Mixed content type of " + req.url + ": " + req.mixedContentType);
|
| + numRequests++;
|
| + if (numRequests == 2)
|
| + InspectorTest.completeTest();
|
| + }
|
| +}
|
|
|