Test how XML directives get attached to the DOM
Created attachment 58279 [details]
Comment on attachment 58279 [details]
OK. So the new parser currently "fails" this test, right? Wouldn't it be better to just check for document.firstChild and see that it's a comment?
I liked the idea of crawling the DOM to make sure things were hooked up right.
The problem with your new test is that its not self contained. Its not easy to see from it if it passed or failed.
If you wanted to walk, you could check each type with some shouldBe's and that woudl be better.
You have to look at the expected results to see what we expect to happen... That doesn't seem unreasonable.
Sure, but that requires a gold file. Ideally tests contain their own results with PASS, FAIL messages. Your test is OK, tests which contain their own expectations are better. I owe Darin Adler a "design doc" of sorts on this subject.
Committed r60913: <http://trac.webkit.org/changeset/60913>
Sometimes tests with embedded PASS/FAIL are more work because you need to edit the tests when something changes instead of just having different results. In any case, we're over engineering this test. :)