<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>91083</bug_id>
          
          <creation_ts>2012-07-12 05:52:26 -0700</creation_ts>
          <short_desc>[GTK] REGRESSION (r122428) WebKit2APITests/TestWebKitFindController fails &quot;next&quot; test</short_desc>
          <delta_ts>2012-08-14 02:28:37 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pena">spena</reporter>
          <assigned_to name="Sergio Villar Senin">svillar</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>gustavo</cc>
    
    <cc>mrobinson</cc>
    
    <cc>svillar</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>667683</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pena">spena</who>
    <bug_when>2012-07-12 05:52:26 -0700</bug_when>
    <thetext>ERROR:../../Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp:168:void testFindControllerNext(FindControllerTest*, gconstpointer): assertion failed: (test-&gt;m_matchCount == 2)
TEST: /home/slave/webkitgtk/gtk-linux-64-release/build/Tools/gtk/../Scripts/../../WebKitBuild/Release/Programs/WebKit2APITests/TestWebKitFindController... (pid=20393)
  /webkit2/WebKitFindController/getters:                               OK
  /webkit2/WebKitFindController/instance:                              OK
  /webkit2/WebKitFindController/text-found:                            OK
  /webkit2/WebKitFindController/text-not-found:                        OK
  /webkit2/WebKitFindController/match-count:                           OK
  /webkit2/WebKitFindController/max-match-count:                       OK
  /webkit2/WebKitFindController/next:                                  FAIL

After r122428 - &lt;http://trac.webkit.org/changeset/122428&gt;, this test fails.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>667684</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pena">spena</who>
    <bug_when>2012-07-12 05:53:01 -0700</bug_when>
    <thetext>I&apos;m taking a look at this atm.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>667990</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pena">spena</who>
    <bug_when>2012-07-12 10:59:45 -0700</bug_when>
    <thetext>Several tests (&quot;next&quot;, &quot;previous&quot; and &quot;hide&quot;) were failing after the changeset. 

Next and Previous now report just one result in their search_next and search_previous methods. I&apos;m not sure if this how it should be (so the tests need to be updated) or if it is an actual regression.

Once that the &quot;next&quot; and &quot;previous&quot; tests are fixed, &quot;hide&quot; fails, identifying the &quot;originalPixbuf&quot; and &quot;unhighlightedPixbuf&quot; as different. Adding a delay with .wait seems to fix it (so this could be a consequence of the different behaviour regarding markAllTextMatches and unmarkAllTextMatches), but again, I&apos;m not sure about this being the proper fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>667993</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Pena">spena</who>
    <bug_when>2012-07-12 11:01:02 -0700</bug_when>
    <thetext>Assigning the bug to Sergio, who knows the code better.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>671055</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pena">spena</who>
    <bug_when>2012-07-17 00:33:59 -0700</bug_when>
    <thetext>Bug #91224 tracks the skipped API tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>679086</commentid>
    <comment_count>5</comment_count>
      <attachid>154589</attachid>
    <who name="Sergio Villar Senin">svillar</who>
    <bug_when>2012-07-26 02:34:17 -0700</bug_when>
    <thetext>Created attachment 154589
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>679088</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-07-26 02:36:05 -0700</bug_when>
    <thetext>Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>679089</commentid>
    <comment_count>7</comment_count>
    <who name="Sergio Villar Senin">svillar</who>
    <bug_when>2012-07-26 02:37:07 -0700</bug_when>
    <thetext>So yeah, Simon&apos;s analysis is basically correct. After r122428 the FindController returns just 1 match for search_next()/search_prev() if the test is found, so we should update the expected behaviour in the test.

Apart from that the hide() unit test was flaky because it isn&apos;t enough to wait for the &quot;draw&quot; signal once, we have to wait also until all the glib events are processed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>679090</commentid>
    <comment_count>8</comment_count>
      <attachid>154589</attachid>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2012-07-26 02:37:45 -0700</bug_when>
    <thetext>Comment on attachment 154589
Patch

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

&gt; Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp:69
&gt;          g_main_loop_run(m_mainLoop);
&gt; +        while (g_main_context_iteration(g_main_context_default(), FALSE)) { }

