summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-grid/test-plan/index.html
blob: 039f3a87c1a7d042af4ac043b1a5c4c4cb6c0d1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
<!DOCTYPE html>
<html>
  <head>
    <title>CSS Grid Layout Module Level 1 Test Plan</title>
    <meta http-equiv='Content-Type' content='text/html;charset=utf-8'/>
    <!--
      === NOTA BENE ===
      For the three scripts below, if your spec resides on dev.w3 you can check them
      out in the same tree and use relative links so that they'll work offline,
     -->
    <script src='http://www.w3.org/Tools/respec/respec-w3c-common' class='remove' async></script>
    <script class='remove'>
      var respecConfig = {
          publishDate: "2015-07-10",
          shortName: "css-grid-1-test-plan",
          specStatus: "unofficial",
          editors: [
            {
              name: "Manuel Rego Casasnovas", mailto: "rego@igalia.com",
              company: "Igalia, S.L.", companyURL: "http://www.igalia.com/"
            },
          ],
          testSuiteURI: "http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/",
      };
    </script>
    <style>
    a.bibref,
    #references dt {
      text-transform: uppercase;
    }
    </style>
  </head>
  <body>
    <section id='abstract'>
      <p>
        This document is intended to be used as a guideline for the testing
        activities related to the CSS Grid Layout Level 1 spec
        [[!css3-grid-layout]]. Its main goal is to provide an overview of the
        general testing areas, possible caveats and testing aspects not
        immediately apparent from the spec. Also, it provides a means of
        tracking the progress of the CSS Grid Layout spec testing.
      </p>
      <p>
        This document is not meant to replace the spec in determining the
        normative and non-normative assertions to be tested, but rather
        complement it.
      </p>
    </section>

    <section>
      <h2>Introduction</h2>
      <p>
        As CSS moved away from the monolithic development of CSS 2.1 to the
        modular development of CSS 3, the number of proposed new features and
        the complexity of the layout landscape have increased dramatically.
        While this directly translates to increased flexibility and agility in
        adopting and implementing new CSS features, it also increases the
        complexity of testing CSS features and the need for coordinating the
        testing efforts. Also, the need for testing coordination increases as
        crowd-sourcing efforts like
        <a href="http://testthewebforward.org/" target="_blank">Test the Web
        Forward</a> present people less familiar with the processes and
        policies of the W3C with the opportunity to contribute new tests.
      </p>
      <p>
        Except when defining new behaviors or redefining old behaviors, the
        implicit assumption for new CSS modules is that they play nicely with
        other modules or properties defined in CSS 2.1 [[!CSS21]]. As CSS Grid
        Layout is a spec that touches many aspects of layout, styling and
        CSSOM, it's not unreasonable to want to test the spec against these
        implicit assumptions, too.
      </p>
      <p>
        This testing strategy document is meant to complement the CSS Grid
        Layout spec and the existing test suite by providing an overview of
        the testing areas (especially the less apparent ones) and tracking
        the progress of the testing activities against these test areas.
      </p>
    </section>

    <section>
      <h2>Goals</h2>
      <p>
        To ensure a comprehensive test suite with useful, high quality tests,
        a number of goals are proposed. They range from process goals (how to
        conduct testing) to implementation goals (how to write good tests).
      </p>
      <section>
        <h3>Enabling easy test contribution</h3>
        <p>
          An important vector in successfully testing CSS Grid Layout is to
          enable easy test contributions, both from W3C partners and from
          non-W3C members that wish to contribute. This is achieved by clearly
          marking and explaining the areas that need testing, linking to
          existing tests, and general testing progress.
        </p>
      </section>
      <section>
        <h3>Providing guidance on testing</h3>
        <p>
          In order to increase the quality of the test contributions, this
          document offers a set of guidelines for conducting testing (see
          <a href="#approach" class="sectionRef"></a>) and a testing progress
          tracker to increase the surface coverage of tests (see
          <a href="#test-progress-tracking" class="sectionRef"></a>).
        </p>
      </section>
      <section>
        <h3>Creating automation-friendly tests</h3>
        <p>
          In terms of actual tests produced for the CSS Grid Layout
          specification, the main goal is to ensure that most tests are
          automatable (i.e. they're either reftests or use
          <code>testharness.js</code>). Even where manual tests are absolutely
          necessary they should be written so that they can be easily
          automated &ndash; as there are ongoing efforts to make WebDriver
          [[webdriver]] automated tests a first class citizen in W3C testing.
          This means that even if a manual test requires user interaction,
          the validation or PASS/FAIL conditions should still be clear enough
          as to allow automatic validation if said interaction is later
          automated.
        </p>
      </section>
    </section>
    <section>
		<h2>Approach</h2>
		<p>
            As spec testing cannot be realistically separated from testing a
            particular implementation (except for the very simple cases), the
            approach proposed for testing is one that tries to first cover as
            many areas as possible, instead of deep diving on a certain
            feature or aspect of the spec first. A side benefit of this
            approach is that the spec tests can be used at any time to gauge
            the level of support of a certain implementation.
        </p>
        <p>
            Having this <em>breadth-first</em> approach in mind, tests will be
            created for the testing areas listed in <a href="#testing-areas"
            class="sectionRef"></a>. Testing will be done in multiple passes,
            each aimed at covering more specific edge-cases.
        </p>
	</section>
	<section>
      <h2>Testing areas</h2>
      <section>
        <h3>Explicit testing areas</h3>
        <p>
          These are testing areas normatively defined by the spec. They cover
          things explicitly or implicitly defined in the CSS Grid Layout spec.
          Please note that while detailed, this list is not necessarily
          exhaustive and normative behaviors may not be contained in it.
          When in doubt, consult the CSS Grid Layout spec or ask a question on
          the <a href="http://lists.w3.org/Archives/Public/www-style/">mailing
          list</a> adding <kbd>[css-grid]</kbd> to the subject.
        </p>
        <section>
          <h4>Grid Containers (<kbd>grid-model</kbd>)</h4>
          <ul>
            <li>
              <code>grid</code> and <code>inline-grid</code> values for
              <code>display</code> property
              [<a href="https://github.com/w3c/csswg-test/issues/627">#627</a>].
            </li>
            <li>
              Grid container’s margins do not collapse with the margins of its
              contents
              [<a href="https://github.com/w3c/csswg-test/issues/661">#661</a>].
            </li>
            <li>
              <code>column-*</code> properties have no effect on a grid
              container
              [<a href="https://github.com/w3c/csswg-test/issues/628">#628</a>].
            </li>
            <li>
              <code>float</code> and <code>clear</code> have no effect on a
              grid item
              [<a href="https://github.com/w3c/csswg-test/issues/629">#629</a>].
            </li>
            <li>
              <code>float</code> affects to the computed value of display on
              grid items
              [<a href="https://github.com/w3c/csswg-test/issues/630">#630</a>].
            </li>
            <li>
              <code>vertical-align</code> has no effect on a grid item
              [<a href="https://github.com/w3c/csswg-test/issues/631">#631</a>].
            </li>
            <li>
              <code>first-line</code> and <code>first-letter</code> do not
              apply to grid containers
              [<a href="https://github.com/w3c/csswg-test/issues/632">#632</a>].
            </li>
            <li>
              Sizing grid containers
              [<a href="https://github.com/w3c/csswg-test/issues/638">#638</a>].
            </li>
          </ul>
        </section>
        <section>
          <h4>Grid Items (<kbd>grid-items</kbd>)</h4>
          <ul>
            <li>
              Each child of a grid container becomes a grid item
              [<a href="https://github.com/w3c/csswg-test/issues/639">#639</a>].
            </li>
            <li>
              Each contiguous run of text that is directly contained inside
              grid container is wrapped in an anonymous grid item
              [<a href="https://github.com/w3c/csswg-test/issues/640">#640</a>].
            </li>
            <li>
              <code>visibility</code> property.
              <div class="note">Still undefined in the spec.</div>
            </li>
            <li>
              <code>order</code> property
              [<a href="https://github.com/w3c/csswg-test/issues/641">#641</a>].
            </li>
            <li>
              Static position
              [<a href="https://github.com/w3c/csswg-test/issues/642">#642</a>
              &amp;
              <a href="https://github.com/w3c/csswg-test/issues/643">#643</a>].
            </li>
            <li>
              Z-axis ordering:
              <ul>
                <li>
                  <code>z-index</code> property
                  [<a href="https://github.com/w3c/csswg-test/issues/677">#677</a>].
                </li>
              </ul>
            </li>
            <li>
              Minimum size of grid items
              [<a href="https://github.com/w3c/csswg-test/issues/799">#799</a>].
            </li>
          </ul>
        </section>
        <section>
          <h4>The Explicit Grid (<kbd>grid-definition</kbd>)</h4>
          <ul>
            <li>
              Track sizing:
              <ul>
                <li>
                  <code>grid-template-columns</code> and
                  <code>grid-template-rows</code> properties
                  [<a href="https://github.com/w3c/csswg-test/issues/644">#644</a>].
                </li>
                <li>
                  <kbd>&lt;track-size&gt;</kbd>: <code>length</code>,
                  <code>percentage</code>, <code>max-content</code>,
                  <code>min-content</code>, <code>minmax(min, max)</code>,
                  <code>auto</code>.
                </li>
                <li>
                  Named grid lines (<kbd>&lt;custom-ident&gt;</kbd>)
                  [<a href="https://github.com/w3c/csswg-test/issues/645">#645</a>].
                </li>
                <li>
                  <code>repeat()</code> notation
                  [<a href="https://github.com/w3c/csswg-test/issues/646">#646</a>].
                </li>
                <li>
                  Flexible lengths: <code>fr</code> unit
                  [<a href="https://github.com/w3c/csswg-test/issues/647">#647</a>].
                </li>
                <li>
                  <code>subgrid</code> keyword.
                  <div class="note">Subgrid feature is currently at-risk.</div>
                </li>
                <li>
                  Resolved values
                  [<a href="https://github.com/w3c/csswg-test/issues/648">#648</a>].
                </li>
              </ul>
            </li>
            <li>
              Named areas:
              <ul>
                <li>
                  <code>grid-template-areas</code> property
                  [<a href="https://github.com/w3c/csswg-test/issues/649">#649</a>].
                </li>
                <li>
                  Implicit named grid lines
                  [<a href="https://github.com/w3c/csswg-test/issues/650">#650</a>].
                </li>
                <li>
                  Implicit named areas
                  [<a href="https://github.com/w3c/csswg-test/issues/651">#651</a>].
                </li>
              </ul>
            </li>
            <li>
              Explicit grid shorthand:
              <ul>
                <li>
                  <code>grid-template</code> property
                  [<a href="https://github.com/w3c/csswg-test/issues/652">#652</a>].
                </li>
              </ul>
            </li>
          </ul>
        </section>
        <section>
          <h4>The Implicit Grid (<kbd>implicit-grids</kbd>)</h4>
          <ul>
            <li>
              <code>grid-auto-rows</code> and <code>grid-auto-columns</code>
              properties
              [<a href="https://github.com/w3c/csswg-test/issues/662">#662</a>].
            </li>
            <li>
              <code>grid-auto-flow</code> property
              [<a href="https://github.com/w3c/csswg-test/issues/663">#663</a>].
            </li>
          </ul>
        </section>
        <section>
          <h4>Grid Definition Shorthand (<kbd>grid-shorthand</kbd>)</h4>
          <ul>
            <li>
              <code>grid</code> property
              [<a href="https://github.com/w3c/csswg-test/issues/664">#664</a>].
            </li>
          </ul>
        </section>
        <section>
          <h4>Placing Grid Items (<kbd>placement</kbd>)</h4>
          <ul>
            <li>
              Common patterns:
              <ul>
                <li>
                  Named areas
                  [<a href="https://github.com/w3c/csswg-test/issues/665">#665</a>].
                </li>
                <li>
                  Numeric indexes and spans
                  [<a href="https://github.com/w3c/csswg-test/issues/666">#666</a>].
                </li>
                <li>
                  Named lines and spans
                  [<a href="https://github.com/w3c/csswg-test/issues/667">#667</a>].
                </li>
                <li>
                  Auto placement
                  [<a href="https://github.com/w3c/csswg-test/issues/668">#668</a>].
                </li>
                <li>
                  Auto sizing siblings.
                  <div class="note">Subgrid feature is currently at-risk.</div>
                </li>
              </ul>
            </li>
            <li>
              Line-based placement:
              <ul>
                <li>
                  <code>grid-row-start</code>, <code>grid-column-start</code>,
                  <code>grid-row-end</code> and <code>grid-column-end</code>
                  properties
                  [<a href="https://github.com/w3c/csswg-test/issues/669">#669</a>].
                </li>
                <li>
                  Grid placement conflict handling
                  [<a href="https://github.com/w3c/csswg-test/issues/670">#670</a>].
                </li>
              </ul>
            </li>
            <li>
              Placement shorthands:
              <ul>
                <li>
                  <code>grid-column</code>, <code>grid-row</code> and
                  <code>grid-area</code> properties
                  [<a href="https://github.com/w3c/csswg-test/issues/671">#671</a>].
                </li>
              </ul>
            </li>
            <li>
              Absolutely-positioned grid items
              [<a href="https://github.com/w3c/csswg-test/issues/672">#672</a>].
            </li>
            <li>
              Grid item placement algorithm
              [<a href="https://github.com/w3c/csswg-test/issues/683">#683</a>].
            </li>
          </ul>
        </section>
        <section>
          <h4>Alignment (<kbd>alignment</kbd>)</h4>
          <ul>
            <li>
              Aligning with auto margins
              [<a href="https://github.com/w3c/csswg-test/issues/673">#673</a>].
            </li>
            <li>
              Row-axis alignment:
              <ul>
                <li>
                  <code>justify-self</code> and <code>justify-items</code>
                  properties.
                  [<a href="https://github.com/w3c/csswg-test/issues/674">#674</a>].
                </li>
              </ul>
            </li>
            <li>
              Column-axis alignment:
              <ul>
                <li>
                  <code>align-self</code> and <code>align-items</code>
                  properties
                  [<a href="https://github.com/w3c/csswg-test/issues/675">#675</a>].
                </li>
              </ul>
            </li>
            <li>
              Aligning the grid:
              <ul>
                <li>
                  <code>justify-content</code> and <code>align-content</code>
                  properties
                  [<a href="https://github.com/w3c/csswg-test/issues/676">#676</a>].
                </li>
              </ul>
            </li>
            <li>
              Grid baselines
              [<a href="https://github.com/w3c/csswg-test/issues/678">#678</a>].
            </li>
          </ul>
        </section>
        <section>
          <h4>Track Sizing Algorithm (<kbd>layout-algorithm</kbd>)</h4>
          <ul>
            <li>
              Content-based track sizing
              [<a href="https://github.com/w3c/csswg-test/issues/679">#679</a>].
            </li>
            <li>
              Grow tracks using free space
              [<a href="https://github.com/w3c/csswg-test/issues/680">#680</a>].
            </li>
            <li>
              Flexible tracks
              [<a href="https://github.com/w3c/csswg-test/issues/681">#681</a>].
            </li>
          </ul>
        </section>
        <section>
          <h4>Fragmenting Grid Layout (<kbd>pagination</kbd>)</h4>
          <ul>
            <li>
              Fragmentation algorithm
              [<a href="https://github.com/w3c/csswg-test/issues/682">#682</a>].
            </li>
          </ul>
        </section>
      </section>
      <section>
        <h3>Specification examples</h3>
        <p>
          The spec examples should become tests (maybe some of them need to be
          defined as manual tests). This will allow to increase the coverage
          with more tests, but also to check the spec itself.
        </p>
      </section>
      <section>
        <h3>Implicit testing areas</h3>
        <p>
          These are testing areas either normatively defined in other specs
          that explicitly refer to the CSS Grid Layout spec or simply not
          explicitly defined, but implied by various aspects of the spec.
          Please note that while detailed, this list is not necessarily
          exhaustive and normative behaviors may not be contained in it. When
          in doubt, consult the CSS Grid Layout spec or ask a question on the
          <a href="http://lists.w3.org/Archives/Public/www-style/">mailing
          list</a> adding <kbd>[css-grid]</kbd> to the subject.
        </p>
        <p>
          Below is the list of implicit testing areas:
        </p>
        <ul>
          <li>
            CSS Grid Layout and other layout models:
            <ul>
              <li>Floats [[!CSS21]].</li>
              <li>Positioned elements [[!css3-positioning]].</li>
              <li>CSS Flexbox [[!css3-flexbox]].</li>
              <li>CSS Multicolumn [[!css3-multicol]].</li>
              <li>CSS Regions [[!css3-regions]].</li>
              <li>CSS Shapes [[!css-shapes-1]].</li>
            </ul>
          </li>
          <li>
            CSS Grid Layout and different type of elements [[!html5]]:
            <ul>
              <li><code>img</code>.</li>
              <li><code>video</code>.</li>
              <li><code>iframe</code>.</li>
              <li><code>canvas</code>.</li>
              <li><code>table</code>.</li>
            </ul>
          </li>
          <li>
            Dynamic content:
            <ul>
              <li>Changing the content of the grid items at runtime.</li>
              <li>
                Interactive content <code>contentEditable</code>,
                <code>designMode</code> and input elements [[!html5]].
              </li>
            </ul>
          </li>
          <li>Writing modes [[!css3-writing-modes]].</li>
          <li>Transforms [[!css3-transforms]].</li>
          <li>
            Transitions [[!css3-transitions]] and animations
            [[!css3-animations]].
          </li>
          <li>Pseudo-elements in grid items [[!CSS21]].</li>
        </ul>
      </section>
    </section>
    <section>
      <h2>People and responsibilities</h2>
      <p>
        Below is a list of people you should reach out to if you have any
        questions related to this document or testing CSS Grid Layout in
        general:
      </p>
      <ul>
        <li>Manuel Rego &ndash; Test Coordinator for CSS Grid Layout</li>
      </ul>
    </section>
    <section>
      <h2>Test progress tracking</h2>
      <p>
        Currently test progress tracking is done via GitHub
        <a href="https://github.com/w3c/csswg-test/issues?labels=spec%3Agrid&amp;milestone=&amp;page=1&amp;state=open">
        milestones and issues</a>.
        <!--
          FIXME: This link doesn't work yet.
          TODO:
          * Label "spec:grid" has to be created
            (https://github.com/w3c/csswg-test/labels)
          * Milestone "css-grid-1_dev" has to be created
            https://github.com/w3c/csswg-test/milestones
          * Once issues are created, add references from the different
            sections.
        -->
      </p>
    </section>
  </body>
</html>