blob: 1948fba5226ee2f95a6961755ea79b7ff4329948 [file] [log] [blame]
<!doctype html>
<html>
<!--
The bug is that the CSS Regions feature leaks information at run-time. There are JS properties that exist even
if the feature is disabled at run-time (document.webkitGetNamedFlows, document.body.webkitRegionOverset,
document.body.webkitGetRegionFlowRanges and window.WebKitCSSRegionRule).
The best LayoutTest would test that the properties exist when the feature is enabled and that the properties
just aren't there when the feature is disabled.
But, since during running Layout Tests the feature is enabled by default and switching the
RuntimeEnabledFeatures requires the process to be restarted and that is currently not possible, we can only test
that the properties exist and have the proper type.
On success, you should see a series of PASS messages.
-->
<head>
<script src="../../http/tests/resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("<p>Test for <a href=\"https://bugs.webkit.org/show_bug.cgi?id=94070\">94070 [CSSRegions] broken feature detection: syntax parsing succeeds when CSS REGIONS is disabled at runtime</a></p>");
shouldBeEqualToString( "typeof(document.webkitGetNamedFlows)", "function" );
shouldBeEqualToString( "typeof(document.body.webkitRegionOverset)", "string" );
shouldBeEqualToString( "typeof(document.body.webkitGetRegionFlowRanges)", "function" );
shouldBeDefined( "window.WebKitCSSRegionRule" );
/*
// FIXME: uncomment the following code when switching a RuntimeEnabledFeatures flag doesn't require the browser
// process to be restarted.
if(window.testRunner)
window.testRunner.overridePreference("WebKitCSSRegionsEnabled", false);
shouldBeFalse( "'webkitGetNamedFlows' in document" );
shouldBeFalse( "document.body.hasOwnProperty( 'webkitRegionOverset' )" );
shouldBeFalse( "'webkitGetRegionFlowRanges' in document.body" );
shouldBeUndefined( "window.WebKitCSSRegionRule" );
*/
</script>
<script src="../../http/tests/resources/js-test-post.js"></script>
</body>
</html>