Commit 220935b0 authored by Carlos IL's avatar Carlos IL Committed by Commit Bot

Added layout tests for mixed content autoupgrade.

Added layout tests that verify experiment functionality for blockable,
optionally blockable, and all mixed content.

Change-Id: I2f8496308ecfc0ad53d50ab102e474b7946aee36
Reviewed-on: https://chromium-review.googlesource.com/c/1259466
Commit-Queue: Carlos IL <carlosil@chromium.org>
Reviewed-by: default avatarMike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597640}
parent 2b5354f1
...@@ -1931,5 +1931,8 @@ crbug.com/870172 virtual/outofblink-cors-ns/http/tests/xmlhttprequest/origin-whi ...@@ -1931,5 +1931,8 @@ crbug.com/870172 virtual/outofblink-cors-ns/http/tests/xmlhttprequest/origin-whi
crbug.com/870172 virtual/outofblink-cors-ns/http/tests/xmlhttprequest/origin-whitelisting-subdomains.html [ WontFix ] crbug.com/870172 virtual/outofblink-cors-ns/http/tests/xmlhttprequest/origin-whitelisting-subdomains.html [ WontFix ]
crbug.com/870172 virtual/outofblink-cors-ns/http/tests/xmlhttprequest/origin-whitelisting-ip-addresses.html [ WontFix ] crbug.com/870172 virtual/outofblink-cors-ns/http/tests/xmlhttprequest/origin-whitelisting-ip-addresses.html [ WontFix ]
# Tests that only work when the mixed content autoupgrade experiment is enabled
http/tests/mixed-autoupgrade [ WontFix ]
# Not expected to pass in default configuration, only virtual test suite. # Not expected to pass in default configuration, only virtual test suite.
crbug.com/830901 fast/webgl/video-metadata/texImage-video-last-uploaded-metadata.html [ WontFix ] crbug.com/830901 fast/webgl/video-metadata/texImage-video-last-uploaded-metadata.html [ WontFix ]
...@@ -769,6 +769,21 @@ ...@@ -769,6 +769,21 @@
"base": "display-lock", "base": "display-lock",
"args": ["--enable-blink-features=DisplayLocking"] "args": ["--enable-blink-features=DisplayLocking"]
}, },
{
"prefix" : "autoupgrade-optionally-blockable-mixed-content",
"base": "http/tests/mixed-autoupgrade/optionally",
"args": ["--enable-features=AutoupgradeMixedContent<AU --force-fieldtrials=AU/G1 --force-fieldtrial-params=AU.G1:mode/optionally-blockable"]
},
{
"prefix" : "autoupgrade-blockable-mixed-content",
"base": "http/tests/mixed-autoupgrade/blockable",
"args": ["--enable-features=AutoupgradeMixedContent<AU --force-fieldtrials=AU/G1 --force-fieldtrial-params=AU.G1:mode/blockable"]
},
{
"prefix" : "autoupgrade-all-mixed-content",
"base": "http/tests/mixed-autoupgrade/all",
"args": ["--enable-features=AutoupgradeMixedContent"]
},
{ {
"prefix": "webgl-extra-video-texture-metadata", "prefix": "webgl-extra-video-texture-metadata",
"base": "fast/webgl/video-metadata", "base": "fast/webgl/video-metadata",
......
<!DOCTYPE html>
<html>
<head>
<title>Autoupgrade mixed content: All.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="http://web-platform.test:8443/mixed-autoupgrade/resources/test.js"></script>
</head>
<body>
<script>
async_test(t => pass_test(t), "Script autoupgraded");
async_test(t => assert_image_loads(t), "Image autoupgraded");
function assert_image_loads(test) {
var url = new URL("http://web-platform.test:8443/mixed-autoupgrade/resources/pass.png")
var i = document.createElement('img');
i.onload = test.step_func_done(_ => {
assert_equals(i.naturalHeight, 64, "Height.");
assert_equals(i.naturalWidth, 168, "Width.");
});
i.onerror = test.unreached_func("Image should load successfully from " + url);
i.src = url;
}
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Autoupgrade mixed content: Blockable.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="http://web-platform.test:8443/mixed-autoupgrade/resources/test.js"></script>
</head>
<body>
<script>
async_test(t => pass_test(t), "Script autoupgraded");
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Autoupgrade mixed content: Optionally Blockable.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
async_test(t => assert_image_loads(t), "Image autoupgraded");
function assert_image_loads(test) {
var url = new URL("http://web-platform.test:8443/mixed-autoupgrade/resources/pass.png")
var i = document.createElement('img');
i.onload = test.step_func_done(_ => {
assert_equals(i.naturalHeight, 64, "Height.");
assert_equals(i.naturalWidth, 168, "Width.");
});
i.onerror = test.unreached_func("Image should load successfully from " + url);
i.src = url;
}
</script>
</body>
</html>
Tests that depend on the AutoupgradeMixedContent feature with the "mode" parameter set to "all".
\ No newline at end of file
Tests that depend on the AutoupgradeMixedContent feature with the "mode" parameter set to "blockable".
Tests that depend on the AutoupgradeMixedContent feature with the "mode" parameter set to "optionally-blockable".
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment