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