I think this means that you should rename the method here, waitUntilWebViewDrawSignal is no longer accurate. What events are you waiting for in particular?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>679093</commentid>
    <comment_count>9</comment_count>
    <who name="Sergio Villar Senin">svillar</who>
    <bug_when>2012-07-26 02:47:03 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; (From update of attachment 154589 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=154589&amp;action=review
&gt; 
&gt; &gt; Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp:69
&gt; &gt;          g_main_loop_run(m_mainLoop);
&gt; &gt; +        while (g_main_context_iteration(g_main_context_default(), FALSE)) { }
&gt; 
&gt; I think this means that you should rename the method here, waitUntilWebViewDrawSignal is no longer accurate. What events are you waiting for in particular?

Well thing is that waiting for &quot;draw&quot; does not ensure that the actual contents are displayed, when I asked the gtk folks they told me that was the safest approach. What about waitUnitWebViewContentsDrawn?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>685582</commentid>
    <comment_count>10</comment_count>
      <attachid>154589</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2012-08-02 10:57:39 -0700</bug_when>
    <thetext>Comment on attachment 154589
Patch

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

&gt;&gt;&gt; Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitFindController.cpp:69
&gt;&gt;&gt; +        while (g_main_context_iteration(g_main_context_default(), FALSE)) { }
&gt;&gt; 
&gt;&gt; I think this means that you should rename the method here, waitUntilWebViewDrawSignal is no longer accurate. What events are you waiting for in particular?
&gt; 
&gt; Well thing is that waiting for &quot;draw&quot; does not ensure that the actual contents are displayed, when I asked the gtk folks they told me that was the safest approach. What about waitUnitWebViewContentsDrawn?

Maybe you could use gdk_events_pending() to check whether there are gdk events to be processed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686479</commentid>
    <comment_count>11</comment_count>
      <attachid>154589</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2012-08-03 02:29:37 -0700</bug_when>
    <thetext>Comment on attachment 154589
Patch

This patch fixes two different issues actually, one is the previous/next issue (you should also unskip the tests cases, btw) which looks good to me, and the other is the hide test case that is flaky. Could you please file a different bug report for the hide issue? Feel free to commit the prev/next part, unskipping also the test cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>694718</commentid>
    <comment_count>12</comment_count>
    <who name="Sergio Villar Senin">svillar</who>
    <bug_when>2012-08-14 02:28:37 -0700</bug_when>
    <thetext>Committed r125533: &lt;http://trac.webkit.org/changeset/125533&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>154589</attachid>
            <date>2012-07-26 02:34:17 -0700</date>
            <delta_ts>2012-08-03 02:29:37 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-91083-20120726113405.patch</filename>
            <type>text/plain</type>
            <size>3209</size>
            <attacher name="Sergio Villar Senin">svillar</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTIzMzEyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0Mi9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKaW5kZXggZTE4NTVhMzNjZDEwYmE5
ZGQ0N2M0NmEyMDk5NjdiOTBlNzJiMDQ1ZS4uZTg0YzFkNWRlNzY5MTdjMGY2MzMwOTQ5NTJhZWFi
ZjJjZjhlZWRlYSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJLaXQyL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE5IEBACisyMDEyLTA3LTI2ICBTZXJn
aW8gVmlsbGFyIFNlbmluICA8c3ZpbGxhckBpZ2FsaWEuY29tPgorCisgICAgICAgIFtHVEtdIFJF
R1JFU1NJT04gKHIxMjI0MjgpIFdlYktpdDJBUElUZXN0cy9UZXN0V2ViS2l0RmluZENvbnRyb2xs
ZXIgZmFpbHMgIm5leHQiIHRlc3QKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hv
d19idWcuY2dpP2lkPTkxMDgzCisKKyAgICAgICAgUmV2aWV3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kX2NvbnRyb2xsZXJfc2VhcmNoX3ByZXZpb3Vz
KHRlc3QtPm1fZmluZENvbnRyb2xsZXIuZ2V0KCkpOwogICAgIHRlc3QtPndhaXRVbnRpbEZpbmRG
aW5pc2hlZCgpOwogCiAgICAgZ19hc3NlcnQodGVzdC0+bV90ZXh0Rm91bmQpOwotICAgIGdfYXNz
ZXJ0KHRlc3QtPm1fbWF0Y2hDb3VudCA9PSAyKTsKKyAgICBnX2Fzc2VydCh0ZXN0LT5tX21hdGNo
Q291bnQgPT0gMSk7CiAgICAgZ19hc3NlcnQod2Via2l0X2ZpbmRfY29udHJvbGxlcl9nZXRfb3B0
aW9ucyh0ZXN0LT5tX2ZpbmRDb250cm9sbGVyLmdldCgpKSAmIFdFQktJVF9GSU5EX09QVElPTlNf
QkFDS1dBUkRTKTsKIH0KIAo=
</data>
<flag name="review"
          id="163844"
          type_id="1"
          status="+"
          setter="cgarcia"
    />
    <flag name="commit-queue"
          id="165970"
          type_id="3"
          status="-"
          setter="cgarcia"
    />
          </attachment>
      

    </bug>

</bugzilla>