Bug 40384 - Test how XML directives get attached to the DOM
Summary: Test how XML directives get attached to the DOM
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks: 39259
  Show dependency treegraph
 
Reported: 2010-06-09 12:38 PDT by Adam Barth
Modified: 2010-06-09 14:29 PDT (History)
1 user (show)

See Also:


Attachments
Patch (3.04 KB, patch)
2010-06-09 12:44 PDT, Adam Barth
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2010-06-09 12:38:34 PDT
Test how XML directives get attached to the DOM
Comment 1 Adam Barth 2010-06-09 12:44:05 PDT
Created attachment 58279 [details]
Patch
Comment 2 Eric Seidel (no email) 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?
Comment 3 Adam Barth 2010-06-09 13:52:33 PDT
I liked the idea of crawling the DOM to make sure things were hooked up right.
Comment 4 Eric Seidel (no email) 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.
Comment 5 Adam Barth 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.
Comment 6 Eric Seidel (no email) 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.
Comment 7 Adam Barth 2010-06-09 14:20:07 PDT
Committed r60913: <http://trac.webkit.org/changeset/60913>
Comment 8 Adam Barth 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. :)