OLD | NEW |
| (Empty) |
1 <!doctype html> | |
2 <html> | |
3 <head> | |
4 <link rel="stylesheet" href="../resources/region-style.css"> | |
5 <script src="../resources/helper.js"></script> | |
6 </head> | |
7 <body> | |
8 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=79685">7968
5: [CSSRegions][CSSOM]Prevent creation of NamedFlow object for invalid flow name
</a></p> | |
9 <p>On success, you should see a series of PASS below.</p> | |
10 <div id="console"></div> | |
11 | |
12 <script> | |
13 if (window.testRunner) | |
14 window.testRunner.dumpAsText(); | |
15 // Try some invalid names. auto/default/inherit/initial/none values
are not allowed | |
16 // Empty string and -12px are not identifiers, so they cannot repres
ent valid flow names. | |
17 // Valid flow names followed by another css property do not form a v
alid flow name. | |
18 var arrFlowInvalidNames = ["auto", "default", "inherit", "initial",
"none", "", "-12px", "flow; color: red;"]; | |
19 var arrLen = arrFlowInvalidNames.length; | |
20 for (var i = 0; i < arrLen; ++i) { | |
21 var nullNamedFlow = getFlowByName(arrFlowInvalidNames[i]); | |
22 assert(nullNamedFlow == null, "Named flow for " + arrFlowInvalid
Names[i] + " should be null"); | |
23 } | |
24 | |
25 // It should not be possible to get the NamedFlow object for a missi
ng flow. | |
26 var namedFlow = getFlowByName("flow"); | |
27 assert(namedFlow == null, "Named flow for flow should be null"); | |
28 </script> | |
29 </body> | |
30 </html> | |
31 | |
OLD | NEW |