| OLD | NEW |
| (Empty) |
| 1 <!doctype html> | |
| 2 <html> | |
| 3 <!-- | |
| 4 The bug is that the CSS Regions feature leaks information at run-time. T
here are JS properties that exist even | |
| 5 if the feature is disabled at run-time (document.webkitGetNamedFlows, docume
nt.body.webkitRegionOverset, | |
| 6 document.body.webkitGetRegionFlowRanges and window.WebKitCSSRegionRule). | |
| 7 The best LayoutTest would test that the properties exist when the featur
e 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 curr
ently 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)", "str
ing" ); | |
| 24 shouldBeEqualToString( "typeof(document.body.webkitGetRegionFlowRanges)"
, "function" ); | |
| 25 shouldBeDefined( "window.WebKitCSSRegionRule" ); | |
| 26 | |
| 27 /* | |
| 28 // FIXME: uncomment the following code when switching a RuntimeEnabledFe
atures flag doesn't require the browser | |
| 29 // process to be restarted. | |
| 30 if(window.testRunner) | |
| 31 window.testRunner.overridePreference("WebKitCSSRegionsEnabled", fals
e); | |
| 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> | |
| OLD | NEW |