<?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>84961</bug_id>
          
          <creation_ts>2012-04-26 07:54:07 -0700</creation_ts>
          <short_desc>[GTK] and [Win] TestWebKitAPI/WebKit2/TestSpacebarScrolling fails</short_desc>
          <delta_ts>2017-03-11 10:54:43 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Roger Fong">roger_fong</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>eric</cc>
    
    <cc>jhoneycutt</cc>
    
    <cc>pnormand</cc>
    
    <cc>roger_fong</cc>
    
    <cc>thorton</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>610613</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2012-04-26 07:54:07 -0700</bug_when>
    <thetext>We need to look at it in detail, I don&apos;t know why it fails</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>610616</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2012-04-26 07:58:03 -0700</bug_when>
    <thetext>[ FATAL ] ../Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h:1059:: pthread_mutex_destroy(&amp;mutex_)failed with error 16
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from WebKit2
[ RUN      ] WebKit2.SpacebarScrolling
../Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp:92: Failure
JS expression: isDocumentScrolled()
       Actual: false
     Expected: true
Tests failed: Programs/TestWebKitAPI/WebKit2/TestSpacebarScrolling</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>731011</commentid>
    <comment_count>2</comment_count>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2012-09-28 14:58:03 -0700</bug_when>
    <thetext>This also breaks on the Apple Windows port.

I got it to work by adding the second call to EXPECT_JS_TRUE(webView.page(), &quot;textFieldContainsSpace()&quot;) to after the call to isDocumentScrolled. At least on Windows if you don&apos;t re-enter the javascript context first after simulating the space bar key press the document won&apos;t actually scroll.

I thought it could have been a timing thing at first so I put a nice long loop into the SpaceBarScrolling.cpp could right before the failing EXPECT_JS_TRUE to see if it the page just didn&apos;t have time to scroll before the check. It still failed. So there&apos;s probably something goofy going on with the Windows TestWebKitAPI support, but for now, just switching the two lines will make the test pass. 

Maybe it will work on gtk as well...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>731021</commentid>
    <comment_count>3</comment_count>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2012-09-28 15:15:17 -0700</bug_when>
    <thetext>Same behaviour can be observed earlier in the test right after the first space press is simulated. 

    webView.simulateSpacebarKeyPress();

    EXPECT_JS_FALSE(webView.page(), &quot;isDocumentScrolled()&quot;);
    EXPECT_JS_TRUE(webView.page(), &quot;textFieldContainsSpace()&quot;);

If you switch the second two lines to:

    webView.simulateSpacebarKeyPress();

    EXPECT_JS_TRUE(webView.page(), &quot;textFieldContainsSpace()&quot;);
    EXPECT_JS_FALSE(webView.page(), &quot;isDocumentScrolled()&quot;);
 
the test will fail on the first EXPECT_JS_TRUE because the spacebarkeypress has not yet actually happened.

The patch I&apos;ll land is a work around for this test but I&apos;ll file a new bug for the larger problem at hand.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>731023</commentid>
    <comment_count>4</comment_count>
      <attachid>166322</attachid>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2012-09-28 15:17:46 -0700</bug_when>
    <thetext>Created attachment 166322
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>731836</commentid>
    <comment_count>5</comment_count>
      <attachid>166322</attachid>
    <who name="Tim Horton">thorton</who>
    <bug_when>2012-10-01 11:37:14 -0700</bug_when>
    <thetext>Comment on attachment 166322
patch

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

&gt; Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp:92
&gt; +    EXPECT_JS_TRUE(webView.page(), &quot;textFieldContainsSpace()&quot;);

I think it would be interesting to know why this needs to happen before isDocumentScrolled() returns the correct value.

You should see if a 0-delay timeout also fixes this, and then it would be interesting to know what&apos;s different between Win/Mac wrt. isDocumentScrolled and spinning the runloop.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>731995</commentid>
    <comment_count>6</comment_count>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2012-10-01 14:33:52 -0700</bug_when>
    <thetext>Disregard the patch. It defeats the purpose of the test. Making a new test that just disables the failing line on Win using an #if</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>732001</commentid>
    <comment_count>7</comment_count>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2012-10-01 14:39:58 -0700</bug_when>
    <thetext>Bug to track the larger problem at hand:
