Bug 56674 - Convert fake-drag into a dumpAsText test and remove 1s timeout
Summary: Convert fake-drag into a dumpAsText test and remove 1s timeout
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: Tony Chang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-18 13:46 PDT by Tony Chang
Modified: 2011-03-21 14:39 PDT (History)
4 users (show)

See Also:


Attachments
Patch (26.93 KB, patch)
2011-03-18 13:49 PDT, Tony Chang
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chang 2011-03-18 13:46:59 PDT
Convert fake-drag into a dumpAsText test and remove 1s timeout
Comment 1 Tony Chang 2011-03-18 13:49:37 PDT
Created attachment 86205 [details]
Patch
Comment 2 Tony Chang 2011-03-18 13:50:08 PDT
http://trac.webkit.org/changeset/10620 originally added this test.
Comment 3 Tony Chang 2011-03-18 13:50:33 PDT
Also, this is one of the slowest editing tests.
Comment 4 Eric Seidel (no email) 2011-03-18 14:05:11 PDT
Comment on attachment 86205 [details]
Patch

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

OK.

> LayoutTests/editing/selection/fake-drag.html:23
> -    window.setTimeout(step7, 1);
> +    window.setTimeout(step7, 0);

This is 1ms, no?  Why make it 0?
Comment 5 Eric Seidel (no email) 2011-03-18 14:06:13 PDT
Letting the authors of this test see this go by.
Comment 6 Tony Chang 2011-03-18 14:13:51 PDT
(In reply to comment #4)
> (From update of attachment 86205 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=86205&action=review
> 
> OK.
> 
> > LayoutTests/editing/selection/fake-drag.html:23
> > -    window.setTimeout(step7, 1);
> > +    window.setTimeout(step7, 0);
> 
> This is 1ms, no?  Why make it 0?

Since JS timers are 4ms, I think any value under 4 will behave the same.  I just wanted to make it explicit that we were running these as fast as possible.  Actually, we could probably just write this test without any of the setTimeouts.  Let me know if you think that would be clearer.
Comment 7 Eric Seidel (no email) 2011-03-18 14:16:58 PDT
(In reply to comment #6)
> > This is 1ms, no?  Why make it 0?
> 
> Since JS timers are 4ms, I think any value under 4 will behave the same.

I think you're right.

>I just wanted to make it explicit that we were running these as fast as possible.  Actually, we could probably just write this test without any of the setTimeouts.  Let me know if you think that would be clearer.

Ideally we'd remove the setTimeouts, but I wouldn't worry about it.
Comment 8 Tony Chang 2011-03-18 14:31:11 PDT
(In reply to comment #7)
> (In reply to comment #6)
> >I just wanted to make it explicit that we were running these as fast as possible.  Actually, we could probably just write this test without any of the setTimeouts.  Let me know if you think that would be clearer.
> 
> Ideally we'd remove the setTimeouts, but I wouldn't worry about it.

I tried this, but it turns out that we need setTimeouts or the editing delegate won't dump selection changes.  I'll just leave the timeouts in the test.
Comment 9 Tony Chang 2011-03-21 14:39:49 PDT
Committed r81608: <http://trac.webkit.org/changeset/81608>