<?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>202047</bug_id>
          
          <creation_ts>2019-09-20 08:02:20 -0700</creation_ts>
          <short_desc>[GTK] Several webdriver tests fail or timeout with Epiphany</short_desc>
          <delta_ts>2019-10-03 09:05:41 -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>WebDriver</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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>
          <dependson>202530</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bburg</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1572753</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2019-09-20 08:02:20 -0700</bug_when>
    <thetext>I have been checking the WebDriver tests from WPT on Epiphany and there are several tests that fail or timeout on Epiphany, but work with Minibrowser.


With MiniBrowser:

$ ./wpt run --webkit-port gtk --binary=/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/MiniBrowser --binary-arg=--automation \
 --webdriver-binary=/usr/bin/WebKitWebDriver --webdriver-arg=--host=127.0.0.1 \
 --log-html=results.html --log-mach=results.txt --log-wptreport=results.json --processes=8 \
 webkit /webdriver

[...]

Ran 151 tests finished in 678.6 seconds.
  • 90 ran as expected. 0 tests skipped.
  • 11 tests timed out unexpectedly
  • 50 tests had unexpected subtest results

With Epiphany:

$ ./wpt run --webdriver-arg=--host=127.0.0.1 \
 --log-html=results.html --log-mach=results.txt --log-wptreport=results.json --processes=8 \
  epiphany /webdriver

[...]

Ran 151 tests finished in 680.2 seconds.
  • 73 ran as expected. 0 tests skipped.
  • 15 tests timed out unexpectedly
  • 63 tests had unexpected subtest results</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1572757</commentid>
    <comment_count>1</comment_count>
      <attachid>379241</attachid>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2019-09-20 08:11:00 -0700</bug_when>
    <thetext>Created attachment 379241
simplified test case to reproduce on of the issues

To test this test case do the following:

1) On one terminal run: WebKitWebDriver --host=127.0.0.1 --port=4444
2) On another terminal execute this script like follows:

For MiniBrowser test:
./simplified_test_case_input_text.sh minibrowser /path/to/MiniBrowser
For Epihany test:
./simplified_test_case_input_text.sh epiphany /path/to/epiphany

(Restart the WebKitWebDriver on terminal 1) between each test).

The test passes if you see how the text &quot;foo&quot; is wrote in the input text field of the page that opens (in the browser).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1572758</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2019-09-20 08:20:34 -0700</bug_when>
    <thetext>I have tried to run run-webdriver-tests with epiphany by modifying locally webdriver_driver_gtk.py, but it is not working at all.
The epiphany window closes as soon as it opens and all the tests give an error.
Not sure what is wrong with it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1575948</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2019-10-02 05:04:59 -0700</bug_when>
    <thetext>(In reply to Carlos Alberto Lopez Perez from comment #2)
&gt; I have tried to run run-webdriver-tests with epiphany by modifying locally
&gt; webdriver_driver_gtk.py, but it is not working at all.
&gt; The epiphany window closes as soon as it opens and all the tests give an
&gt; error.
&gt; Not sure what is wrong with it.

This was due to to the test-runner trying to use the wrong browser name in the capabilities negotiation when the webdriver was starting.

I have a patch that allows to run the webkit webdriver tests with epiphany: https://people.igalia.com/clopez/wkbug/202047/support-epiphany-webdriver-tests.patch The instructions about how to use it, are in the patch itself (in the commit log).


With it I get the following results:

MiniBrowser (r250519): https://people.igalia.com/clopez/wkbug/202047/minibrowser_results.txt
Unexpected failures (61)

Epiphany (3.34 + WebKit r250519): https://people.igalia.com/clopez/wkbug/202047/epiphany_results.txt
Unexpected failures (84)
Unexpected timeouts (10)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1576365</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-10-03 05:24:05 -0700</bug_when>
    <thetext>The problem, at least one of them if there&apos;s more than one, is that epiphany keeps the focus on the location entry. Since the load is not triggered by ephy UI the focus is not transferred to the web view. I&apos;ll write a patch for ephy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1576367</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-10-03 05:33:26 -0700</bug_when>
    <thetext>https://gitlab.gnome.org/GNOME/epiphany/commit/cd77e3944e4ebb6789ae59153e0f66994613719f

I pushed it to 3.34 branch too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1576373</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-10-03 06:06:57 -0700</bug_when>
    <thetext>Timeouts are gone, but I&apos;m still getting more failures with ephy. I&apos;m investigating. Some of them are related to the set/get window rect, there seems to be a race because they are flaky failures.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1576378</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-10-03 06:11:06 -0700</bug_when>
    <thetext>When it fails:

webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WebKitWebDriver:16220): DBG: POST /session/976322be-cd32-448e-9be5-37b03334cb78/window/rect {&quot;width&quot;: 800, &quot;height&quot;: 600}
webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WebKitWebDriver:16220): DBG: {&quot;value&quot;:{&quot;x&quot;:26,&quot;y&quot;:23,&quot;width&quot;:1024,&quot;height&quot;:768}}
webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WebKitWebDriver:16220): DBG: GET /session/976322be-cd32-448e-9be5-37b03334cb78/window/rect
webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WebKitWebDriver:16220): DBG: {&quot;value&quot;:{&quot;x&quot;:26,&quot;y&quot;:23,&quot;width&quot;:1024,&quot;height&quot;:768}}

