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

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

Issue 2053693002: WIP: Move 'Upgrade-Insecure-Requests' to the browser process. Base URL: https://chromium.googlesource.com/chromium/src.git@replicate
Patch Set: Rebase. :( Created 3 years, 10 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/security/upgrade-insecure-requests/basic-upgrade.https.html
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/basic-upgrade.https.html
deleted file mode 100644
index 9c3eed0c5e9b05e7f7dc09619ace7ebfc48f2e73..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/security/upgrade-insecure-requests/basic-upgrade.https.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!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
-// work, it won't load.
-var insecureImage = "http://127.0.0.1:8443/security/resources/abe.png";
-
-(function() {
- var t = async_test("Verify that images are upgraded.");
- t.step(function () {
- var i = document.createElement('img');
- i.onload = t.step_func(function () {
- assert_equals(i.naturalHeight, 103, "Height.");
- assert_equals(i.naturalWidth, 76, "Width.");
- t.done();
- });
- i.onerror = t.step_func(function () {
- assert_unreached("The image should load successfully.");
- });
-
- i.src = insecureImage;
- });
-}());
-
-(function() {
- var t = async_test("Verify that images have correct cross-origin behavior.");
- t.step(function () {
- var i = document.createElement('img');
- i.onload = t.step_func(function () {
- // Draw the image onto a canvas.
- var canvas = document.createElement('canvas');
- var ctx = canvas.getContext('2d');
- ctx.drawImage(i, 0, 0);
-
- // Grab a pixel to verify that the image is same-origin:
- try {
- var pixel = ctx.getImageData(0, 0, 1, 1);
- t.done();
- } catch (e) {
- assert_unreached("The image should be same-origin with this document.");
- }
- });
- i.onerror = t.step_func(function () {
- assert_unreached("The image should load successfully.");
- });
-
- i.src = insecureImage;
- });
-}());
-</script>

Powered by Google App Engine
This is Rietveld 408576698