Bug 84991

Summary: Add a test for crash in DOMSelection::deleteFromDocument
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: HTML EditingAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: adele, ap, darin, enrica
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 44153    
Bug Blocks:    
Attachments:
Description Flags
Adds a regression test ap: review+, ap: commit-queue-

Description Ryosuke Niwa 2012-04-26 12:35:09 PDT
We need a test for the bug 44153.
Comment 1 Ryosuke Niwa 2012-04-26 13:03:52 PDT
Created attachment 139050 [details]
Adds a regression test
Comment 2 Alexey Proskuryakov 2012-04-26 13:16:31 PDT
Comment on attachment 139050 [details]
Adds a regression test

View in context: https://bugs.webkit.org/attachment.cgi?id=139050&action=review

> LayoutTests/editing/selection/deleteFromDocument-after-document-open-crash.html:25
> +    layoutTestController.notifyDone();

This test doesn't appear to need waitUntilDone/notifyDone - all the work is done from unload.
Comment 3 Ryosuke Niwa 2012-04-26 13:18:00 PDT
Comment on attachment 139050 [details]
Adds a regression test

View in context: https://bugs.webkit.org/attachment.cgi?id=139050&action=review

>> LayoutTests/editing/selection/deleteFromDocument-after-document-open-crash.html:25
>> +    layoutTestController.notifyDone();
> 
> This test doesn't appear to need waitUntilDone/notifyDone - all the work is done from unload.

document.open() sometimes ends DRT so without this, the test will be flaky.
Comment 4 Alexey Proskuryakov 2012-04-26 13:32:10 PDT
> document.open() sometimes ends DRT so without this, the test will be flaky.

How can this possibly be non-deterministic? Is there an uninitialized variable somewhere?

Looks like you're covering up a real bug.
Comment 5 Ryosuke Niwa 2012-04-26 13:37:49 PDT
(In reply to comment #4)
> > document.open() sometimes ends DRT so without this, the test will be flaky.
> 
> How can this possibly be non-deterministic? Is there an uninitialized variable somewhere?
> 
> Looks like you're covering up a real bug.

Maybe. The last time I checked, this was expected behavior per spec and non-determinism was due to some race conditions. But then I'm not too familiar with this area.
Comment 6 Ryosuke Niwa 2012-04-26 14:06:38 PDT
Hm... it appears that this problem no longer reproduces at least on this test. I'm gonna just remove waitUntilDone/notifyDone for now.
Comment 7 Ryosuke Niwa 2012-04-26 14:09:26 PDT
Committed r115360: <http://trac.webkit.org/changeset/115360>
Comment 8 Alexey Proskuryakov 2012-04-26 16:30:47 PDT
> it appears that this problem no longer reproduces at least on this test

Perhaps it's more complicated when the script runs during load, as opposed to unload handler.
Comment 9 Ryosuke Niwa 2012-04-26 16:48:25 PDT
(In reply to comment #8)
> > it appears that this problem no longer reproduces at least on this test
> 
> Perhaps it's more complicated when the script runs during load, as opposed to unload handler.

Hm... that's possible. I guess Chromium WebKit gardeners will notice if this test becomes flaky :)
Comment 10 Alexey Proskuryakov 2012-04-26 17:20:02 PDT
> unload

onload, thank you autocorrection :)