When it works:

webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WebKitWebDriver:16139): DBG: POST /session/c6e754a5-7ac7-490c-8b63-ae1f7df438cf/window/rect {&quot;width&quot;: 800, &quot;height&quot;: 600}
webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WebKitWebDriver:16139): DBG: {&quot;value&quot;:{&quot;x&quot;:26,&quot;y&quot;:23,&quot;width&quot;:800,&quot;height&quot;:600}}
webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WebKitWebDriver:16139): DBG: GET /session/c6e754a5-7ac7-490c-8b63-ae1f7df438cf/window/rect
webkitpy.webdriver_tests.webdriver_w3c_executor: [DEBUG] (WebKitWebDriver:16139): DBG: {&quot;value&quot;:{&quot;x&quot;:26,&quot;y&quot;:23,&quot;width&quot;:800,&quot;height&quot;:600}}

I think we assume that setting the window size is sync while it&apos;s not. Sometimes it takes a bit more and we get the previous size. We don&apos;t notice it in MB because 800x600 is already the default window size of MB.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>379241</attachid>
            <date>2019-09-20 08:11:00 -0700</date>
            <delta_ts>2019-09-20 08:11:00 -0700</delta_ts>
            <desc>simplified test case to reproduce on of the issues</desc>
            <filename>simplified_test_case_input_text.sh</filename>
            <type>text/plain</type>
            <size>1979</size>
            <attacher name="Carlos Alberto Lopez Perez">clopez</attacher>
            
              <data encoding="base64">IyEvYmluL2Jhc2gKIwojIFRvIHJ1biB0aGlzIHRlc3QgZmlyc3Qgb3BlbiBXZWJLaXRXZWJEcml2
ZXIgdG8gbGlzdGVuIGluIDEyNy4wLjAuMTo0NDQKIyBFeGFtcGxlOgojICAgV2ViS2l0V2ViRHJp
dmVyIC0taG9zdD0xMjcuMC4wLjEgLS1wb3J0PTQ0NDQKIyBUaGVuIHJ1biB0aGlzIHNjcmlwdCwg
aWYgaXQgd29ya3MgeW91IHNob3VsZCBzZWUgdGhlIGJyb3dzZXIgb3BlbmluZyBhbmQgdGhlIHdv
cmQgZm9vIHdyaXR0ZW4gb24gdGhlIHRleHQgaW5wdXQKIwoKaWYgWyAiJCMiIC1uZSAyIF07IHRo
ZW4KICAgIGVjaG8gIkVSUk9SOiBpbmNvcnJlY3QgbnVtYmVyIG9mIHBhcmFtZXRlcnMiIDE+JjIK
ICAgIGVjaG8gMT4mMgogICAgZWNobyAiICAqIEZvciBNaW5pQnJvd3NlciB0ZXN0IHVzZToiIDE+
JjIKICAgIGVjaG8gIiAgICAkezB9IG1pbmlicm93c2VyIC9wYXRoL3RvL01pbmlCcm93c2VyIiAx
PiYyCiAgICBlY2hvIDE+JjIKICAgIGVjaG8gIiAgKiBGb3IgZXBpcGhhbnkgdGVzdCB1c2U6IiAx
PiYyCiAgICBlY2hvICIgICAgJHswfSBlcGlwaGFueSAvcGF0aC90by9lcGlwaGFueSIgMT4mMgog
ICAgZXhpdCAxCmZpCgpCUk9XU0VSTkFNRT0iJHsxfSIKQlJPV1NFUlBBVEg9IiR7Mn0iCgppZiAh
IHRlc3QgLXggIiR7QlJP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