Coder Social home page Coder Social logo

Comments (4)

fantasai avatar fantasai commented on June 12, 2024

@gsnedders Where does the web-platform-tests.org documentation even live?

from wpt.

dbaron avatar dbaron commented on June 12, 2024

A few comments:

  • I think in general if a rule doesn't add significant value, we shouldn't make it. More rules to enforce are more rules to read, learn, and understand, and this reduces the chance that people will follow other more important rules. In particular, this makes me want to avoid making more rules such as (5) and (7). That said, I think there are some real file length limits that WPT users face, but I think they probably mostly relate to the full path length and not the length of any component of it.

  • Regarding point 4: The 600x600 comes from a CSS WG resolution.

  • Regarding point 8 (although I'm not sure if you were asking): maxDifference and totalPixels values are available from many test runners, including from wpt.fyi, and including the wpt.fyi links in the Checks tab of a PR. (Just because they can be found doesn't necessarily mean that the test should permit that amount of fuzziness, though.)

  • Regarding point 3: "null end tag" is an SGML feature that allows syntax like <title/Document Title/ as a shorthand for <title>Document Title</title>. It is not part of the HTML parsing algorithm and I would be surprised if it is present in WPT tests. Are you talking about empty-element TAGS (an XML feature)?

  • Regarding points 3 and 5: I think in many cases it's good for tests to vary across the normal ways that web content varies; this sometimes allows them to catch additional issues that they wouldn't otherwise have caught. I'd like to avoid being too prescriptive when it doesn't add value. And specifically on point 5 I don't want to encourage lots of edits to existing tests for stylistic reasons, which risks breaking the tests unnecessarily; sometimes "optional" tags matter, such as when a <body> is followed by a <script>...</script> and the script needs to run inside the body rather than the head.

from wpt.

TalbotG avatar TalbotG commented on June 12, 2024

David,

Thank you for taking the time to write your detailed comments.

More rules to enforce are more rules to read, learn, and understand, and this reduces the chance that people will follow other more important rules.

We have review of tests and there are test reviewers. Professionalisation of tests and testing insure quality of tests and testing. I have never rejected tests unless they were false, bad or fundamentally incorrect. I always have tried to rehabilitate inadequately (or poorly) formated tests as long as they were testing a testable spec statement to begin with.

point 3: The null end tag I was referring to is, e.g.:
<meta charset="utf-8" />
when
<meta charset="utf-8">
is already good, already functional and sufficient.

point 5 (Optional end tags): I have been formally asked to remove all optional end tags and optional tags (<html>, <head>, <body>) from my tests. And so, I thought the wpt Writing Tests documentation should state such requirement.

If CSS tests do not need optional end tags and optional tags and if minimal - reduced as much as possible - filesize is a recommandable goal in itself and by itself, then such requirement makes sense. As I understand, it takes several hours to several computers to go through all the wpt tests for the 4 browsers. Only necessary filesize makes sense in that regard.

Varying HTML content (tags and elements) makes sense for HTML testing, when testing HTML.

point 7 (Length of tests filenames): Only a very small minority of CSS tests exceed 60 characters. I wish I knew how to find them (with a grep command) and list them in order to establish precisely their percentage from the whole set of CSS tests. I estimate (just a hunch) that less than 0.1% use, exceed more than 60 characters.

A filename should not be a sentence describing a test. A long (> 48 characters) filename does not help review, does not replace a title text and does not replace useful comments or a text assert. I do not see how anyone gets help from a long filename.
A long filename will trigger horizontal overflow, horizontal scrolling (and scrollbar) in various situations (tables) or webpages and/or creates ellipsis ("…") characters in various places. If a long filename creates ellipsis ("…") characters, then we don't even get to read such filename anyway.
My proposal is that, from now on, the lint checking tool detects and reports a filename exceeding 48 characters and asks the author to limit to 48 characters or less.

point 8 (Where to get maxDifference and totalPixels values.)

maxDifference and totalPixels values are available from many test runners

I never found such information all by myself. And recently, Sebastian Zartner was wondering and asking where he could find those values.

Just because they can be found doesn't necessarily mean that the test should permit that amount of fuzziness, though.

Of course. Agreed.


I will be away from web and internet for a week.

from wpt.

TalbotG avatar TalbotG commented on June 12, 2024

on point 5 I don't want to encourage lots of edits to existing tests for stylistic reasons, which risks breaking the tests unnecessarily

First, my proposal wrt point 5 was not for existing CSS tests but for upcoming CSS tests.
Second, my proposal is not for stylistic reasons, is not about stylistic reasons.
Third, even if we would remove </p>, </li>, </dt>, </option>, </tr>, </td>, </body>, </head>, </html> from existing CSS tests, - which is not my goal on point 5 - , why would CSS tests break? I do not see how or why CSS tests could or would break. All these are optional tags, even in HTML4.

from wpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.