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

Unified Diff: LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html

Issue 1303033004: Split up mixed content devtools test into 3 separate tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html
diff --git a/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html b/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html
deleted file mode 100644
index 9278477534ebd7464e9f0867f932db19ee305f2c..0000000000000000000000000000000000000000
--- a/LayoutTests/http/tests/inspector-protocol/request-mixed-content-status.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script type="text/javascript" src="../inspector-protocol/inspector-protocol-test.js"></script>
-<script src="/resources/get-host-info.js"></script>
-<script>
-if (window.testRunner) {
- testRunner.overridePreference("WebKitAllowRunningInsecureContent", true);
- testRunner.overridePreference("WebKitAllowDisplayingInsecureContent", true);
-}
-
-function noMixedContent()
-{
- var iframe = document.createElement("iframe");
- iframe.src = get_host_info().HTTPS_ORIGIN + "/inspector-protocol/resources/no-mixed-content-iframe.html";
- document.body.appendChild(iframe);
-}
-
-function blockableMixedContent()
-{
- var iframe = document.createElement("iframe");
- iframe.src = get_host_info().HTTPS_ORIGIN + "/inspector-protocol/resources/active-mixed-content-iframe.html";
- document.body.appendChild(iframe);
-}
-
-function optionallyBlockableMixedContent()
-{
- var iframe = document.createElement("iframe");
- iframe.src = get_host_info().HTTPS_ORIGIN + "/inspector-protocol/resources/passive-mixed-content-iframe.html";
- document.body.appendChild(iframe);
-}
-
-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");
- // FIXME(estark): use Runtime.evaluate callbacks instead of
- // firing these off all at once and tracking state in
- // onRequestWillBeSent().
- InspectorTest.sendCommand("Runtime.evaluate", { "expression": "noMixedContent()" });
- InspectorTest.sendCommand("Runtime.evaluate", { "expression": "blockableMixedContent()" });
- InspectorTest.sendCommand("Runtime.evaluate", { "expression": "optionallyBlockableMixedContent()" });
- }
-
- var num_requests = 0;
- var num_expected_requests = 6;
- function onRequestWillBeSent(event) {
- var req = event.params.request;
- InspectorTest.log("Mixed content type of " + req.url + ": " + req.mixedContentType);
- num_requests++;
- if (num_requests == num_expected_requests)
- InspectorTest.completeTest();
- }
-}
-
-</script>
-</head>
-<body onload="runTest()">
- <p>Tests that willSendRequest contains the correct mixed content status.</p>
-</body>
-</html>
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-blockable.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698