Bug 84991 - Add a test for crash in DOMSelection::deleteFromDocument
: Add a test for crash in DOMSelection::deleteFromDocument
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: HTML Editing
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Ryosuke Niwa
:
Depends on: 44153
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-26 12:35 PDT by Ryosuke Niwa
Modified: 2012-04-26 17:20 PDT (History)
4 users (show)

See Also:


Attachments
Adds a regression test (2.26 KB, patch)
2012-04-26 13:03 PDT, Ryosuke Niwa
ap: review+
ap: commit‑queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 :)