https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 27f443364c7bc6ebbd569f8d6e8065992b66484c authored by Reza.Zakerinasab on 06 December 2018, 19:35:02 UTC
Check canvas color correction pipeline to be HDR
Tip revision: 27f4433
image-redirect-upgrade.https.html
<!DOCTYPE html>
<html>
<head>
<title>Upgrade Insecure Requests: Redirected Images.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./support/testharness-helper.sub.js"></script>

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
</head>
<body>
<script>
var tests = [
  generateRedirect(Host.SAME_ORIGIN, Protocol.INSECURE, generateURL(Host.SAME_ORIGIN, Protocol.INSECURE, ResourceType.IMAGE)),
  generateRedirect(Host.SAME_ORIGIN, Protocol.INSECURE, generateURL(Host.SAME_ORIGIN, Protocol.SECURE, ResourceType.IMAGE)),
  generateRedirect(Host.SAME_ORIGIN, Protocol.INSECURE, generateURL(Host.CROSS_ORIGIN, Protocol.INSECURE, ResourceType.IMAGE)),
  generateRedirect(Host.SAME_ORIGIN, Protocol.INSECURE, generateURL(Host.CROSS_ORIGIN, Protocol.SECURE, ResourceType.IMAGE)),
  generateRedirect(Host.SAME_ORIGIN, Protocol.SECURE, generateURL(Host.SAME_ORIGIN, Protocol.INSECURE, ResourceType.IMAGE)),
  generateRedirect(Host.SAME_ORIGIN, Protocol.SECURE, generateURL(Host.SAME_ORIGIN, Protocol.SECURE, ResourceType.IMAGE)),
  generateRedirect(Host.SAME_ORIGIN, Protocol.SECURE, generateURL(Host.CROSS_ORIGIN, Protocol.INSECURE, ResourceType.IMAGE)),
  generateRedirect(Host.SAME_ORIGIN, Protocol.SECURE, generateURL(Host.CROSS_ORIGIN, Protocol.SECURE, ResourceType.IMAGE)),
  generateRedirect(Host.CROSS_ORIGIN, Protocol.INSECURE, generateURL(Host.SAME_ORIGIN, Protocol.INSECURE, ResourceType.IMAGE)),
  generateRedirect(Host.CROSS_ORIGIN, Protocol.INSECURE, generateURL(Host.SAME_ORIGIN, Protocol.SECURE, ResourceType.IMAGE)),
  generateRedirect(Host.CROSS_ORIGIN, Protocol.INSECURE, generateURL(Host.CROSS_ORIGIN, Protocol.INSECURE, ResourceType.IMAGE)),
  generateRedirect(Host.CROSS_ORIGIN, Protocol.INSECURE, generateURL(Host.CROSS_ORIGIN, Protocol.SECURE, ResourceType.IMAGE)),
  generateRedirect(Host.CROSS_ORIGIN, Protocol.SECURE, generateURL(Host.SAME_ORIGIN, Protocol.INSECURE, ResourceType.IMAGE)),
  generateRedirect(Host.CROSS_ORIGIN, Protocol.SECURE, generateURL(Host.SAME_ORIGIN, Protocol.SECURE, ResourceType.IMAGE)),
  generateRedirect(Host.CROSS_ORIGIN, Protocol.SECURE, generateURL(Host.CROSS_ORIGIN, Protocol.INSECURE, ResourceType.IMAGE)),
  generateRedirect(Host.CROSS_ORIGIN, Protocol.SECURE, generateURL(Host.CROSS_ORIGIN, Protocol.SECURE, ResourceType.IMAGE)),
];

tests.forEach(test => {
  async_test(t => assert_image_loads(t, test.url, 64, 168), test.name);
  async_test(t => assert_image_loads_in_srcdoc(t, test.url, 64, 168), test.name + " in <iframe srcdoc>");
  async_test(t => assert_image_loads_in_blank(t, test.url, 64, 168), test.name + " in <iframe>");
});
</script>
</body>
</html>
back to top