Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / regions / region-leak-js-information-when-disabled-at-runtime.html
1 <!doctype html>
2 <html>
3     <!--
4         The bug is that the CSS Regions feature leaks information at run-time. There are JS properties that exist even
5     if the feature is disabled at run-time (document.webkitGetNamedFlows, document.body.webkitRegionOverset,
6     document.body.webkitGetRegionFlowRanges and window.WebKitCSSRegionRule).
7         The best LayoutTest would test that the properties exist when the feature is enabled and that the properties
8     just aren't there when the feature is disabled.
9         But, since during running Layout Tests the feature is enabled by default and switching the
10     RuntimeEnabledFeatures requires the process to be restarted and that is currently not possible, we can only test
11     that the properties exist and have the proper type.
12         On success, you should see a series of PASS messages.
13     -->
14     <head>
15         <script src="../../resources/js-test.js"></script>
16     </head>
17     <body>
18         <script>
19
20         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>");
21
22         shouldBeEqualToString( "typeof(document.webkitGetNamedFlows)", "function" );
23         shouldBeEqualToString( "typeof(document.body.webkitRegionOverset)", "string" );
24         shouldBeEqualToString( "typeof(document.body.webkitGetRegionFlowRanges)", "function" );
25         shouldBeDefined( "window.WebKitCSSRegionRule" );
26
27 /*
28         // FIXME: uncomment the following code when switching a RuntimeEnabledFeatures flag doesn't require the browser
29         // process to be restarted.
30         if(window.testRunner)
31             window.testRunner.overridePreference("WebKitCSSRegionsEnabled", false);
32
33         shouldBeFalse( "'webkitGetNamedFlows' in document" );
34         shouldBeFalse( "document.body.hasOwnProperty( 'webkitRegionOverset' )" );
35         shouldBeFalse( "'webkitGetRegionFlowRanges' in document.body" );
36         shouldBeUndefined( "window.WebKitCSSRegionRule" );
37 */
38         </script>
39     </body>
40 </html>