Bug 98696 - Add tests for plugin snapshotting
Summary: Add tests for plugin snapshotting
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.8
: P2 Normal
Assignee: Jon Lee
URL:
Keywords: InRadar
: 112632 (view as bug list)
Depends on:
Blocks: 98318
  Show dependency treegraph
 
Reported: 2012-10-08 15:38 PDT by Jon Lee
Modified: 2013-03-19 13:33 PDT (History)
6 users (show)

See Also:


Attachments
Patch (14.57 KB, patch)
2013-03-18 15:12 PDT, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (14.49 KB, patch)
2013-03-18 15:21 PDT, Dean Jackson
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Lee 2012-10-08 15:38:55 PDT
Add layout tests to do basic functionality tests for plugin snapshotting. Might need to add support for WTR.

Tests include:
* Load plugin, click, verify running. Plugin outputs to log.
* Loading with display:none
* Loading normal, then switch to display:none, then go back. Should maintain whatever state it was in prior to style switch.
Comment 1 Radar WebKit Bug Importer 2012-10-08 15:39:26 PDT
<rdar://problem/12456731>
Comment 2 Dean Jackson 2013-03-18 15:04:07 PDT
*** Bug 112632 has been marked as a duplicate of this bug. ***
Comment 3 Dean Jackson 2013-03-18 15:12:50 PDT
Created attachment 193669 [details]
Patch
Comment 4 Dean Jackson 2013-03-18 15:14:32 PDT
This patch doesn't do the display:none test suggested, but it does cover the two simple cases.

I will wait for the bots to chew over it to make sure I got the test expectations correct.
Comment 5 Dean Jackson 2013-03-18 15:21:46 PDT
Created attachment 193671 [details]
Patch
Comment 6 Jon Lee 2013-03-19 10:34:44 PDT
Comment on attachment 193671 [details]
Patch

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

> LayoutTests/ChangeLog:11
> +        and one that restarts a snapshotted plugin by clicking.

Are we confirming these tests by just looking for the existence of the label? Is that enough? Or should the plugin also create some output so we know that in the restart case it was started twice?

Is this reusing an existing plugin? What does that plugin do?
Comment 7 Dean Jackson 2013-03-19 11:29:26 PDT
(In reply to comment #6)
> (From update of attachment 193671 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=193671&action=review
> 
> > LayoutTests/ChangeLog:11
> > +        and one that restarts a snapshotted plugin by clicking.
> 
> Are we confirming these tests by just looking for the existence of the label? Is that enough? 

At the moment yes.

> Or should the plugin also create some output so we know that in the restart case it was started twice?

We should definitely do that. I'm not sure it needs to land in this first patch. Like I said, these are super simple tests at the moment.

> Is this reusing an existing plugin? What does that plugin do?

It's just the existing simple swf file. We should make a plugin that calls into the page.
Comment 8 Jon Lee 2013-03-19 12:21:37 PDT
Ok. r=me.

(In reply to comment #7)
> (In reply to comment #6)
> > (From update of attachment 193671 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=193671&action=review
> > 
> > > LayoutTests/ChangeLog:11
> > > +        and one that restarts a snapshotted plugin by clicking.
> > 
> > Are we confirming these tests by just looking for the existence of the label? Is that enough? 
> 
> At the moment yes.
> 
> > Or should the plugin also create some output so we know that in the restart case it was started twice?
> 
> We should definitely do that. I'm not sure it needs to land in this first patch. Like I said, these are super simple tests at the moment.
> 
> > Is this reusing an existing plugin? What does that plugin do?
> 
> It's just the existing simple swf file. We should make a plugin that calls into the page.
Comment 9 Tim Horton 2013-03-19 13:21:16 PDT
Comment on attachment 193671 [details]
Patch

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

> Source/WebKit2/ChangeLog:10
> +        (don't wait to get a screenshot).

screenshot?
Comment 10 Dean Jackson 2013-03-19 13:33:19 PDT
Committed r146250: <http://trac.webkit.org/changeset/146250>