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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/warning-for-strict-secure-cookies.html

Issue 2623423002: Add console warning and tests for strict secure cookies.
Patch Set: Update comment Created 3 years, 11 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: third_party/WebKit/LayoutTests/http/tests/inspector/network/warning-for-strict-secure-cookies.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network/warning-for-strict-secure-cookies.html b/third_party/WebKit/LayoutTests/http/tests/inspector/network/warning-for-strict-secure-cookies.html
new file mode 100644
index 0000000000000000000000000000000000000000..18a9830dc04d61b2c3c57975ba1a4f53dec18aa4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/network/warning-for-strict-secure-cookies.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script src="../console-test.js"></script>
+<script src="../network-test.js"></script>
+<script>
+
+function test()
+{
+ // This is an HTTPS URL, so it shouldn't show the warning.
+ InspectorTest.makeFetch('https://127.0.0.1:8443/inspector/network/resources/set-cookie.php?secure=true', {}, step1);
+
+ function step1() {
+ // This is an HTTP URL, so it should show the warning.
+ InspectorTest.makeFetch('http://127.0.0.1:8000/inspector/network/resources/set-cookie.php?secure=true', {}, dumpMessages);
+ }
+
+ function dumpMessages()
+ {
+ InspectorTest.dumpConsoleMessages();
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+Checks that we show warning message for an attempt to set a secure cookie on an
+insecure URL.
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698