https://bugs.webkit.org/show_bug.cgi?id=97946</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>732024</commentid>
    <comment_count>8</comment_count>
      <attachid>166552</attachid>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2012-10-01 14:55:38 -0700</bug_when>
    <thetext>Created attachment 166552
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>732149</commentid>
    <comment_count>9</comment_count>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2012-10-01 17:17:35 -0700</bug_when>
    <thetext>Hmm can I get an r+/- from someone?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>733066</commentid>
    <comment_count>10</comment_count>
      <attachid>166552</attachid>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2012-10-02 14:16:38 -0700</bug_when>
    <thetext>Comment on attachment 166552
patch

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

&gt; Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp:92
&gt; +#if !PLATFORM(WIN)

You should put a comment here with the link to the relevant bugzilla bug here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>733152</commentid>
    <comment_count>11</comment_count>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2012-10-02 15:41:19 -0700</bug_when>
    <thetext>Comment added,
committed here: http://trac.webkit.org/changeset/130221

Leaving bug open in case GTK wants to do the same...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>800028</commentid>
    <comment_count>12</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-01-04 00:52:47 -0800</bug_when>
    <thetext>Attachment 166552 was posted by a committer and has review+, assigning to Roger Fong for commit.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>166322</attachid>
            <date>2012-09-28 15:17:46 -0700</date>
            <delta_ts>2012-10-01 14:55:38 -0700</delta_ts>
            <desc>patch</desc>
            <filename>84961_patch.txt</filename>
            <type>text/plain</type>
            <size>1328</size>
            <attacher name="Roger Fong">roger_fong</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ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ODk4NykKKysrIFRvb2xzL1Rlc3RXZWJLaXRBUEkvVGVzdHMvV2ViS2l0Mi9TcGFj
ZWJhclNjcm9sbGluZy5jcHAJKHdvcmtpbmcgY29weSkKQEAgLTg5LDYgKzg5LDcgQEAgVEVTVChX
ZWJLaXQyLCBTcGFjZWJhclNjcm9sbGluZykKICAgICBkaWROb3RIYW5kbGVLZXlEb3duRXZlbnQg
PSBmYWxzZTsKICAgICB3ZWJWaWV3LnNpbXVsYXRlU3BhY2ViYXJLZXlQcmVzcygpOwogCisgICAg
RVhQRUNUX0pTX1RSVUUod2ViVmlldy5wYWdlKCksICJ0ZXh0RmllbGRDb250YWluc1NwYWNlKCki
KTsKICAgICBFWFBFQ1RfSlNfVFJVRSh3ZWJWaWV3LnBhZ2UoKSwgImlzRG9jdW1lbnRTY3JvbGxl
ZCgpIik7CiAgICAgRVhQRUNUX0pTX1RSVUUod2ViVmlldy5wYWdlKCksICJ0ZXh0RmllbGRDb250
YWluc1NwYWNlKCkiKTsKIAo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>166552</attachid>
            <date>2012-10-01 14:55:38 -0700</date>
            <delta_ts>2012-10-02 14:16:38 -0700</delta_ts>
            <desc>patch</desc>
            <filename>84961_patch.txt</filename>
            <type>text/plain</type>
            <size>1375</size>
            <attacher name="Roger Fong">roger_fong</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDEzMDA3OSkKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDE2IEBACisyMDEyLTEwLTAxICBSb2dlciBGb25nICA8cm9nZXJfZm9uZ0BhcHBsZS5jb20+
CisKKyAgICAgICAgSWdub3J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od29ya2luZyBjb3B5KQpAQCAtODksNyArODksOSBA
QCBURVNUKFdlYktpdDIsIFNwYWNlYmFyU2Nyb2xsaW5nKQogICAgIGRpZE5vdEhhbmRsZUtleURv
d25FdmVudCA9IGZhbHNlOwogICAgIHdlYlZpZXcuc2ltdWxhdGVTcGFjZWJhcktleVByZXNzKCk7
CiAKKyNpZiAhUExBVEZPUk0oV0lOKQogICAgIEVYUEVDVF9KU19UUlVFKHdlYlZpZXcucGFnZSgp
LCAiaXNEb2N1bWVudFNjcm9sbGVkKCkiKTsKKyNlbmRpZgogICAgIEVYUEVDVF9KU19UUlVFKHdl
YlZpZXcucGFnZSgpLCAidGV4dEZpZWxkQ29udGFpbnNTcGFjZSgpIik7CiAKICNpZiBQTEFURk9S
TShNQUMpCg==
</data>
<flag name="review"
          id="178915"
          type_id="1"
          status="+"
          setter="andersca"
    />
          </attachment>
      

    </bug>

</bugzilla>