On Fri, Jul 13, 2012 at 2:15 PM, Darin Fisher <span dir="ltr">&lt;<a href="mailto:darin@chromium.org" target="_blank">darin@chromium.org</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


On Fri, Jul 13, 2012 at 2:10 PM, Adam Barth <span dir="ltr">&lt;<a href="mailto:abarth@webkit.org" target="_blank">abarth@webkit.org</a>&gt;</span> wrote:<br><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



Yeah, EventSender is likely a good place to start.  Here are some more details about what I had in mind:<div><br></div><div>1) We&#39;ll need to create a new target that builds a TestRunner.a (or LayoutTestController.a, whatever name is currently in fashion).  This target is allowed to depend on WTF, WebKit (via the WebKit API), and probably webkit_support.</div>





<div><br></div><div>2) This target will contain LayoutTestController.cpp, EventSender.cpp, and all the other code that&#39;s needed to support the objects we inject when running LayoutTests.</div><div><br></div><div>3) To move code into this target, we&#39;ll need to abstract any dependencies on the rest of DumpRenderTree into a delegate interface.  For example, EventSender has a #include &quot;TestShell.h&quot;, which we&#39;ll need to remove.  Today, EventSender gets the WebView is by asking m_shell for it.  Instead, it will need to ask the delegate.</div>





<div><br></div><div>One of the trickier things in this project will be WebViewHost.  TestRunner.a will need some object like that to subclass a bunch of WebKit API clients, but the design might need to change a bit.  I haven&#39;t studied it carefully yet.</div>



</blockquote><div><br></div></div><div>TestRunner.a could just provide the WebViewClient and WebFrameClient implementations.  The delegate you mention could just be a createWebView function.</div><div><br></div><div>When Jochen and I discussed this topic before, I suggested just adding CreateWebView to webkit_support, but as a delegate function seems even better.  We&#39;d probably like to minimize dependencies on webkit_support since that is Chromium specific.</div>


</div></blockquote><div><br></div><div>In addition to functions that talk with the WebKit API, there are also functions that are more about controlling the test harness.  For example, dumpAsText and waitUntilDone will need some pathway for communicating with the outside world besides WebKit API.</div>


<div><br></div><div>Currently, this information is &quot;pulled&quot; by TestShell.cpp, so maybe we don&#39;t need the delegate and can just have both DumpRenderTree and ContentShell pull this information out of TestRunner.a via some interface.</div>


<div><br></div><div>Adam</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div>Once this is done, but DumpRenderTree and ContentShell can link in TestRunner.a and implement the delegate.  Hopefully the bulk of the interactions will be between TestRunner.a and the WebKit API so that the delegate will mostly be able providing the WebView and getting out of the way.</div>



<span><font color="#888888">

<div><br></div><div>Adam</div></font></span><div><div><div><br></div><div><br><div class="gmail_quote">On Fri, Jul 13, 2012 at 1:56 PM, Jochen Eisinger <span dir="ltr">&lt;<a href="mailto:jochen@chromium.org" target="_blank">jochen@chromium.org</a>&gt;</span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What about keeping the discussion here, so others that might want to join the effort later can read it up?<div><br></div>





<div>In general, I agree with your proposal. I guess starting with something small like EventSender might be a good first step.</div>

<div><br></div><div>best</div><span><font color="#888888"><div>-jochen</div></font></span><div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 13, 2012 at 10:20 PM, Adam Barth <span dir="ltr">&lt;<a href="mailto:abarth@webkit.org" target="_blank">abarth@webkit.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







<div><div>On Fri, Jul 13, 2012 at 1:10 PM, Jochen Eisinger <span dir="ltr">&lt;<a href="mailto:jochen@chromium.org" target="_blank">jochen@chromium.org</a>&gt;</span> wrote:<br></div></div><div class="gmail_quote">

<div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

On Fri, Jul 13, 2012 at 7:46 PM, Ryosuke Niwa <span dir="ltr">&lt;<a href="mailto:rniwa@webkit.org" target="_blank">rniwa@webkit.org</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><div><div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On Fri, Jul 13, 2012 at 4:16 AM, Jochen Eisinger <span dir="ltr">&lt;<a href="mailto:jochen@chromium.org" target="_blank">jochen@chromium.org</a>&gt;</span> wrote:</div><div class="gmail_quote"><div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="gmail_quote"><div>I wanted to share some updates about content_shell (a multi-processed version of chromium&#39;s test shell): meanwhile, it is possible to generate pixel results.</div><div><br>

</div><div>Out of 31431 tests that are executed on chromium-linux, 6234 did not match the expected results using content_shell, all others passed (80.17%)!</div></div></blockquote><div><br></div></div><div>This is a great news! Thanks a lot for working on this effort. Let us know if you needed a help in implementing testRunner methods.</div>











</div></blockquote><div><br></div></div></div><div>At this point, there are two things I could use help with: in general, moving methods to window.internals (and addressing the current shortcomings of that approach) helps a lot, as I can just instantiate this object in content_shell.</div>











<div><br></div><div>The other thing is to work towards making layoutTestController (of chromium&#39;s DRT) a library.</div><div><br></div><div>Adam mentioned a while ago that he&#39;d be interested with helping with the latter as well</div>









</div></div></blockquote><div><br></div></div></div><div>Yes.  The idea is to implement LayoutTestController in terms of the WebKit API and a (hopefully simple) delegate.  Currently LayoutTestController knows too much about DumpRenderTree.  That will let us share the implementation of LayoutTestController and avoid having to maintain yet another copy.</div>









<div><br></div><div>Upstreaming the chromium-android port is at the top of my priority list, but I should be able to help out with this work as well.  Should we talk off-list about how to approach this work?</div><span><font color="#888888"><div>







<br>

</div><div>Adam</div><div><br></div></font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br></div><div>_______________________________________________<br>
webkit-dev mailing list<br>
<a href="mailto:webkit-dev@lists.webkit.org" target="_blank">webkit-dev@lists.webkit.org</a><br>
<a href="http://lists.webkit.org/mailman/listinfo/webkit-dev" target="_blank">http://lists.webkit.org/mailman/listinfo/webkit-dev</a><br>
<br></div></blockquote></div><br>
</blockquote></div><br>