You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
can also provide the path prefix for a single <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element⑥">wpt</a></code> block,
5867
+
overriding the metadata if specified.</p>
5866
5868
<divclass="example" id="example-123bb00c">
5867
5869
<aclass="self-link" href="#example-123bb00c"></a> If the preceding example used <adata-link-type="dfn" href="#metadata-wpt-path-prefix" id="ref-for-metadata-wpt-path-prefix①">WPT Path Prefix</a>,
5868
-
the <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element⑥">wpt</a></code> element could be shorter:
5870
+
the <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element⑦">wpt</a></code> element could be shorter:
a single <dfnclass="dfn-paneled" data-dfn-type="element" data-exportdata-lt="wpt-rest" id="elementdef-wpt-rest"><code><wpt-rest></code></dfn> element can be used in a spec,
5894
-
which will act like a <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element⑦">wpt</a></code> element containing all the tests under the current path prefix
5895
-
that aren’t already specified in a <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element⑧">wpt</a></code> element.
5896
+
which will act like a <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element⑧">wpt</a></code> element containing all the tests under the current path prefix
5897
+
that aren’t already specified in a <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element⑨">wpt</a></code> element.
5896
5898
As this defeats Bikeshed’s ability to tell you when you’re missing any tests,
5897
5899
Bikeshed will emit a warning as long as a <code><adata-link-type="element" href="#elementdef-wpt-rest" id="ref-for-elementdef-wpt-rest">wpt-rest</a></code> element is in use.</p>
5898
5900
<p>Bikeshed’s knowledge of valid tests allows some useful checks:</p>
5899
5901
<ul>
5900
5902
<lidata-md>
5901
5903
<p>If <adata-link-type="dfn" href="#metadata-wpt-path-prefix" id="ref-for-metadata-wpt-path-prefix②">WPT Path Prefix</a> is specified,
5902
-
then any tests under that prefix that aren’t specified in a <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element⑨">wpt</a></code> element
5904
+
then any tests under that prefix that aren’t specified in a <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⓪">wpt</a></code> element
5903
5905
will trigger a fatal error,
5904
5906
so you’ll be alerted when new tests are added.</p>
5905
5907
<lidata-md>
5906
5908
<p>If you specify a path that doesn’t exist
5907
5909
(or <em>no longer</em> exists due to tests being moved or deleted),
5908
5910
it will trigger a fatal error.</p>
5909
-
<p>This check can be disabled for a given <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⓪">wpt</a></code> element
5911
+
<p>This check can be disabled for a given <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①①">wpt</a></code> element
5910
5912
by giving it the <dfnclass="dfn-paneled idl-code" data-dfn-for="wpt" data-dfn-type="attribute" data-exportid="dom-wpt-skip-existence-check"><code>skip-existence-check</code></dfn> boolean attribute.
5911
5913
This allows you to point to private tests,
5912
5914
such as those in browser-specific repos,
5913
5915
without receiving errors about those tests missing
5914
5916
from the main WPT repository.</p>
5915
5917
</ul>
5916
-
<p>By default, <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①①">wpt</a></code> elements don’t display in the output document;
5918
+
<p>By default, <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①②">wpt</a></code> elements don’t display in the output document;
5917
5919
they’re intended to annotate the source file to help with spec authoring,
5918
5920
and trigger Bikeshed’s checks.
5919
5921
If you want to produce a test-annotated version of the output,
5920
5922
specify the <adata-link-type="dfn" href="#metadata-wpt-display" id="ref-for-metadata-wpt-display">WPT Display</a> metadata with the value "open" or "closed";
5921
-
all of the <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①②">wpt</a></code> elements will become usefully-formatted lists of their contained tests,
5923
+
all of the <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①③">wpt</a></code> elements will become usefully-formatted lists of their contained tests,
5922
5924
with links to <ahref="https://wpt.fyi">wpt.fyi</a>,
5923
5925
the live test on <ahref="https://w3c-test.org">w3c-test.org</a>,
5924
5926
and the source code on <ahref="https://github.com/web-platform-tests/wpt">GitHub</a>.
5925
5927
The difference between "open" and "closed" is that
5926
-
with the former, all <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①③">wpt</a></code> elements are initially displayed in a collapsed state
5928
+
with the former, all <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①④">wpt</a></code> elements are initially displayed in a collapsed state
5927
5929
to avoid getting in the way of reading the document,
5928
5930
while "open" causes them to be expanded initially.
5929
5931
In either case, the use can interactively collapse or expand each element.</p>
<figcaption> When <code>WPT Display: closed</code> is set,
5938
-
the <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⑤">wpt</a></code> element also turns into a "TESTS" block,
5940
+
the <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⑥">wpt</a></code> element also turns into a "TESTS" block,
5939
5941
but it is initially collapsed. </figcaption>
5940
5942
</figure>
5941
5943
<pclass="note" role="note"><spanclass="marker">Note:</span> For compatibility with earlier versions of Bikshed,
5942
5944
"inline" is accepted as a synonym of "open".</p>
5943
-
<p>When the <adata-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/interaction.html#attr-hidden" id="ref-for-attr-hidden">hidden</a> attribute is set on the <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⑥">wpt</a></code> element,
5945
+
<p>When the <adata-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/interaction.html#attr-hidden" id="ref-for-attr-hidden">hidden</a> attribute is set on the <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⑦">wpt</a></code> element,
5944
5946
Bikeshed will take the tests listed in that element into account,
listing the tests in a <codeclass="highlight"><c-p><</c-><c-f>wpt</c-><c-e>hidden</c-><c-p>></c-></code> element silences the warnings,
5955
5957
without adding anything irrelevant to the output.</p>
5956
-
<p>Information about a set of tests described in a <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⑦">wpt</a></code> element
5958
+
<p>Information about a set of tests described in a <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⑧">wpt</a></code> element
5957
5959
can be provided to the reader
5958
-
by writing it in the <adata-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-title" id="ref-for-attr-title">title</a> attribute of the <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⑧">wpt</a></code> element.
5960
+
by writing it in the <adata-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-title" id="ref-for-attr-title">title</a> attribute of the <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⑨">wpt</a></code> element.
5959
5961
This will be inserted in the output as an introductory paragraph
5960
5962
before the test list.
5961
-
A <adata-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-lang" id="ref-for-attr-lang">lang</a> or <adata-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-dir" id="ref-for-attr-dir">dir</a> set on the <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⑨">wpt</a></code> element
5963
+
A <adata-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-lang" id="ref-for-attr-lang">lang</a> or <adata-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-dir" id="ref-for-attr-dir">dir</a> set on the <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element②⓪">wpt</a></code> element
5962
5964
will apply to the introductory paragraph if there is one.</p>
<p>The test block in the example above would be rendered as follows:</p>
5978
5980
<figure><imgalt="A WPT element with a list of tests, preceded by an introductory paragraph" height="168" src="images/tests-with-intro.png" srcset="images/tests-with-intro.png 2x" width="624"></figure>
5979
5981
</div>
5980
-
<p>If multiple <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element②⓪">wpt</a></code> follow each other in the source,
5982
+
<p>If multiple <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element②①">wpt</a></code> follow each other in the source,
5981
5983
with nothing between them other than whitespace,
5982
5984
they will be fused together in the output,
5983
5985
visually taking less space than if they remained as separate elements.
5984
5986
This will work even
5985
5987
if they have different <adata-link-type="element-attr" href="#element-attrdef-wpt-pathprefix" id="ref-for-element-attrdef-wpt-pathprefix">pathprefix</a> or <adata-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-title" id="ref-for-attr-title①">title</a> attributes.
5986
5988
When merging elements with <adata-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-title" id="ref-for-attr-title②">title</a> attributes,
5987
5989
the tests listed in each element will be preceded by the relevant introductory paragraph,
5988
-
and visually separated from tests listed in different <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element②①">wpt</a></code> elements.</p>
5990
+
and visually separated from tests listed in different <code><adata-link-type="element" href="#wpt-element" id="ref-for-wpt-element②②">wpt</a></code> elements.</p>
5989
5991
<pclass="note" role="note"><spanclass="marker">Note:</span> More tools and options for integrating with WPT will be developed in the future.</p>
5990
5992
<h3class="heading settled" data-level="11.2" id="updating-tests"><spanclass="secno">11.2. </span><spanclass="content">Updating Lists of Tests</span><aclass="self-link" href="#updating-tests"></a></h3>
"railroad-zeroormore": {"dfnID":"railroad-zeroormore","dfnText":"ZeroOrMore","external":false,"refSections":[{"refs":[{"id":"ref-for-railroad-zeroormore"}],"title":"13.1. The Diagram Language"}],"url":"#railroad-zeroormore"},
"wpt-element": {"dfnID":"wpt-element","dfnText":"11.1. \nAnnotating Specs with Tests: the wpt element","external":false,"refSections":[{"refs":[{"id":"ref-for-wpt-element"},{"id":"ref-for-wpt-element\u2460"},{"id":"ref-for-wpt-element\u2461"}],"title":"4. Metadata"},{"refs":[{"id":"ref-for-wpt-element\u2462"},{"id":"ref-for-wpt-element"},{"id":"ref-for-wpt-element\u2463"},{"id":"ref-for-wpt-element\u2464"},{"id":"ref-for-wpt-element\u2465"},{"id":"ref-for-wpt-element\u2466"},{"id":"ref-for-wpt-element\u2467"},{"id":"ref-for-wpt-element\u2468"},{"id":"ref-for-wpt-element\u2460\u24ea"},{"id":"ref-for-wpt-element\u2460\u2460"},{"id":"ref-for-wpt-element\u2460\u2461"},{"id":"ref-for-wpt-element\u2460\u2462"},{"id":"ref-for-wpt-element\u2460\u2463"},{"id":"ref-for-wpt-element\u2460\u2464"},{"id":"ref-for-wpt-element\u2460\u2465"},{"id":"ref-for-wpt-element\u2460\u2466"},{"id":"ref-for-wpt-element\u2460\u2467"},{"id":"ref-for-wpt-element\u2460\u2468"},{"id":"ref-for-wpt-element\u2461\u24ea"},{"id":"ref-for-wpt-element\u2461\u2460"}],"title":"11.1. \nAnnotating Specs with Tests: the wpt element"}],"url":"#wpt-element"},
7502
+
"wpt-element": {"dfnID":"wpt-element","dfnText":"11.1. \nAnnotating Specs with Tests: the wpt element","external":false,"refSections":[{"refs":[{"id":"ref-for-wpt-element"},{"id":"ref-for-wpt-element\u2460"},{"id":"ref-for-wpt-element\u2461"}],"title":"4. Metadata"},{"refs":[{"id":"ref-for-wpt-element\u2462"},{"id":"ref-for-wpt-element"},{"id":"ref-for-wpt-element\u2463"},{"id":"ref-for-wpt-element\u2464"},{"id":"ref-for-wpt-element\u2465"},{"id":"ref-for-wpt-element\u2466"},{"id":"ref-for-wpt-element\u2467"},{"id":"ref-for-wpt-element\u2468"},{"id":"ref-for-wpt-element\u2460\u24ea"},{"id":"ref-for-wpt-element\u2460\u2460"},{"id":"ref-for-wpt-element\u2460\u2461"},{"id":"ref-for-wpt-element\u2460\u2462"},{"id":"ref-for-wpt-element\u2460\u2463"},{"id":"ref-for-wpt-element\u2460\u2464"},{"id":"ref-for-wpt-element\u2460\u2465"},{"id":"ref-for-wpt-element\u2460\u2466"},{"id":"ref-for-wpt-element\u2460\u2467"},{"id":"ref-for-wpt-element\u2460\u2468"},{"id":"ref-for-wpt-element\u2461\u24ea"},{"id":"ref-for-wpt-element\u2461\u2460"},{"id":"ref-for-wpt-element\u2461\u2461"}],"title":"11.1. \nAnnotating Specs with Tests: the wpt element"}],"url":"#wpt-element"},
0 commit comments