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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/upgrade-insecure-requests/sandbox-upgrade.https.php

Issue 2295153004: Fix a null-deref in Upgrade-Insecure-Request's handling of unique origins. (Closed)
Patch Set: Test Created 4 years, 3 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 | « no previous file | third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/upgrade-insecure-requests/sandbox-upgrade.https.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/upgrade-insecure-requests/basic-upgrade.https.html b/third_party/WebKit/LayoutTests/http/tests/security/upgrade-insecure-requests/sandbox-upgrade.https.php
similarity index 85%
copy from third_party/WebKit/LayoutTests/http/tests/security/upgrade-insecure-requests/basic-upgrade.https.html
copy to third_party/WebKit/LayoutTests/http/tests/security/upgrade-insecure-requests/sandbox-upgrade.https.php
index 9c3eed0c5e9b05e7f7dc09619ace7ebfc48f2e73..f6a5981961700b6967539339f4799dc27a24c83e 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/upgrade-insecure-requests/basic-upgrade.https.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/upgrade-insecure-requests/sandbox-upgrade.https.php
@@ -1,10 +1,10 @@
+<?php
+ header("Content-Security-Policy: sandbox allow-scripts; upgrade-insecure-requests");
+?>
<!DOCTYPE html>
<title>Upgrade Insecure Requests: Basics.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-
-<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
-
<script>
// This is a bit of a hack. UPGRADE doesn't upgrade the port number, so we
// specify this non-existent URL ('http' over port 8443). If UPGRADE doesn't
@@ -38,12 +38,12 @@ var insecureImage = "http://127.0.0.1:8443/security/resources/abe.png";
var ctx = canvas.getContext('2d');
ctx.drawImage(i, 0, 0);
- // Grab a pixel to verify that the image is same-origin:
+ // Grab a pixel to verify that the image is cross-origin (because sandbox):
try {
var pixel = ctx.getImageData(0, 0, 1, 1);
- t.done();
+ assert_unreached("The image should be cross-origin with this document.");
} catch (e) {
- assert_unreached("The image should be same-origin with this document.");
+ t.done();
}
});
i.onerror = t.step_func(function () {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698