RESOLVED FIXED 40384
Test how XML directives get attached to the DOM
https://bugs.webkit.org/show_bug.cgi?id=40384
Summary Test how XML directives get attached to the DOM
Adam Barth
Reported 2010-06-09 12:38:34 PDT
Test how XML directives get attached to the DOM
Attachments
Patch (3.04 KB, patch)
2010-06-09 12:44 PDT, Adam Barth
eric: review+
Adam Barth
Comment 1 2010-06-09 12:44:05 PDT
Eric Seidel (no email)
Comment 2 2010-06-09 13:17:02 PDT
Comment on attachment 58279 [details] Patch 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?
Adam Barth
Comment 3 2010-06-09 13:52:33 PDT
I liked the idea of crawling the DOM to make sure things were hooked up right.
Eric Seidel (no email)
Comment 4 2010-06-09 13:54:07 PDT
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.
Adam Barth
Comment 5 2010-06-09 14:09:47 PDT
You have to look at the expected results to see what we expect to happen... That doesn't seem unreasonable.
Eric Seidel (no email)
Comment 6 2010-06-09 14:12:30 PDT
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.
Adam Barth
Comment 7 2010-06-09 14:20:07 PDT
Adam Barth
Comment 8 2010-06-09 14:29:07 PDT
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. :)
Note You need to log in before you can comment on or make changes to this bug.