blob: c1c00dd59f8646e14b93de2b65d7a946e7945c4b [file] [log] [blame]
<!DOCTYPE html>
<meta name="assert" content="This test checks that a layout() function correctly fails an @supports rule on an insecure context." />
<script src="../resources/get-host-info.js"></script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<style>
#test {
content: 'pass';
}
@supports (display: layout(foo)) {
#test {
content: 'fail';
}
}
</style>
<div id="test"></div>
<script>
if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) {
window.location = get_host_info().UNAUTHENTICATED_ORIGIN + window.location.pathname;
} else {
test(function() {
const element = document.getElementById('test');
assert_false(window.isSecureContext);
assert_equals(getComputedStyle(element).content, '"pass"');
});
}
</script>