W3C home > Mailing lists > Public > public-test-infra@w3.org > April to June 2012

Re: Repository layout

From: Aryeh Gregor <ayg@aryeh.name>
Date: Tue, 5 Jun 2012 11:26:26 +0300
Message-ID: <CAKA+AxkHh_y5R8t_veGv2p3S4EYuEyxYZUibY-xn8Fg_a=TMPQ@mail.gmail.com>
To: Robin Berjon <robin@berjon.com>
Cc: James Graham <jgraham@opera.com>, public-test-infra@w3.org
On Mon, Jun 4, 2012 at 7:35 PM, Robin Berjon <robin@berjon.com> wrote:
> On Jun 4, 2012, at 18:14 , James Graham wrote:
>> Yes, but it can *also* mean that you break the test, if you aren't very careful. Consider a test that does document.getElementsByTagName("link")[0], for example.
> While that is indeed within the realm of possible things, I would like to point out that it is a somewhat contrived example, and easy to fix at that. You would be breaking a broken test.

Not if the test is actually testing getElementsByTagName.  The same
goes for all kinds of other DOM features -- any DOM test is likely to
make some type of change to the DOM and then look at the results.  If
you change around the initial DOM of the test file, you could well
change the results.  This is only a problem for DOM/HTML tests, of
course, but it is a potential problem.  And granted that it will only
affect a small percentage of tests -- but if the test framework is
adding and removing these headers all the time as people change
metadata, it's only a matter of time until it breaks one.  Better to
avoid it and keep the metadata separate.

This is leaving aside the fact that it's quite nontrivial to
automatically inject an HTML tag in a fashion that's guaranteed to
parse correctly but also doesn't reserialize the file (which will
create lots of spurious diffs).
Received on Tuesday, 5 June 2012 08:32:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:20:33 UTC