Bug 22512 - Add a test to check for crashes in attaching an event to a created document.
Summary: Add a test to check for crashes in attaching an event to a created document.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-26 10:57 PST by David Levin
Modified: 2008-12-09 17:35 PST (History)
2 users (show)

See Also:


Attachments
A patch to add the test. (2.45 KB, patch)
2008-11-26 11:01 PST, David Levin
no flags Details | Formatted Diff | Diff
Addressed the comments by Eric. (2.90 KB, patch)
2008-11-26 12:07 PST, David Levin
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Levin 2008-11-26 10:57:08 PST
Need to add the test.
Comment 1 David Levin 2008-11-26 11:01:10 PST
Created attachment 25521 [details]
A patch to add the test.
Comment 2 Eric Seidel (no email) 2008-11-26 11:23:41 PST
Comment on attachment 25521 [details]
A patch to add the test.

This is an interesting combination of the old single-file .html style tests, and the new .js tests which use the fast/js/resources .js files and a TEMPLATE.html file. :)  Sadly none of this is very well documented, but what I think in an ideal world what you would have wanted to do was to add a fast/events/resources/create-document-crash-on-attach-event.js file with just the <script> section of your test, and then run make-js-test-wrappers to generate the corresponding .html file from the template (which likely already exists as fast/events/resources/TEMPLATE.html).  make-js-test-wrappers also automatically makes sure your .js file ends with var successfulllyParsed = true; etc.

Also, I think it's a bad idea to check for document.implementation and document.implementation.createDocument and allow the test to "pass" (or at least not do anything) if they're not found.

Do you have any information as to when this last crashed?  Was this only ever a crash for Chromium?
Comment 3 David Levin 2008-11-26 12:07:24 PST
Created attachment 25525 [details]
Addressed the comments by Eric.

The crash only happened in Chromium.
Comment 4 Eric Seidel (no email) 2008-12-09 14:49:39 PST
Comment on attachment 25525 [details]
Addressed the comments by Eric.

Looks fine.
Comment 5 Pam Greene (IRC:pamg) 2008-12-09 17:35:19 PST
Landed in r39159.