OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <!-- | 3 <!-- |
4 The bug is that the CSS Regions feature leaks information at run-time. T
here are JS properties that exist even | 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, | 5 if the feature is disabled at run-time (document.webkitGetNamedFlows, docume
nt.body.webkitRegionOverset, |
6 document.body.webkitGetRegionFlowRanges and window.WebKitCSSRegionRule). | 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 | 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. | 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 | 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 | 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. | 11 that the properties exist and have the proper type. |
12 On success, you should see a series of PASS messages. | 12 On success, you should see a series of PASS messages. |
13 --> | 13 --> |
14 <head> | 14 <head> |
15 <script src="../../fast/js/resources/js-test-pre.js"></script> | 15 <script src="../../resources/js-test.js"></script> |
16 </head> | 16 </head> |
17 <body> | 17 <body> |
18 <script> | 18 <script> |
19 | 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>"); | 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 | 21 |
22 shouldBeEqualToString( "typeof(document.webkitGetNamedFlows)", "function
" ); | 22 shouldBeEqualToString( "typeof(document.webkitGetNamedFlows)", "function
" ); |
23 shouldBeEqualToString( "typeof(document.body.webkitRegionOverset)", "str
ing" ); | 23 shouldBeEqualToString( "typeof(document.body.webkitRegionOverset)", "str
ing" ); |
24 shouldBeEqualToString( "typeof(document.body.webkitGetRegionFlowRanges)"
, "function" ); | 24 shouldBeEqualToString( "typeof(document.body.webkitGetRegionFlowRanges)"
, "function" ); |
25 shouldBeDefined( "window.WebKitCSSRegionRule" ); | 25 shouldBeDefined( "window.WebKitCSSRegionRule" ); |
26 | 26 |
27 /* | 27 /* |
28 // FIXME: uncomment the following code when switching a RuntimeEnabledFe
atures flag doesn't require the browser | 28 // FIXME: uncomment the following code when switching a RuntimeEnabledFe
atures flag doesn't require the browser |
29 // process to be restarted. | 29 // process to be restarted. |
30 if(window.testRunner) | 30 if(window.testRunner) |
31 window.testRunner.overridePreference("WebKitCSSRegionsEnabled", fals
e); | 31 window.testRunner.overridePreference("WebKitCSSRegionsEnabled", fals
e); |
32 | 32 |
33 shouldBeFalse( "'webkitGetNamedFlows' in document" ); | 33 shouldBeFalse( "'webkitGetNamedFlows' in document" ); |
34 shouldBeFalse( "document.body.hasOwnProperty( 'webkitRegionOverset' )" )
; | 34 shouldBeFalse( "document.body.hasOwnProperty( 'webkitRegionOverset' )" )
; |
35 shouldBeFalse( "'webkitGetRegionFlowRanges' in document.body" ); | 35 shouldBeFalse( "'webkitGetRegionFlowRanges' in document.body" ); |
36 shouldBeUndefined( "window.WebKitCSSRegionRule" ); | 36 shouldBeUndefined( "window.WebKitCSSRegionRule" ); |
37 */ | 37 */ |
38 </script> | 38 </script> |
39 </body> | 39 </body> |
40 </html> | 40 </html> |
OLD | NEW |