<?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>205089</bug_id>
          
          <creation_ts>2019-12-10 16:02:45 -0800</creation_ts>
          <short_desc>Fix API test failure after r253351</short_desc>
          <delta_ts>2019-12-10 17:20: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>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="Per Arne Vollan">pvollan</reporter>
          <assigned_to name="Per Arne Vollan">pvollan</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>tsavell</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1597396</commentid>
    <comment_count>0</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2019-12-10 16:02:45 -0800</bug_when>
    <thetext>TestWebKitAPI.ContentFiltering.LazilyLoadPlatformFrameworks
        
        /Volumes/Data/worker/macOS-High-Sierra-Release-Build-EWS/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:364
        Expected equality of these values:
          static_cast&lt;bool&gt;(networkExtensionShouldBeLoaded)
            Which is: true
          static_cast&lt;bool&gt;(networkExtensionLoaded)
            Which is: false
        
        
        /Volumes/Data/worker/macOS-High-Sierra-Release-Build-EWS/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:364
        Expected equality of these values:
          static_cast&lt;bool&gt;(networkExtensionShouldBeLoaded)
            Which is: true
          static_cast&lt;bool&gt;(networkExtensionLoaded)
            Which is: false</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1597397</commentid>
    <comment_count>1</comment_count>
      <attachid>385313</attachid>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2019-12-10 16:04:56 -0800</bug_when>
    <thetext>Created attachment 385313
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1597398</commentid>
    <comment_count>2</comment_count>
      <attachid>385313</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2019-12-10 16:11:41 -0800</bug_when>
    <thetext>Comment on attachment 385313
Patch

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

&gt; Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:392
&gt; +    method_setImplementation(method, reinterpret_cast&lt;IMP&gt;(filterRequired));

Could we have other clients that might need this? Or is this truly just a case of our test infrastructure needing this turned on.

How do client applications that will need content filtering signal this fact (e.g., Safari) opt into this feature?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1597402</commentid>
    <comment_count>3</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2019-12-10 16:19:25 -0800</bug_when>
    <thetext>(In reply to Brent Fulgham from comment #2)
&gt; Comment on attachment 385313 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=385313&amp;action=review
&gt; 
&gt; &gt; Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:392
&gt; &gt; +    method_setImplementation(method, reinterpret_cast&lt;IMP&gt;(filterRequired));
&gt; 
&gt; Could we have other clients that might need this? Or is this truly just a
&gt; case of our test infrastructure needing this turned on.
&gt; 
&gt; How do client applications that will need content filtering signal this fact
&gt; (e.g., Safari) opt into this feature?

I don&apos;t believe other clients need this. The API test is testing whether the network extension framework is loaded in the WebContent process, and the patch in r253351 avoids loading the framework unless it is needed, introducing the failure. The test fix swizzles [NEFilterSource filterRequired] in the UI process, which will cause the framework to be loaded in the WebContent process.

Thanks for reviewing!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1597404</commentid>
    <comment_count>4</comment_count>
      <attachid>385313</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2019-12-10 16:22:11 -0800</bug_when>
    <thetext>Comment on attachment 385313
Patch

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

r=me

&gt;&gt;&gt; Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:392
&gt;&gt;&gt; +    method_setImplementation(method, reinterpret_cast&lt;IMP&gt;(filterRequired));
&gt;&gt; 
&gt;&gt; Could we have other clients that might need this? Or is this truly just a case of our test infrastructure needing this turned on.
&gt;&gt; 
&gt;&gt; How do client applications that will need content filtering signal this fact (e.g., Safari) opt into this feature?
&gt; 
&gt; I don&apos;t believe other clients need this. The API test is testing whether the network extension framework is loaded in the WebContent process, and the patch in r253351 avoids loading the framework unless it is needed, introducing the failure. The test fix swizzles [NEFilterSource filterRequired] in the UI process, which will cause the framework to be loaded in the WebContent process.
&gt; 
&gt; Thanks for reviewing!

Sounds good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1597419</commentid>
    <comment_count>5</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2019-12-10 16:52:19 -0800</bug_when>
    <thetext>(In reply to Brent Fulgham from comment #4)
&gt; Comment on attachment 385313 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=385313&amp;action=review
&gt; 
&gt; r=me
&gt; 
&gt; &gt;&gt;&gt; Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:392
&gt; &gt;&gt;&gt; +    method_setImplementation(method, reinterpret_cast&lt;IMP&gt;(filterRequired));
&gt; &gt;&gt; 
&gt; &gt;&gt; Could we have other clients that might need this? Or is this truly just a case of our test infrastructure needing this turned on.
&gt; &gt;&gt; 
&gt; &gt;&gt; How do client applications that will need content filtering signal this fact (e.g., Safari) opt into this feature?
&gt; &gt; 
&gt; &gt; I don&apos;t believe other clients need this. The API test is testing whether the network extension framework is loaded in the WebContent process, and the patch in r253351 avoids loading the framework unless it is needed, introducing the failure. The test fix swizzles [NEFilterSource filterRequired] in the UI process, which will cause the framework to be loaded in the WebContent process.
&gt; &gt; 
&gt; &gt; Thanks for reviewing!
&gt; 
&gt; Sounds good.

Thanks for reviewing :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1597438</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-12-10 17:18:22 -0800</bug_when>
    <thetext>The commit-queue encountered the following flaky tests while processing attachment 385313:

imported/w3c/web-platform-tests/content-security-policy/unsafe-eval/eval-scripts-setTimeout-blocked.sub.html bug 203973 (author: dbates@webkit.org)
The commit-queue is continuing to process your patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1597440</commentid>
    <comment_count>7</comment_count>
      <attachid>385313</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-12-10 17:19:08 -0800</bug_when>
    <thetext>Comment on attachment 385313
Patch

Clearing flags on attachment: 385313

Committed r253355: &lt;https://trac.webkit.org/changeset/253355&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1597441</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-12-10 17:19:09 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1597442</commentid>
    <comment_count>9</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-12-10 17:20:43 -0800</bug_when>
    <thetext>&lt;rdar://problem/57816052&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>385313</attachid>
            <date>2019-12-10 16:04:56 -0800</date>
            <delta_ts>2019-12-10 17:19:08 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-205089-20191210160456.patch</filename>
            <type>text/plain</type>
            <size>2391</size>
            <attacher name="Per Arne Vollan">pvollan</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDI1MzM1NCkKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDE3IEBACisyMDE5LTEyLTEwICBQZXIgQXJuZSBWb2xsYW4gIDxwdm9sbGFuQGFwcGxlLmNv
bT4KKworICAgICAgICBGaXggQVBJIHRlc3QgZmFpbHVyZSBhZnRlciByMjUzMzUxCisgICAgICAg
IGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0yMDUwODkKKworICAgICAg
ICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBXaXRoIHRoZSBwYXRjaCBs
YW5kZWQgaW4gcjI1MzM1MSwgdGhlIE5ldHdvcmtFeHRlbnNpb24gZnJhbWV3b3JrIHdpbGwgbm90
IGJlIGxvYWRlZCBpbiB0aGUgV2ViQ29udGVudCBwcm9jZXNzIHVubGVzcworICAgICAgICBbTkVG
aWx0ZXJTb3VyY2UgZmlsdGVyUmVxdWlyZWRdIHJldHVybnMgWUVTLiBTd2l6emxlIHRoaXMgbWV0
aG9kIHRvIHJldHVybiBZRVMgaW4gdGhlIFVJIHByb2Nlc3MuC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