<?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>167088</bug_id>
          
          <creation_ts>2017-01-16 02:14:31 -0800</creation_ts>
          <short_desc>[Win] Clipboard tests are flaky.</short_desc>
          <delta_ts>2017-01-18 05:11:10 -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>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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Per Arne Vollan">pvollan</reporter>
          <assigned_to name="Per Arne Vollan">pvollan</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>lforschler</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1267116</commentid>
    <comment_count>0</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-01-16 02:14:31 -0800</bug_when>
    <thetext>Tests involving the clipboard are flaky when running with multiple DRTs, since the clipboard is global. We can fix this by assigning each DRT a separate window station (each window station has its own clipboard).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1267118</commentid>
    <comment_count>1</comment_count>
      <attachid>298949</attachid>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-01-16 02:22:08 -0800</bug_when>
    <thetext>Created attachment 298949
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1267370</commentid>
    <comment_count>2</comment_count>
      <attachid>298949</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2017-01-17 09:26:03 -0800</bug_when>
    <thetext>Comment on attachment 298949
Patch

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

What a great idea! I didn&apos;t know this was a problem, or that Window Stations even existed. Fantastic! I just had a question about how error state is handled in this patch, and whether we should be calling &quot;CreateDesktop&quot; with bad inputs. If it is safe, I approve the patch. But if you are not sure, I&apos;d prefer you bypass these steps.

&gt; Tools/DumpRenderTree/win/DumpRenderTree.cpp:1485
&gt; +            fprintf(stderr, &quot;DumpRenderTree should be run as Administrator!\n&quot;);

This is a shame! Is there no permission that can be granted a test user account to allow creation of unique Window Stations?

&gt; Tools/DumpRenderTree/win/DumpRenderTree.cpp:1488
&gt; +    if (!::SetProcessWindowStation(windowsStation))

Is it okay to pass a nullptr windowStation here (assuming line 1481 is false)? We probably shouldn&apos;t terminate if this stuff fails, since we&apos;ve been living without Window Stations for years. But I wonder if we should bypass the steps in lines 1481-1493 when stuff is failing, rather than passing bad values to these API calls.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1267717</commentid>
    <comment_count>3</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-01-18 05:03:24 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Comment on attachment 298949 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=298949&amp;action=review
&gt; 
&gt; What a great idea! I didn&apos;t know this was a problem, or that Window Stations
&gt; even existed. Fantastic! I just had a question about how error state is
&gt; handled in this patch, and whether we should be calling &quot;CreateDesktop&quot; with
&gt; bad inputs. If it is safe, I approve the patch. But if you are not sure, I&apos;d
&gt; prefer you bypass these steps.
&gt; 
&gt; &gt; Tools/DumpRenderTree/win/DumpRenderTree.cpp:1485
&gt; &gt; +            fprintf(stderr, &quot;DumpRenderTree should be run as Administrator!\n&quot;);
&gt; 
&gt; This is a shame! Is there no permission that can be granted a test user
&gt; account to allow creation of unique Window Stations?
&gt; 
&gt; &gt; Tools/DumpRenderTree/win/DumpRenderTree.cpp:1488
&gt; &gt; +    if (!::SetProcessWindowStation(windowsStation))
&gt; 
&gt; Is it okay to pass a nullptr windowStation here (assuming line 1481 is
&gt; false)? We probably shouldn&apos;t terminate if this stuff fails, since we&apos;ve
&gt; been living without Window Stations for years. But I wonder if we should
&gt; bypass the steps in lines 1481-1493 when stuff is failing, rather than
&gt; passing bad values to these API calls.

Thanks for reviewing! I will update the patch before landing :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1267719</commentid>
    <comment_count>4</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-01-18 05:11:10 -0800</bug_when>
    <thetext>Committed r210850: &lt;https://trac.webkit.org/changeset/210850&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>298949</attachid>
            <date>2017-01-16 02:22:08 -0800</date>
            <delta_ts>2017-01-17 09:26:03 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-167088-20170116022023.patch</filename>
            <type>text/plain</type>
            <size>2707</size>
            <attacher name="Per Arne Vollan">pvollan</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDIxMDc4NCkKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDE2IEBACisyMDE3LTAxLTE2ICBQZXIgQXJuZSBWb2xsYW4gIDxwdm9sbGFuQGFwcGxlLmNv
bT4KKworICAgICAgICBbV2luXSBDbGlwYm9hcmQgdGVzdHMgYXJlI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ICAgcmV0dXJuIDA7Cg==
</data>
<flag name="review"
          id="321009"
          type_id="1"
          status="+"
          setter="bfulgham"
    />
          </attachment>
      

    </bug>

</bugzilla>