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

Unified Diff: LayoutTests/http/tests/inspector-protocol/resources/mixed-content-type-test.js

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
« no previous file with comments | « LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-optionally-blockable-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+ }
+}
« no previous file with comments | « LayoutTests/http/tests/inspector-protocol/request-mixed-content-status-optionally-blockable-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698