index.html (22174B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Shapes Level 1 Test Plan</title> 5 <meta http-equiv='Content-Type' content='text/html;charset=utf-8'/> 6 <!-- 7 === NOTA BENE === 8 For the three scripts below, if your spec resides on dev.w3 you can check them 9 out in the same tree and use relative links so that they'll work offline, 10 --> 11 <script src='http://www.w3.org/Tools/respec/respec-w3c-common' class='remove' async></script> 12 <script class='remove'> 13 var respecConfig = { 14 specStatus: "unofficial", 15 shortName: "css-shapes-1-test-plan", 16 editors: [ 17 { 18 name: "Rebecca Hauck", mailto: "rhauck@adobe.com", 19 company: "Adobe Systems, Inc.", companyURL: "http://www.adobe.com/" 20 }, 21 ], 22 testSuiteURI: "http://test.csswg.org/suites/css3-shapes/nightly-unstable/", 23 }; 24 </script> 25 <style> 26 a.bibref, 27 #references dt { 28 text-transform: uppercase; 29 } 30 </style> 31 </head> 32 <body> 33 <section id='abstract'> 34 <p> 35 This document is intended to be used as a guideline for the testing 36 activities related to the CSS Shapes Level 1 spec [[!css-shapes-1]]. Its main 37 goal is to provide an overview of the general testing areas, possible 38 caveats and testing aspects not immediately apparent from the spec. 39 Also, it provides a means of tracking the progress of the CSS Shapes 40 spec testing. 41 </p> 42 <p> 43 This document is not meant to replace the spec in determining the 44 normative and non-normative assertions to be tested, but rather 45 complement it. 46 </p> 47 </section> 48 49 <section> 50 <h2>Goals</h2> 51 <p> 52 To ensure a comprehensive test suite with useful, high quality tests, a 53 number of goals are proposed. They range from process goals (how to 54 conduct testing) to implementation goals (how to write good tests). 55 </p> 56 <section> 57 <h3>Enabling easy test contribution</h3> 58 <p> 59 An important vector in successfully testing CSS Shapes is to 60 enable easy test contributions, both from W3C partners and from 61 non-W3C members that wish to contribute. This is achieved by clearly 62 marking and explaining the areas that need testing, linking to existing 63 tests, and general testing progress. 64 </p> 65 </section> 66 <section> 67 <h3>Providing guidance on testing</h3> 68 <p> 69 In order to increase the quality of the test contributions, this 70 document offers a set of guidelines for conducting testing (see 71 <a href="#approach" class="sectionRef"></a>) and a testing progress 72 tracker to increase the surface coverage of tests (see 73 <a href="#test-progress-tracking" class="sectionRef"></a>). 74 </p> 75 </section> 76 <section> 77 <h3>Creating automation-friendly tests</h3> 78 <p> 79 In terms of actual tests produced for the CSS Shapes specification, the main goal 80 is to ensure that most tests are automatable (i.e. they're either 81 reftests or use <code>testharness.js</code>). Even where manual tests 82 are absolutely necessary they should be written so that they can be 83 easily automated – as there are ongoing efforts to make 84 WebDriver [[webdriver]] automated tests a first class citizen in W3C 85 testing. This means that even if a manual test requires user 86 interaction, the validation or PASS/FAIL conditions should still be 87 clear enough as to allow automatic validation if said interaction is 88 later automated. 89 </p> 90 </section> 91 </section> 92 <section> 93 <h2>Approach</h2> 94 <p> 95 Since the CSS Shapes Level 1 spec introduces only three new CSS properties, 96 the approach is to deep dive into every aspect of the spec as much as possible. 97 98 Tests will be created for the testing areas listed in <a href="#testing-areas" class="sectionRef"></a>. 99 </p> 100 </section> 101 <section> 102 <h2>Testing areas</h2> 103 <section> 104 <h3>Explicit testing areas</h3> 105 <p> 106 These are testing areas normatively defined by the spec. They cover 107 things explicitly or implicitly defined in the CSS Shapes spec. 108 Please note that while detailed, this list is not necessarily 109 exhaustive and normative behaviors may not be contained in it. 110 When in doubt, consult the CSS Shapes spec or ask a question on the 111 <a href="http://lists.w3.org/Archives/Public/www-style/">mailing 112 list</a>. 113 </p> 114 <p> 115 <section> 116 <h4>Proper parsing of the CSS properties and values according to the spec</h4> 117 <p class=note> 118 Note: For all of the tests below, where length parameters are tested, 119 the supported <a class="production css-code" data-link-type=type href=http://www.w3.org/TR/css3-values/#lengths title="<length>"><length></a> 120 units defined in the CSS Values & Units [[!CSS3VAL]] specification, but not all permutations will not be 121 tested. Instead, a sampling of these units will be used across the parsing and layout tests. 122 </p> 123 <ul> 124 <li> 125 <code>shape-outside</code> 126 <ul> 127 <li>none</li> 128 <li> 129 <code><basic-shape></code> 130 <ul> 131 <li> 132 <code>inset()</code> 133 <ul> 134 <li>0-4 arguments</li> 135 <li>length units</li> 136 <li>percentages</li> 137 <li>positive/negative lengths</li> 138 <li>decimal/non-decimal lengths</li> 139 <li>calc() lengths</li> 140 <li>no unit or %</li> 141 <li>commas / no commas</li> 142 <li>invalid arg values</li> 143 <li><code>round</code> keyword 144 <ul> 145 <li><code><border-radius></code> 146 <ul> 147 <li>0-8 arguments</li> 148 <li>position of '/'</li> 149 <li>length units</li> 150 <li>percentages</li> 151 <li>positive/negative lengths</li> 152 <li>decimal/non-decimal lengths</li> 153 <li>calc() lengths</li> 154 <li>no unit or %</li> 155 <li>commas / no commas</li> 156 <li>invalid values</li> 157 </ul> 158 </li> 159 </ul> 160 </li> 161 </ul> 162 </li> 163 <li><code>circle()</code> 164 <ul> 165 <li><code><shape-radius></code> 166 <ul> 167 <li>0-1 args (valid), 2 args (invalid)</li> 168 <li>length units</li> 169 <li>percentages</li> 170 <li>positive/negative lengths</li> 171 <li>decimal/non-decimal lengths</li> 172 <li>calc() lengths</li> 173 <li>no unit or %</li> 174 <li>commas / no commas</li> 175 <li>invalid arg values</li> 176 <li><code>closest-side, farthest-side</code> keywords</li> 177 </ul> 178 </li> 179 <li><code>at</code> keyword 180 <ul> 181 <li><code><position></code> 182 <ul> 183 <li>0-4 arguments</li> 184 <li>length units</li> 185 <li>percentages</li> 186 <li>positive/negative lengths</li> 187 <li>decimal/non-decimal lengths</li> 188 <li>calc() lengths</li> 189 <li>no unit or %</li> 190 <li>commas / no commas</li> 191 <li>invalid values</li> 192 <li><code>top, left, bottom, right</code> keywords</li> 193 </ul> 194 </li> 195 </ul> 196 </li> 197 </ul> 198 </li> 199 <li><code>ellipse()</code> 200 <ul> 201 <li><code><shape-radius></code> 202 <ul> 203 <li>0-2 args (valid), 3 args (invalid)</li> 204 <li><i>Plus all of the same shape-radius tests listed above for circle()</i></li> 205 </ul> 206 </li> 207 <li><i>Plus all of the <code>at <position></code> tests listed above for circle()</i></li> 208 </ul> 209 </li> 210 <li><code>polygon()</code> 211 <li><code><shape-arg></code>'s 212 <ul> 213 <li>1-6 vertices (valid), 0 vertices (invalid)</li> 214 <li>length units</li> 215 <li>percentages</li> 216 <li>positive/negative lengths</li> 217 <li>decimal/non-decimal lengths</li> 218 <li>calc() lengths</li> 219 <li>no unit or %</li> 220 <li>commas / no commas</li> 221 <li>invalid arg values</li> 222 </ul> 223 <li><code><fill-rule></code> 224 <ul> 225 <li><code>not specified (default: nonzero)</code></li> 226 <li><code>nonzero</code></li> 227 <li><code>evenodd</code></li> 228 <li>invalid values</li> 229 </ul> 230 </li> 231 </li> 232 </ul> 233 </li> 234 <li><code><box></code> 235 <ul> 236 <li><code>margin-box</code></li> 237 <li><code>border-box</code></li> 238 <li><code>padding-box</code></li> 239 <li><code>content-box</code></li> 240 </ul> 241 </li> 242 <li><code><basic-shape> + <box></code> 243 <ul> 244 <li>A sampling of the tests above combined together to test basic-shape with shape-box</li> 245 </ul> 246 </li> 247 <li><code><image></code></li> 248 </ul> 249 </li> 250 <li><code>shape-margin</code> 251 <ul> 252 <li>length units</li> 253 <li>percentages</li> 254 <li>positive/negative lengths</li> 255 <li>decimal/non-decimal lengths</li> 256 <li>calc() lengths</li> 257 <li>no unit or %</li> 258 <li>invalid values</li> 259 </ul> 260 </li> 261 <li><code>shape-image-threshold</code> 262 <ul> 263 <li>decimal - 0-5 places</li> 264 <li>no decimal</li> 265 <li>percentage (invalid)</li> 266 <li>positive/negative values</li> 267 <li>decimal/non-decimal lengths</li> 268 <li>calc() lengths</li> 269 <li>+ / - signs</li> 270 <li>invalid values</li> 271 </ul> 272 </li> 273 </ul> 274 </section> 275 <section> 276 <h4>Proper serialization of the CSS properties and values according to the spec</h4> 277 <ul> 278 <li><code><position></code> values in <code>circle</code> and <code>ellipse</code> serialize to 2- and 4-value forms 279 <ul> 280 <li><code>top, left, bottom, right</code> serialize to percentages</li> 281 <li>omitting radii omits radii from serialization</li> 282 </ul> 283 </li> 284 <li><code>inset</code> serialized shape-args omit args when possible</li> 285 <li><code><round></code> values in <code>inset</code> serialize to as few as possible</li> 286 <li>unspecified <code><fill-rule></code> serializes <code>nonzero</code></li> 287 <li>0% is preferred over zero length</li> 288 <li>calc() is avoided</li> 289 </ul> 290 </section> 291 <section> 292 <h4>Proper computed values of the CSS properties and values according to the spec</h4> 293 <ul> 294 <li>lengths compute to px</li> 295 <li>percentages keep %</li> 296 <li>calc() preserved</li> 297 </ul> 298 </section> 299 <section> 300 <h4>Proper rendering & layout of text around shapes according to the spec</h4> 301 <ul> 302 <li>Basic Shapes 303 <ul> 304 <li>inset 305 <ul> 306 <li>square corners</li> 307 <li>rounded corners</li> 308 <li>rounded corners to make circles & ellipses</li> 309 </ul> 310 </li> 311 <li>circle, ellipse 312 <ul> 313 <li>explicit/implicit radii</li> 314 <li>explicit/implicit position</li> 315 <li>closest-side / farthest-side</li> 316 </ul> 317 </li> 318 <li>polygon 319 <ul> 320 <li>relative/absolute units</li> 321 <li>fill-rule: evenodd/nonzero</li> 322 </ul> 323 </li> 324 <li>float left / right</li> 325 <li>shape-margin</li> 326 <li>shape-box</code> 327 <ul> 328 <li>unspecified</li> 329 <li>specified: 330 <ul> 331 <li>margin-box</li> 332 <li>border-box</li> 333 <li>padding-box</li> 334 <li>content-box</li> 335 </ul> 336 </li> 337 </ul> 338 </li> 339 </ul> 340 </li> 341 <li>Shapes from Box Values 342 <ul> 343 <li>margin-box, border-box, padding-box, content-box</li> 344 <li>all, top, left, bottom, right, top-left, top-bottom, top-right, left-right, left-bottom, right-bottom</li> 345 <li>float left / right</li> 346 <li>border-radius</li> 347 </ul> 348 </li> 349 <li>Shapes from Images 350 <ul> 351 <li>url 352 <ul> 353 <li>png, svg, gif, jpeg</li> 354 <li>transparency/no transparency</li> 355 </ul> 356 </li> 357 <li>image-list 358 <ul> 359 <li>png, svg, gif, jpeg</li> 360 <li>transparency/no transparency</li> 361 </ul> 362 </li> 363 <li>gradient 364 <ul> 365 <li>linear</li> 366 <li>radial</li> 367 <li>repeating</li> 368 </ul> 369 </li> 370 <li>float left / right</li> 371 <li>shape-margin</li> 372 <li>shape-image-threshold</li> 373 </ul> 374 </li> 375 <li>Float Tests 376 <ul> 377 <li>Float stacking</li> 378 <li>Line boxes affected by both float right and float left shapes at the same time</li> 379 <li>Empty float areas</li> 380 <li>Shapes that extend past the margin box edge</li> 381 </ul> 382 </li> 383 </ul> 384 </li> 385 </section> 386 </section> 387 <section> 388 <h3>Implicit testing areas</h3> 389 <p> 390 These are testing areas either normatively defined in other specs 391 that are explicitly referred to in the CSS Shapes spec. Additionally, the 392 CSS Shapes spec is explicitly referred to by other specs. Please note that 393 while detailed, this list is not necessarily exhaustive and normative behaviors 394 may not be contained in it. When in doubt, consult the CSS Regions spec or ask 395 a question on the <a href="http://lists.w3.org/Archives/Public/www-style/">mailing list</a>. 396 </p> 397 <p> 398 Below is the list of implicit testing areas: 399 <ul> 400 <li>CSS 2.1 [[!CSS21]]</li> 401 <li>CSS Box Model [[!CSS3BOX]]</li> 402 <li>CSS Values & Units [[!CSS3VAL]]</li> 403 <li>CSS Backgrounds & Borders [[!CSS3BG]]</li> 404 <li>HTML5 [[!HTML5]]</li> 405 <li>CSS Masking [[CSS-MASKING]]</li> 406 <li>CSS Exclusions [[CSS-EXCLUSIONS]]</li> 407 </ul> 408 </p> 409 </section> 410 <section> 411 <h3>Interactions with other CSS features & specifications</h3> 412 <p>When the CSS Shapes spec has a full suite of tests covering the behaviors defined in the spec, 413 additional tests will be needed to assure that the implementation works properly with other 414 CSS features defined in other specifications. 415 </p> 416 <p>Below is a list of features that should work properly with CSS Shapes:</p> 417 <ul> 418 <li>CSS Transforms</li> 419 <li>CSS Transitions</li> 420 <li>CSS Animations</li> 421 <li>CSS Exclusions</li> 422 <li>CSS Writing Modes - when the float and container have different 'writing-mode' and 'direction' properties</li> 423 </ul> 424 </section> 425 <section> 426 <h2>People and responsibilities</h2> 427 <p> 428 Below is a list of people you should reach out to if you have any 429 questions related to this document or testing CSS Shapes in general: 430 <ul> 431 <li>Alan Stearns – Editor for CSS Shapes spec</li> 432 <li>Rebecca Hauck – Test Coordinator for CSS Regions</li> 433 </ul> 434 </p> 435 </section> 436 <section> 437 <h2>Test progress tracking</h2> 438 <p> 439 Currently test progress tracking is done via gitHub 440 <a href="https://github.com/w3c/csswg-test/issues?labels=spec%3Ashapes&milestone=&page=1&state=open">milestones 441 and issues</a>. 442 <!-- FIXME: Add more details once issues were created for all test areas. --> 443 </p> 444 </section> 445 </body> 446 </html>