<?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>203063</bug_id>
          
          <creation_ts>2019-10-16 17:22:38 -0700</creation_ts>
          <short_desc>Cannot run some WPT cases manually</short_desc>
          <delta_ts>2019-10-22 10:44:24 -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>Media</component>
          <version>WebKit 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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peng Liu">peng.liu6</reporter>
          <assigned_to name="Peng Liu">peng.liu6</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jer.noble</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1580784</commentid>
    <comment_count>0</comment_count>
    <who name="Peng Liu">peng.liu6</who>
    <bug_when>2019-10-16 17:22:38 -0700</bug_when>
    <thetext>Due to the updates about LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js in https://trac.webkit.org/changeset/251043, we are not able to run some WPT cases manually.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1580792</commentid>
    <comment_count>1</comment_count>
      <attachid>381137</attachid>
    <who name="Peng Liu">peng.liu6</who>
    <bug_when>2019-10-16 17:32:24 -0700</bug_when>
    <thetext>Created attachment 381137
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1580842</commentid>
    <comment_count>2</comment_count>
    <who name="Peng Liu">peng.liu6</who>
    <bug_when>2019-10-16 20:16:25 -0700</bug_when>
    <thetext>One affected WPT case: LayoutTests/imported/w3c/web-platform-tests/picture-in-picture/exit-picture-in-picture.html.

We need to make sure the test case can run in the browser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1580944</commentid>
    <comment_count>3</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2019-10-17 06:42:06 -0700</bug_when>
    <thetext>I guess the affected test expects user to click somewhere.
There might be a race in the sense the promise will get resolved while the user might not have clicked already.
This seems better than throwing though.
What would be the result of rejecting the promise?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1580973</commentid>
    <comment_count>4</comment_count>
    <who name="Peng Liu">peng.liu6</who>
    <bug_when>2019-10-17 08:53:57 -0700</bug_when>
    <thetext>With this patch, when we run the case manually in a browser tab, the promise in window.test_driver_internal.click will be resolved directly. However, that will be OK because the promise of the bless function will not be resolved and the page will wait for a user to click the button to execute the test.

Without this patch, the case will fail with &quot;promise_test: Unhandled rejection with value: object &quot;Error: window.eventSender is undefined.&quot;&quot;. The test case will not have a chance to execute.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1581131</commentid>
    <comment_count>5</comment_count>
      <attachid>381137</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2019-10-17 14:00:40 -0700</bug_when>
    <thetext>Comment on attachment 381137
Patch

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

&gt; LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js:184
&gt; +    if (!window.testRunner)
&gt; +        return Promise.resolve();

Hm... I&apos;m not sure if this is right thing to do here.
Some tests would expect that the click had already happened after this.
We probably want to wait for click event to get dispatched on element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1581146</commentid>
    <comment_count>6</comment_count>
      <attachid>381137</attachid>
    <who name="Peng Liu">peng.liu6</who>
    <bug_when>2019-10-17 14:11:37 -0700</bug_when>
    <thetext>Comment on attachment 381137
Patch

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

&gt;&gt; LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js:184
&gt;&gt; +        return Promise.resolve();
&gt; 
&gt; Hm... I&apos;m not sure if this is right thing to do here.
&gt; Some tests would expect that the click had already happened after this.
&gt; We probably want to wait for click event to get dispatched on element.

In a manual test (open the test page in a browser tab), user can click the button to execute the test case. Could you give an example test case that needs the click to be done automatically?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1582432</commentid>
    <comment_count>7</comment_count>
      <attachid>381137</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-10-22 10:43:08 -0700</bug_when>
    <thetext>Comment on attachment 381137
Patch

Clearing flags on attachment: 381137

Committed r251440: &lt;https://trac.webkit.org/changeset/251440&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1582433</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-10-22 10:43:09 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1582434</commentid>
    <comment_count>9</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-10-22 10:44:24 -0700</bug_when>
    <thetext>&lt;rdar://problem/56505834&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>381137</attachid>
            <date>2019-10-16 17:32:24 -0700</date>
            <delta_ts>2019-10-22 10:43:08 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>203063.patch</filename>
            <type>text/plain</type>
            <size>1341</size>
            <attacher name="Peng Liu">pe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