<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[283920] branches/safari-612-branch</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/283920">283920</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2021-10-11 12:14:52 -0700 (Mon, 11 Oct 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Cherry-pick <a href="http://trac.webkit.org/projects/webkit/changeset/282305">r282305</a>. <rdar://83955184></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari612branchLayoutTestsChangeLog">branches/safari-612-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari612branchLayoutTestsTestExpectations">branches/safari-612-branch/LayoutTests/TestExpectations</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cChangeLog">branches/safari-612-branch/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportonlyfourreportshttpsexpectedtxt">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https-expected.txt</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportonlyfourreportshttpshtmlsubheaders">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html.sub.headers</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportonlyfromunsafenonehttpsexpectedtxt">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https-expected.txt</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportonlysameoriginreporttohttpsexpectedtxt">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https-expected.txt</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportonlysameoriginreporttohttpshtmlsubheaders">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html.sub.headers</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportonlysameoriginhttpsexpectedtxt">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https-expected.txt</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingcoopnavigatedopenerhttpsexpectedtxt">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https-expected.txt</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingcoopnavigatedpopuphttpsexpectedtxt">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https-expected.txt</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameoriginallowpopupsreporttohttpsexpectedtxt">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https-expected.txt</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameoriginallowpopupsreporttohttpshtmlsubheaders">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html.sub.headers</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameorigincoepreporttohttpsexpectedtxt">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https-expected.txt</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameorigincoepreporttohttpshtmlsubheaders">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html.sub.headers</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameoriginreporttohttpsexpectedtxt">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https-expected.txt</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameoriginreporttohttpshtmlsubheaders">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html.sub.headers</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameoriginhttpsexpectedtxt">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https-expected.txt</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupunsafenonereporttohttpsexpectedtxt">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https-expected.txt</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupunsafenonereporttohttpshtmlsubheaders">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html.sub.headers</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingredirectwithsameoriginallowpopupshttpsexpectedtxt">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt</a></li>
<li><a href="#branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingresourcesreportingcommonjs">branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/reporting-common.js</a></li>
<li><a href="#branchessafari612branchSourceWebCoreChangeLog">branches/safari-612-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari612branchSourceWebCoreHeaderscmake">branches/safari-612-branch/Source/WebCore/Headers.cmake</a></li>
<li><a href="#branchessafari612branchSourceWebCoreSourcestxt">branches/safari-612-branch/Source/WebCore/Sources.txt</a></li>
<li><a href="#branchessafari612branchSourceWebCoreWebCorexcodeprojprojectpbxproj">branches/safari-612-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari612branchSourceWebCoreloaderCrossOriginOpenerPolicycpp">branches/safari-612-branch/Source/WebCore/loader/CrossOriginOpenerPolicy.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebCoreloaderCrossOriginOpenerPolicyh">branches/safari-612-branch/Source/WebCore/loader/CrossOriginOpenerPolicy.h</a></li>
<li><a href="#branchessafari612branchSourceWebCoreloaderDocumentLoadercpp">branches/safari-612-branch/Source/WebCore/loader/DocumentLoader.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebCoreloaderPingLoadercpp">branches/safari-612-branch/Source/WebCore/loader/PingLoader.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebCoreloaderPingLoaderh">branches/safari-612-branch/Source/WebCore/loader/PingLoader.h</a></li>
<li><a href="#branchessafari612branchSourceWebCoreloaderWorkerThreadableLoadercpp">branches/safari-612-branch/Source/WebCore/loader/WorkerThreadableLoader.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebCoreloadercacheCachedResourceLoadercpp">branches/safari-612-branch/Source/WebCore/loader/cache/CachedResourceLoader.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebCorepagePagecpp">branches/safari-612-branch/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebCorepagePageh">branches/safari-612-branch/Source/WebCore/page/Page.h</a></li>
<li><a href="#branchessafari612branchSourceWebCorepagePageConfigurationcpp">branches/safari-612-branch/Source/WebCore/page/PageConfiguration.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebCorepagePageConfigurationh">branches/safari-612-branch/Source/WebCore/page/PageConfiguration.h</a></li>
<li><a href="#branchessafari612branchSourceWebCoreplatformnetworkHTTPHeaderNamesin">branches/safari-612-branch/Source/WebCore/platform/network/HTTPHeaderNames.in</a></li>
<li><a href="#branchessafari612branchSourceWebKitChangeLog">branches/safari-612-branch/Source/WebKit/ChangeLog</a></li>
<li><a href="#branchessafari612branchSourceWebKitNetworkProcessNetworkConnectionToWebProcesscpp">branches/safari-612-branch/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebKitNetworkProcessNetworkSessioncpp">branches/safari-612-branch/Source/WebKit/NetworkProcess/NetworkSession.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebKitWebProcessWebPageWebPagecpp">branches/safari-612-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebKitWebProcessWebProcesscpp">branches/safari-612-branch/Source/WebKit/WebProcess/WebProcess.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebKitWebProcessWebProcessh">branches/safari-612-branch/Source/WebKit/WebProcess/WebProcess.h</a></li>
<li><a href="#branchessafari612branchToolsChangeLog">branches/safari-612-branch/Tools/ChangeLog</a></li>
<li><a href="#branchessafari612branchToolsWebKitTestRunnerInjectedBundleInjectedBundlecpp">branches/safari-612-branch/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari612branchSourceWebCoreloaderReportingEndpointsCachecpp">branches/safari-612-branch/Source/WebCore/loader/ReportingEndpointsCache.cpp</a></li>
<li><a href="#branchessafari612branchSourceWebCoreloaderReportingEndpointsCacheh">branches/safari-612-branch/Source/WebCore/loader/ReportingEndpointsCache.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari612branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/ChangeLog (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/ChangeLog 2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/ChangeLog    2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2021-09-10  Chris Dumez  <cdumez@apple.com>
+
+        Implement navigation reporting for Cross-Origin-Opener-Policy
+        https://bugs.webkit.org/show_bug.cgi?id=230046
+
+        Reviewed by Alex Christensen.
+
+        Unskip COOP navigation reporting tests.
+
+        * TestExpectations:
+
</ins><span class="cx"> 2021-09-02  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [COOP] Cross origin isolation doesn't happen when going from an HTTP URL to a HTTPS one with COOP+COEP
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/TestExpectations (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/TestExpectations  2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/TestExpectations     2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -405,6 +405,8 @@
</span><span class="cx"> imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/blob.https.html [ DumpJSConsoleLogInStdErr ]
</span><span class="cx"> imported/w3c/web-platform-tests/html/cross-origin-opener-policy/navigate-to-aboutblank.https.html [ DumpJSConsoleLogInStdErr ]
</span><span class="cx"> imported/w3c/web-platform-tests/html/cross-origin-opener-policy/navigate-top-to-aboutblank.https.html [ DumpJSConsoleLogInStdErr ]
</span><ins>+imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https.html [ DumpJSConsoleLogInStdErr ]
+imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https.html [ DumpJSConsoleLogInStdErr ]
</ins><span class="cx"> imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-network-error.sub.html [ DumpJSConsoleLogInStdErr ]
</span><span class="cx"> imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/integrity.html [ DumpJSConsoleLogInStdErr ]
</span><span class="cx"> imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/import-css-module-basic.html [ DumpJSConsoleLogInStdErr ]
</span><span class="lines">@@ -712,8 +714,8 @@
</span><span class="cx"> imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/select-sizing-001.html [ ImageOnlyFailure ]
</span><span class="cx"> imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x.xhtml [ ImageOnlyFailure ]
</span><span class="cx"> 
</span><del>-# Cross-Origin Opener Policy reporting is not supported and it is causing those tests to time out.
-imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting [ Skip ]
</del><ins>+# Cross-Origin Opener Policy access reporting is not supported and it is causing those tests to time out.
+imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting [ Skip ]
</ins><span class="cx"> 
</span><span class="cx"> # Cross-Origin-Embedder-Policy: credentialless is not supported.
</span><span class="cx"> imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/credentialless
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/ChangeLog (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/ChangeLog    2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/ChangeLog       2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2021-09-10  Chris Dumez  <cdumez@apple.com>
+
+        Implement navigation reporting for Cross-Origin-Opener-Policy
+        https://bugs.webkit.org/show_bug.cgi?id=230046
+
+        Reviewed by Alex Christensen.
+
+        Rebaseline WPT COOP navigation reporting tests now that they are passing.
+
+        Merge the following fix to WPT tests so they can run with the WebKit infrastructure:
+        - https://github.com/web-platform-tests/wpt/pull/30411
+
+        Merge the following WPT test fix to address flakiness:
+        - https://github.com/web-platform-tests/wpt/pull/30548
+
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https-expected.txt:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html.sub.headers:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https-expected.txt:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https-expected.txt:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html.sub.headers:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https-expected.txt:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https-expected.txt:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https-expected.txt:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https-expected.txt:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html.sub.headers:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https-expected.txt:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html.sub.headers:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https-expected.txt:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html.sub.headers:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https-expected.txt:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https-expected.txt:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html.sub.headers:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt:
+        * web-platform-tests/html/cross-origin-opener-policy/reporting/resources/reporting-common.js:
+
</ins><span class="cx"> 2021-08-31  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Enable SharedArrayBuffer support when COOP/COEP headers are used
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportonlyfourreportshttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https-expected.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https-expected.txt        2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https-expected.txt   2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><span class="cx"> 
</span><del>-FAIL coop reporting test A test with both COOP and COOP report only setup to CROSS_ORIGIN with same-origin-allow-popups; report-to="coop-popup-report-endpoint", require-corp, same-origin; report-to="coop-popup-report-only-endpoint", require-corp promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-allow-popups\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html\",\"type\":\"coop\"}, within available reports: []"
</del><ins>+PASS coop reporting test A test with both COOP and COOP report only setup to CROSS_ORIGIN with same-origin-allow-popups; report-to="coop-popup-report-endpoint", require-corp, same-origin; report-to="coop-popup-report-only-endpoint", require-corp
</ins><span class="cx"> PASS verify remaining reports
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportonlyfourreportshttpshtmlsubheaders"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html.sub.headers (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html.sub.headers    2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-four-reports.https.html.sub.headers       2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -3,4 +3,4 @@
</span><span class="cx"> Cross-Origin-Embedder-Policy: require-corp
</span><span class="cx"> Cross-Origin-Embedder-Policy-Report-Only: require-corp
</span><span class="cx"> Referrer-Policy: origin
</span><del>-report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}
</del><ins>+report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}
</ins></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportonlyfromunsafenonehttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https-expected.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https-expected.txt    2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https-expected.txt       2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> 
</span><del>-FAIL coop reporting test Report only tests for an opener without any COOP/COOP report only set to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint",  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"effectivePolicy\":\"same-origin\",\"previousResponseURL\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-from-unsafe-none.https.html\",\"referrer\":\"https://localhost:9443/\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test Report only tests for an opener without any COOP/COOP report only set to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint",  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"effectivePolicy\":\"same-origin\",\"previousResponseURL\":\"\",\"referrer\":\"https://localhost:9443/\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []"
</del><ins>+PASS coop reporting test Report only tests for an opener without any COOP/COOP report only set to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint",
+PASS coop reporting test Report only tests for an opener without any COOP/COOP report only set to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint",
</ins><span class="cx"> PASS verify remaining reports
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportonlysameoriginreporttohttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https-expected.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https-expected.txt       2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https-expected.txt  2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> 
</span><del>-FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint",  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
</del><ins>+PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , ,
+PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint",
</ins><span class="cx"> PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint",
</span><span class="cx"> PASS verify remaining reports
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportonlysameoriginreporttohttpshtmlsubheaders"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html.sub.headers (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html.sub.headers   2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin-report-to.https.html.sub.headers      2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,3 +1,3 @@
</span><span class="cx"> Cross-Origin-Opener-Policy-Report-Only: same-origin; report-to="coop-report-only-endpoint"
</span><span class="cx"> Referrer-Policy: origin
</span><del>-report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}
</del><ins>+report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}
</ins></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportonlysameoriginhttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https-expected.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https-expected.txt 2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https-expected.txt    2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> 
</span><del>-FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with , require-corp, same-origin; report-to="coop-popup-report-only-endpoint",  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"effectivePolicy\":\"same-origin-plus-coep\",\"previousResponseURL\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html\",\"referrer\":\"https://localhost:9443/\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-only-endpoint, expected report: {\"body\":{\"disposition\":\"reporting\",\"effectivePolicy\":\"same-origin-plus-coep\",\"previousResponseURL\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/report-only-same-origin.https.html\",\"referrer\":\"https://localhost:9443/\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []"
</del><ins>+PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with , require-corp, same-origin; report-to="coop-popup-report-only-endpoint",
+PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp
</ins><span class="cx"> PASS verify remaining reports
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingcoopnavigatedopenerhttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https-expected.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https-expected.txt 2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-opener.https-expected.txt    2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,6 +1,3 @@
</span><del>-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: cancelled
</del><span class="cx"> 
</span><del>-Harness Error (TIMEOUT), message = null
</del><ins>+PASS navigation-report-from-opener-navigation
</ins><span class="cx"> 
</span><del>-TIMEOUT navigation-report-from-opener-navigation Test timed out
-
</del></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingcoopnavigatedpopuphttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https-expected.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https-expected.txt  2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-coop-navigated-popup.https-expected.txt     2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><span class="cx"> 
</span><del>-FAIL Open a popup to a document without COOP, then navigate it to a document with promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"unsafe-none\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []"
</del><ins>+PASS Open a popup to a document without COOP, then navigate it to a document with
</ins><span class="cx"> PASS verify remaining reports
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameoriginallowpopupsreporttohttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https-expected.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https-expected.txt      2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https-expected.txt 2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> 
</span><del>-FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-allow-popups\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin-allow-popups; report-to="coop-popup-report-endpoint", require-corp, ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-allow-popups\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin, require-corp, ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-allow-popups\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
</del><ins>+PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,
+PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin-allow-popups; report-to="coop-popup-report-endpoint", require-corp, ,
+PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin, require-corp, ,
</ins><span class="cx"> PASS verify remaining reports
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameoriginallowpopupsreporttohttpshtmlsubheaders"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html.sub.headers (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html.sub.headers  2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-allow-popups-report-to.https.html.sub.headers     2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,3 +1,3 @@
</span><del>-report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}
</del><ins>+report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}
</ins><span class="cx"> Cross-Origin-Opener-Policy: same-origin-allow-popups; report-to="coop-report-endpoint"
</span><span class="cx"> Referrer-Policy: origin
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameorigincoepreporttohttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https-expected.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https-expected.txt      2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https-expected.txt 2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,9 +1,9 @@
</span><span class="cx"> >
</span><span class="cx"> 
</span><span class="cx"> PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", require-corp, ,
</span><del>-FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-plus-coep\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", require-corp, ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-plus-coep\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-plus-coep\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin-plus-coep\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
</del><ins>+PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,
+PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", require-corp, ,
+PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp
+PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint", require-corp
</ins><span class="cx"> PASS verify remaining reports
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameorigincoepreporttohttpshtmlsubheaders"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html.sub.headers (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html.sub.headers  2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-coep-report-to.https.html.sub.headers     2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}
</del><ins>+report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}
</ins><span class="cx"> Cross-Origin-Opener-Policy: same-origin; report-to="coop-report-endpoint"
</span><span class="cx"> Cross-Origin-Embedder-Policy: require-corp
</span><span class="cx"> Referrer-Policy: origin
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameoriginreporttohttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https-expected.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https-expected.txt   2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https-expected.txt      2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,9 +1,9 @@
</span><span class="cx"> 
</span><span class="cx"> PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,
</span><del>-FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", require-corp, ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with unsafe-none, , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
</del><ins>+PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,
+PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , ,
+PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", require-corp, ,
+PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , ,
+PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with unsafe-none, , ,
</ins><span class="cx"> PASS verify remaining reports
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameoriginreporttohttpshtmlsubheaders"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html.sub.headers (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html.sub.headers       2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin-report-to.https.html.sub.headers  2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,3 +1,3 @@
</span><del>-report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}
</del><ins>+report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}
</ins><span class="cx"> Cross-Origin-Opener-Policy: same-origin; report-to="coop-report-endpoint"
</span><span class="cx"> Referrer-Policy: no-referrer
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupsameoriginhttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https-expected.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https-expected.txt     2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https-expected.txt        2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> 
</span><del>-FAIL coop reporting test reporting same origin to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"same-origin\",\"previousResponseURL\":\"\",\"referrer\":\"https://localhost:9443/\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin to SAME_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"unsafe-none\",\"previousResponseURL\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https.html\",\"referrer\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-same-origin.https.html\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin to CROSS_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-popup-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"previousResponseURL\":\"\",\"referrer\":\"https://localhost:9443/\",\"type\":\"navigation-to-response\"},\"url\":\"/uuid=(uuid)$/\",\"type\":\"coop\"}, within available reports: []"
</del><ins>+PASS coop reporting test reporting same origin to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,
+PASS coop reporting test reporting same origin to SAME_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , ,
+PASS coop reporting test reporting same origin to CROSS_ORIGIN with unsafe-none; report-to="coop-popup-report-endpoint", , ,
</ins><span class="cx"> PASS coop reporting test reporting same origin to SAME_ORIGIN with , , same-origin; report-to="coop-popup-report-only-endpoint",
</span><span class="cx"> PASS verify remaining reports
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupunsafenonereporttohttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https-expected.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https-expected.txt   2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https-expected.txt      2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> 
</span><del>-FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"unsafe-none\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin, , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"unsafe-none\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
-FAIL coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,  promise_test: Unhandled rejection with value: "No report matched the expected report for endpoint: coop-report-endpoint, expected report: {\"body\":{\"disposition\":\"enforce\",\"effectivePolicy\":\"unsafe-none\",\"nextResponseURL\":\"/uuid=(uuid)$/\",\"type\":\"navigation-from-response\"},\"url\":\"https://localhost:9443/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html\",\"type\":\"coop\"}, within available reports: []"
</del><ins>+PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,
+PASS coop reporting test reporting same origin with report-to to SAME_ORIGIN with same-origin, , ,
+PASS coop reporting test reporting same origin with report-to to CROSS_ORIGIN with same-origin; report-to="coop-popup-report-endpoint", , ,
</ins><span class="cx"> PASS verify remaining reports
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingpopupunsafenonereporttohttpshtmlsubheaders"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html.sub.headers (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html.sub.headers       2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-popup-unsafe-none-report-to.https.html.sub.headers  2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,2 +1,2 @@
</span><del>-report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}
</del><ins>+report-to: { "group": "coop-report-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-endpoint" }] }, { "group": "coop-report-only-endpoint", "max_age": 10886400, "endpoints": [{ "url": "/reporting/resources/report.py?endpoint=coop-report-only-endpoint" }]}
</ins><span class="cx"> Cross-Origin-Opener-Policy: unsafe-none; report-to="coop-report-endpoint"
</span></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingnavigationreportingreportingredirectwithsameoriginallowpopupshttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt        2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/navigation-reporting/reporting-redirect-with-same-origin-allow-popups.https-expected.txt   2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,6 +1,4 @@
</span><span class="cx"> 
</span><del>-Harness Error (TIMEOUT), message = null
</del><ins>+PASS Same origin openee redirected to same-origin with same-origin-allow-popups
+PASS Cross origin openee redirected to same-origin with same-origin-allow-popups
</ins><span class="cx"> 
</span><del>-TIMEOUT Same origin openee redirected to same-origin with same-origin-allow-popups Test timed out
-NOTRUN Cross origin openee redirected to same-origin with same-origin-allow-popups
-
</del></span></pre></div>
<a id="branchessafari612branchLayoutTestsimportedw3cwebplatformtestshtmlcrossoriginopenerpolicyreportingresourcesreportingcommonjs"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/reporting-common.js (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/reporting-common.js   2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/reporting-common.js      2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx">             expectedReport.report)){
</span><span class="cx">           expectedReport.endpoint.reports.splice(j,1);
</span><span class="cx">           resolve();
</span><ins>+          return;
</ins><span class="cx">         }
</span><span class="cx">       };
</span><span class="cx">       await wait(waitTime);
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/ChangeLog (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/ChangeLog      2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/ChangeLog 2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,3 +1,58 @@
</span><ins>+2021-09-10  Chris Dumez  <cdumez@apple.com>
+
+        Implement navigation reporting for Cross-Origin-Opener-Policy
+        https://bugs.webkit.org/show_bug.cgi?id=230046
+
+        Reviewed by Alex Christensen.
+
+        Implement navigation reporting for Cross-Origin-Opener-Policy as per:
+        - https://html.spec.whatwg.org/multipage/origin.html#coop-violation-navigation-to
+        - https://html.spec.whatwg.org/multipage/origin.html#coop-violation-navigation-from
+
+        With support for the Report-To HTTP header as documented here:
+        - https://www.w3.org/TR/reporting/#header
+
+        When adopting Cross-Origin-Opener-Policy or Cross-Origin-Opener-Policy-Report-Only HTTP headers,
+        developers can now specify a `report-to` directive with the name of the endpoint to report
+        COOP violations to. The mapping from endpoint name to URL is provided via teh Report-To HTTP
+        header, as is expected by the WPT tests.
+
+        No new tests, unskipped and rebaselined existing tests.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * loader/CrossOriginOpenerPolicy.cpp:
+        (WebCore::sanitizeReferrerForURLReport):
+        (WebCore::crossOriginOpenerPolicyValueToString):
+        (WebCore::sendCOOPViolationReport):
+        (WebCore::sendViolationReportWhenNavigatingToCOOPResponse):
+        (WebCore::sendViolationReportWhenNavigatingAwayFromCOOPResponse):
+        * loader/CrossOriginOpenerPolicy.h:
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::willSendRequest):
+        (WebCore::checkIfEnforcingReportOnlyCOOPWouldRequireBrowsingContextGroupSwitch):
+        (WebCore::DocumentLoader::enforceResponseCrossOriginOpenerPolicy):
+        (WebCore::DocumentLoader::responseReceived):
+        * loader/PingLoader.cpp:
+        (WebCore::PingLoader::sendViolationReport):
+        (WebCore::PingLoader::startPingLoad):
+        * loader/PingLoader.h:
+        * loader/ReportingEndpointsCache.cpp: Added.
+        (WebCore::ReportingEndpointsCache::singleton):
+        (WebCore::ReportingEndpointsCache::addEndPointsFromResponse):
+        (WebCore::ReportingEndpointsCache::addEndpointFromDictionary):
+        (WebCore::ReportingEndpointsCache::endpointURL const):
+        (WebCore::ReportingEndpointsCache::EndPoint::EndPoint):
+        (WebCore::ReportingEndpointsCache::EndPoint::hasExpired const):
+        * loader/ReportingEndpointsCache.h: Added.
+        * loader/ResourceLoaderOptions.h:
+        (WebCore::ResourceLoaderOptions::shouldOmitUserAgent):
+        (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
+        * loader/WorkerThreadableLoader.cpp:
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::updateHTTPRequestHeaders):
+        * platform/network/HTTPHeaderNames.in:
+
</ins><span class="cx"> 2021-09-02  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [COOP] Cross origin isolation doesn't happen when going from an HTTP URL to a HTTPS one with COOP+COEP
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreHeaderscmake"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/Headers.cmake (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/Headers.cmake  2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/Headers.cmake     2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -814,6 +814,7 @@
</span><span class="cx">     loader/PrivateClickMeasurement.h
</span><span class="cx">     loader/ProgressTracker.h
</span><span class="cx">     loader/ProgressTrackerClient.h
</span><ins>+    loader/ReportingEndpointsCache.h
</ins><span class="cx">     loader/ResourceCryptographicDigest.h
</span><span class="cx">     loader/ResourceLoadInfo.h
</span><span class="cx">     loader/ResourceLoadNotifier.h
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/Sources.txt (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/Sources.txt    2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/Sources.txt       2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1524,6 +1524,7 @@
</span><span class="cx"> loader/PingLoader.cpp
</span><span class="cx"> loader/PolicyChecker.cpp
</span><span class="cx"> loader/ProgressTracker.cpp
</span><ins>+loader/ReportingEndpointsCache.cpp
</ins><span class="cx"> loader/ResourceCryptographicDigest.cpp
</span><span class="cx"> loader/ResourceLoadInfo.cpp
</span><span class="cx"> loader/ResourceLoadNotifier.cpp
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1311,6 +1311,7 @@
</span><span class="cx">          46CA9C441F97BBE9004CFC3A /* VisibilityState.h in Headers */ = {isa = PBXBuildFile; fileRef = 46CA9C411F97BBE7004CFC3A /* VisibilityState.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          46D0004026A0FEB300D1BF1E /* SubmitEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 46D0003E26A0FE6F00D1BF1E /* SubmitEvent.h */; };
</span><span class="cx">          46DBB6501AB8C96F00D9A813 /* PowerObserverMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+               46DD6E1F26E7DBE7008C1F4C /* ReportingEndpointsCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DD6E1C26E7DBE6008C1F4C /* ReportingEndpointsCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">           46DD93D7269DE756001AFD88 /* BroadcastChannelIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DD93D5269DE74B001AFD88 /* BroadcastChannelIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          46DE9BB5269DF93E0024C5A6 /* BroadcastChannelRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DE9BB4269DF9320024C5A6 /* BroadcastChannelRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          46DFF4981DC2603100B80B48 /* ShadowRootMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DFF4961DC2601300B80B48 /* ShadowRootMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -8344,6 +8345,8 @@
</span><span class="cx">          46D0003E26A0FE6F00D1BF1E /* SubmitEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubmitEvent.h; sourceTree = "<group>"; };
</span><span class="cx">          46D0003F26A0FE7000D1BF1E /* SubmitEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SubmitEvent.idl; sourceTree = "<group>"; };
</span><span class="cx">          46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PowerObserverMac.h; sourceTree = "<group>"; };
</span><ins>+               46DD6E1C26E7DBE6008C1F4C /* ReportingEndpointsCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportingEndpointsCache.h; sourceTree = "<group>"; };
+               46DD6E1E26E7DBE7008C1F4C /* ReportingEndpointsCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReportingEndpointsCache.cpp; sourceTree = "<group>"; };
</ins><span class="cx">           46DD93D5269DE74B001AFD88 /* BroadcastChannelIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BroadcastChannelIdentifier.h; sourceTree = "<group>"; };
</span><span class="cx">          46DE9BB4269DF9320024C5A6 /* BroadcastChannelRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BroadcastChannelRegistry.h; sourceTree = "<group>"; };
</span><span class="cx">          46DFF4961DC2601300B80B48 /* ShadowRootMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShadowRootMode.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -27375,6 +27378,8 @@
</span><span class="cx">                          1A2A68210B5BEDE70002A480 /* ProgressTracker.cpp */,
</span><span class="cx">                          1A2A68220B5BEDE70002A480 /* ProgressTracker.h */,
</span><span class="cx">                          1ACADD781880D91C00D8B71D /* ProgressTrackerClient.h */,
</span><ins>+                               46DD6E1E26E7DBE7008C1F4C /* ReportingEndpointsCache.cpp */,
+                               46DD6E1C26E7DBE6008C1F4C /* ReportingEndpointsCache.h */,
</ins><span class="cx">                           7C2FA60F1EA95A3200A03108 /* ResourceCryptographicDigest.cpp */,
</span><span class="cx">                          7C2FA6101EA95A3200A03108 /* ResourceCryptographicDigest.h */,
</span><span class="cx">                          93E227DE0AF589AD00D48324 /* ResourceLoader.cpp */,
</span><span class="lines">@@ -34275,6 +34280,7 @@
</span><span class="cx">                          A89CCC530F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.h in Headers */,
</span><span class="cx">                          2DF512CE1D873E47001D6780 /* ReplaceRangeWithTextCommand.h in Headers */,
</span><span class="cx">                          93309E0A099E64920056E581 /* ReplaceSelectionCommand.h in Headers */,
</span><ins>+                               46DD6E1F26E7DBE7008C1F4C /* ReportingEndpointsCache.h in Headers */,
</ins><span class="cx">                           4998AEC613F9D0EA0090B1AA /* RequestAnimationFrameCallback.h in Headers */,
</span><span class="cx">                          F55B3DD01251F12D003EF269 /* ResetInputType.h in Headers */,
</span><span class="cx">                          58B2F9F42232D45300938D63 /* ResizeObservation.h in Headers */,
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreloaderCrossOriginOpenerPolicycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/loader/CrossOriginOpenerPolicy.cpp (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/loader/CrossOriginOpenerPolicy.cpp     2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/loader/CrossOriginOpenerPolicy.cpp        2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -29,13 +29,25 @@
</span><span class="cx"> #include "CrossOriginEmbedderPolicy.h"
</span><span class="cx"> #include "HTTPHeaderNames.h"
</span><span class="cx"> #include "HTTPParsers.h"
</span><ins>+#include "PingLoader.h"
+#include "ReportingEndpointsCache.h"
</ins><span class="cx"> #include "ResourceResponse.h"
</span><span class="cx"> #include "ScriptExecutionContext.h"
</span><ins>+#include <wtf/JSONValues.h>
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-static String crossOriginOpenerPolicyToString(const CrossOriginOpenerPolicyValue& coop)
</del><ins>+// https://html.spec.whatwg.org/multipage/origin.html#sanitize-url-report
+static String sanitizeReferrerForURLReport(const URL& referrer)
</ins><span class="cx"> {
</span><ins>+    URL sanitizedReferrer = referrer;
+    sanitizedReferrer.removeCredentials();
+    sanitizedReferrer.removeFragmentIdentifier();
+    return sanitizedReferrer.string();
+}
+
+static ASCIILiteral crossOriginOpenerPolicyToString(const CrossOriginOpenerPolicyValue& coop)
+{
</ins><span class="cx">     switch (coop) {
</span><span class="cx">     case CrossOriginOpenerPolicyValue::SameOrigin:
</span><span class="cx">     case CrossOriginOpenerPolicyValue::SameOriginPlusCOEP:
</span><span class="lines">@@ -48,6 +60,21 @@
</span><span class="cx">     return "unsafe-none"_s;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static ASCIILiteral crossOriginOpenerPolicyValueToEffectivePolicyString(CrossOriginOpenerPolicyValue coop)
+{
+    switch (coop) {
+    case CrossOriginOpenerPolicyValue::SameOriginAllowPopups:
+        return "same-origin-allow-popups"_s;
+    case CrossOriginOpenerPolicyValue::SameOrigin:
+        return "same-origin"_s;
+    case CrossOriginOpenerPolicyValue::SameOriginPlusCOEP:
+        return "same-origin-plus-coep"_s;
+    case CrossOriginOpenerPolicyValue::UnsafeNone:
+        break;
+    }
+    return "unsafe-none"_s;
+}
+
</ins><span class="cx"> // https://html.spec.whatwg.org/multipage/origin.html#obtain-coop
</span><span class="cx"> CrossOriginOpenerPolicy obtainCrossOriginOpenerPolicy(const ResourceResponse& response, const ScriptExecutionContext& context)
</span><span class="cx"> {
</span><span class="lines">@@ -109,4 +136,56 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// https://www.w3.org/TR/reporting/#try-delivery
+static void sendCOOPViolationReport(Frame& frame, CrossOriginOpenerPolicy coop, COOPDisposition disposition, const URL& coopURL, const SecurityOrigin& coopOrigin, const String& userAgent, Function<void(JSON::Object&)>&& populateBody)
+{
+    auto& reportingEndpoint = disposition == COOPDisposition::Reporting ? coop.reportOnlyReportingEndpoint : coop.reportingEndpoint;
+    if (reportingEndpoint.isEmpty())
+        return;
+
+    auto reportingEndpointsCache = frame.page() ? frame.page()->reportingEndpointsCache() : nullptr;
+    if (!reportingEndpointsCache)
+        return;
+    auto endpointURL = reportingEndpointsCache->endpointURL(coopOrigin.data(), reportingEndpoint);
+    if (!endpointURL.isValid())
+        return;
+
+    auto body = JSON::Object::create();
+    body->setString("disposition"_s, disposition == COOPDisposition::Reporting ? "reporting"_s : "enforce"_s);
+    body->setString("effectivePolicy"_s, crossOriginOpenerPolicyValueToEffectivePolicyString(disposition == COOPDisposition::Reporting ? coop.reportOnlyValue : coop.value));
+    populateBody(body);
+
+    auto reportObject = JSON::Object::create();
+    reportObject->setString("type"_s, "coop"_s);
+    reportObject->setString("url"_s, coopURL.string());
+    reportObject->setString("user_agent", userAgent);
+    reportObject->setInteger("age", 0); // We currently do not delay sending the reports.
+    reportObject->setObject("body"_s, WTFMove(body));
+
+    auto reportList = JSON::Array::create();
+    reportList->pushObject(reportObject);
+
+    auto report = FormData::create(reportList->toJSONString().utf8());
+    PingLoader::sendViolationReport(frame, endpointURL, WTFMove(report), ViolationReportType::StandardReportingAPIViolation);
+}
+
+// https://html.spec.whatwg.org/multipage/origin.html#coop-violation-navigation-to
+void sendViolationReportWhenNavigatingToCOOPResponse(Frame& frame, CrossOriginOpenerPolicy coop, COOPDisposition disposition, const URL& coopURL, const URL& previousResponseURL, const SecurityOrigin& coopOrigin, const SecurityOrigin& previousResponseOrigin, const String& referrer, const String& userAgent)
+{
+    sendCOOPViolationReport(frame, coop, disposition, coopURL, coopOrigin, userAgent, [&](auto& body) {
+        body.setString("previousResponseURL"_s, coopOrigin.isSameOriginAs(previousResponseOrigin) ? sanitizeReferrerForURLReport(previousResponseURL) : String());
+        body.setString("type"_s, "navigation-to-response"_s);
+        body.setString("referrer"_s, referrer);
+    });
+}
+
+// https://html.spec.whatwg.org/multipage/origin.html#coop-violation-navigation-from
+void sendViolationReportWhenNavigatingAwayFromCOOPResponse(Frame& frame, CrossOriginOpenerPolicy coop, COOPDisposition disposition, const URL& coopURL, const URL& nextResponseURL, const SecurityOrigin& coopOrigin, const SecurityOrigin& nextResponseOrigin, bool isCOOPResponseNavigationSource, const String& userAgent)
+{
+    sendCOOPViolationReport(frame, coop, disposition, coopURL, coopOrigin, userAgent, [&](auto& body) {
+        body.setString("nextResponseURL"_s, coopOrigin.isSameOriginAs(nextResponseOrigin) || isCOOPResponseNavigationSource ? sanitizeReferrerForURLReport(nextResponseURL) : String());
+        body.setString("type"_s, "navigation-from-response"_s);
+    });
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreloaderCrossOriginOpenerPolicyh"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/loader/CrossOriginOpenerPolicy.h (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/loader/CrossOriginOpenerPolicy.h       2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/loader/CrossOriginOpenerPolicy.h  2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -106,8 +106,12 @@
</span><span class="cx">     bool isCurrentContextNavigationSource { true };
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum class COOPDisposition : bool { Reporting , Enforce };
+
</ins><span class="cx"> CrossOriginOpenerPolicy obtainCrossOriginOpenerPolicy(const ResourceResponse&, const ScriptExecutionContext&);
</span><span class="cx"> WEBCORE_EXPORT void addCrossOriginOpenerPolicyHeaders(ResourceResponse&, const CrossOriginOpenerPolicy&);
</span><ins>+void sendViolationReportWhenNavigatingToCOOPResponse(Frame&, CrossOriginOpenerPolicy, COOPDisposition, const URL& coopURL, const URL& previousResponseURL, const SecurityOrigin& coopOrigin, const SecurityOrigin& previousResponseOrigin, const String& referrer, const String& userAgent);
+void sendViolationReportWhenNavigatingAwayFromCOOPResponse(Frame&, CrossOriginOpenerPolicy, COOPDisposition, const URL& coopURL, const URL& nextResponseURL, const SecurityOrigin& coopOrigin, const SecurityOrigin& nextResponseOrigin, bool isCOOPResponseNavigationSource, const String& userAgent);
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreloaderDocumentLoadercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/loader/DocumentLoader.cpp (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/loader/DocumentLoader.cpp      2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/loader/DocumentLoader.cpp 2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx"> #include "PolicyChecker.h"
</span><span class="cx"> #include "ProgressTracker.h"
</span><span class="cx"> #include "Quirks.h"
</span><ins>+#include "ReportingEndpointsCache.h"
</ins><span class="cx"> #include "ResourceHandle.h"
</span><span class="cx"> #include "ResourceLoadObserver.h"
</span><span class="cx"> #include "RuntimeEnabledFeatures.h"
</span><span class="lines">@@ -631,6 +632,11 @@
</span><span class="cx">         DOCUMENTLOADER_RELEASE_LOG("willSendRequest: With no provisional document loader");
</span><span class="cx"> 
</span><span class="cx">     bool didReceiveRedirectResponse = !redirectResponse.isNull();
</span><ins>+    if (didReceiveRedirectResponse && m_frame->isMainFrame()) {
+        if (auto reportingEndpointsCache = m_frame->page() ? m_frame->page()->reportingEndpointsCache() : nullptr)
+            reportingEndpointsCache->addEndPointsFromResponse(redirectResponse);
+    }
+
</ins><span class="cx">     if (!frameLoader()->checkIfFormActionAllowedByCSP(newRequest.url(), didReceiveRedirectResponse)) {
</span><span class="cx">         DOCUMENTLOADER_RELEASE_LOG("willSendRequest: canceling - form action not allowed by CSP");
</span><span class="cx">         cancelMainResourceLoad(frameLoader()->cancelledError(newRequest));
</span><span class="lines">@@ -758,6 +764,21 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// https://html.spec.whatwg.org/multipage/origin.html#check-bcg-switch-navigation-report-only
+static bool checkIfEnforcingReportOnlyCOOPWouldRequireBrowsingContextGroupSwitch(bool isInitialAboutBlank, const CrossOriginOpenerPolicy& activeDocumentCOOP, const SecurityOrigin& activeDocumentNavigationOrigin, const CrossOriginOpenerPolicy& responseCOOP, const SecurityOrigin& responseOrigin)
+{
+    if (!checkIfCOOPValuesRequireBrowsingContextGroupSwitch(isInitialAboutBlank, activeDocumentCOOP.reportOnlyValue, activeDocumentNavigationOrigin, responseCOOP.reportOnlyValue, responseOrigin))
+        return false;
+
+    if (checkIfCOOPValuesRequireBrowsingContextGroupSwitch(isInitialAboutBlank, activeDocumentCOOP.reportOnlyValue, activeDocumentNavigationOrigin, responseCOOP.value, responseOrigin))
+        return true;
+
+    if (checkIfCOOPValuesRequireBrowsingContextGroupSwitch(isInitialAboutBlank, activeDocumentCOOP.value, activeDocumentNavigationOrigin, responseCOOP.reportOnlyValue, responseOrigin))
+        return true;
+
+    return false;
+}
+
</ins><span class="cx"> static std::tuple<Ref<SecurityOrigin>, CrossOriginOpenerPolicy> computeResponseOriginAndCOOP(const ResourceResponse& response, const Document& document, const std::optional<NavigationAction::Requester>& requester)
</span><span class="cx"> {
</span><span class="cx">     // Non-initial empty documents (about:blank) should inherit their cross-origin-opener-policy from the navigation's initiator top level document,
</span><span class="lines">@@ -810,6 +831,12 @@
</span><span class="cx">             m_frame->document()->crossOriginOpenerPolicy(),
</span><span class="cx">             currentContextIsSource,
</span><span class="cx">         };
</span><ins>+        if (SecurityPolicy::shouldInheritSecurityOriginFromOwner(m_frame->document()->url())) {
+            if (auto openerFrame = m_frame->loader().opener()) {
+                if (auto openerDocument = openerFrame->document())
+                    m_currentCoopEnforcementResult->url = openerDocument->url();
+            }
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     CrossOriginOpenerPolicyEnforcementResult newCOOPEnforcementResult = {
</span><span class="lines">@@ -821,9 +848,26 @@
</span><span class="cx">         true
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    if (checkIfCOOPValuesRequireBrowsingContextGroupSwitch(frameLoader()->stateMachine().isDisplayingInitialEmptyDocument(), m_currentCoopEnforcementResult->crossOriginOpenerPolicy.value, m_currentCoopEnforcementResult->currentOrigin, responseCOOP.value, responseOrigin))
</del><ins>+    if (checkIfCOOPValuesRequireBrowsingContextGroupSwitch(frameLoader()->stateMachine().isDisplayingInitialEmptyDocument(), m_currentCoopEnforcementResult->crossOriginOpenerPolicy.value, m_currentCoopEnforcementResult->currentOrigin, responseCOOP.value, responseOrigin)) {
</ins><span class="cx">         newCOOPEnforcementResult.needsBrowsingContextGroupSwitch = true;
</span><span class="cx"> 
</span><ins>+        // FIXME: Add the concept of browsing context group like in the specification instead of treating the whole process as a group.
+        if (Page::nonUtilityPageCount() > 1) {
+            sendViolationReportWhenNavigatingToCOOPResponse(*m_frame, responseCOOP, COOPDisposition::Enforce, responseURL, m_currentCoopEnforcementResult->url, responseOrigin, m_currentCoopEnforcementResult->currentOrigin, m_request.httpReferrer(), m_request.httpUserAgent());
+            sendViolationReportWhenNavigatingAwayFromCOOPResponse(*m_frame, m_currentCoopEnforcementResult->crossOriginOpenerPolicy, COOPDisposition::Enforce, m_currentCoopEnforcementResult->url, responseURL, m_currentCoopEnforcementResult->currentOrigin, responseOrigin, m_currentCoopEnforcementResult->isCurrentContextNavigationSource, m_request.httpUserAgent());
+        }
+    }
+
+    if (checkIfEnforcingReportOnlyCOOPWouldRequireBrowsingContextGroupSwitch(frameLoader()->stateMachine().isDisplayingInitialEmptyDocument(), m_currentCoopEnforcementResult->crossOriginOpenerPolicy, m_currentCoopEnforcementResult->currentOrigin, responseCOOP, responseOrigin)) {
+        newCOOPEnforcementResult.needsBrowsingContextGroupSwitchDueToReportOnly = true;
+
+        // FIXME: Add the concept of browsing context group like in the specification instead of treating the whole process as a group.
+        if (Page::nonUtilityPageCount() > 1) {
+            sendViolationReportWhenNavigatingToCOOPResponse(*m_frame, responseCOOP, COOPDisposition::Reporting, responseURL, m_currentCoopEnforcementResult->url, responseOrigin, m_currentCoopEnforcementResult->currentOrigin, m_request.httpReferrer(), m_request.httpUserAgent());
+            sendViolationReportWhenNavigatingAwayFromCOOPResponse(*m_frame, m_currentCoopEnforcementResult->crossOriginOpenerPolicy, COOPDisposition::Reporting, m_currentCoopEnforcementResult->url, responseURL, m_currentCoopEnforcementResult->currentOrigin, responseOrigin, m_currentCoopEnforcementResult->isCurrentContextNavigationSource, m_request.httpUserAgent());
+        }
+    }
+
</ins><span class="cx">     return newCOOPEnforcementResult;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -984,6 +1028,11 @@
</span><span class="cx">     if (willLoadFallback)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    if (m_frame->isMainFrame()) {
+        if (auto reportingEndpointsCache = m_frame->page() ? m_frame->page()->reportingEndpointsCache() : nullptr)
+            reportingEndpointsCache->addEndPointsFromResponse(response);
+    }
+
</ins><span class="cx">     ASSERT(m_identifierForLoadWithoutResourceLoader || m_mainResource);
</span><span class="cx">     unsigned long identifier = m_identifierForLoadWithoutResourceLoader ? m_identifierForLoadWithoutResourceLoader : m_mainResource->identifier();
</span><span class="cx">     ASSERT(identifier);
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreloaderPingLoadercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/loader/PingLoader.cpp (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/loader/PingLoader.cpp  2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/loader/PingLoader.cpp     2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -174,6 +174,9 @@
</span><span class="cx">     case ViolationReportType::XSSAuditor:
</span><span class="cx">         request.setHTTPContentType("application/json"_s);
</span><span class="cx">         break;
</span><ins>+    case ViolationReportType::StandardReportingAPIViolation:
+        request.setHTTPContentType("application/reports+json"_s);
+        break;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool removeCookies = true;
</span><span class="lines">@@ -184,16 +187,17 @@
</span><span class="cx"> 
</span><span class="cx">     HTTPHeaderMap originalRequestHeader = request.httpHeaderFields();
</span><span class="cx"> 
</span><del>-    frame.loader().updateRequestAndAddExtraFields(request, IsMainResource::No);
</del><ins>+    if (reportType != ViolationReportType::StandardReportingAPIViolation)
+        frame.loader().updateRequestAndAddExtraFields(request, IsMainResource::No);
</ins><span class="cx"> 
</span><span class="cx">     String referrer = SecurityPolicy::generateReferrerHeader(document.referrerPolicy(), reportURL, frame.loader().outgoingReferrer());
</span><span class="cx">     if (!referrer.isEmpty())
</span><span class="cx">         request.setHTTPReferrer(referrer);
</span><span class="cx"> 
</span><del>-    startPingLoad(frame, request, WTFMove(originalRequestHeader), ShouldFollowRedirects::No, ContentSecurityPolicyImposition::SkipPolicyCheck, ReferrerPolicy::EmptyString);
</del><ins>+    startPingLoad(frame, request, WTFMove(originalRequestHeader), ShouldFollowRedirects::No, ContentSecurityPolicyImposition::SkipPolicyCheck, ReferrerPolicy::EmptyString, reportType);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void PingLoader::startPingLoad(Frame& frame, ResourceRequest& request, HTTPHeaderMap&& originalRequestHeaders, ShouldFollowRedirects shouldFollowRedirects, ContentSecurityPolicyImposition policyCheck, ReferrerPolicy referrerPolicy)
</del><ins>+void PingLoader::startPingLoad(Frame& frame, ResourceRequest& request, HTTPHeaderMap&& originalRequestHeaders, ShouldFollowRedirects shouldFollowRedirects, ContentSecurityPolicyImposition policyCheck, ReferrerPolicy referrerPolicy, std::optional<ViolationReportType> violationReportType)
</ins><span class="cx"> {
</span><span class="cx">     unsigned long identifier = frame.page()->progress().createUniqueIdentifier();
</span><span class="cx">     // FIXME: Why activeDocumentLoader? I would have expected documentLoader().
</span><span class="lines">@@ -211,6 +215,14 @@
</span><span class="cx">     options.sendLoadCallbacks = SendCallbackPolicy::SendCallbacks;
</span><span class="cx">     options.cache = FetchOptions::Cache::NoCache;
</span><span class="cx"> 
</span><ins>+    // https://www.w3.org/TR/reporting/#try-delivery
+    if (violationReportType == ViolationReportType::StandardReportingAPIViolation) {
+        options.credentials = FetchOptions::Credentials::SameOrigin;
+        options.mode = FetchOptions::Mode::Cors;
+        options.serviceWorkersMode = ServiceWorkersMode::None;
+        options.destination = FetchOptions::Destination::Report;
+    }
+
</ins><span class="cx">     // FIXME: Deprecate the ping load code path.
</span><span class="cx">     if (platformStrategies()->loaderStrategy()->usePingLoad()) {
</span><span class="cx">         InspectorInstrumentation::willSendRequestOfType(&frame, identifier, frame.loader().activeDocumentLoader(), request, InspectorInstrumentation::LoadType::Ping);
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreloaderPingLoaderh"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/loader/PingLoader.h (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/loader/PingLoader.h    2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/loader/PingLoader.h       2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -43,9 +43,10 @@
</span><span class="cx"> class HTTPHeaderMap;
</span><span class="cx"> class ResourceRequest;
</span><span class="cx"> 
</span><del>-enum class ViolationReportType {
</del><ins>+enum class ViolationReportType : uint8_t {
</ins><span class="cx">     ContentSecurityPolicy,
</span><span class="cx">     XSSAuditor,
</span><ins>+    StandardReportingAPIViolation // https://www.w3.org/TR/reporting/#try-delivery
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> enum class ContentSecurityPolicyImposition : uint8_t;
</span><span class="lines">@@ -58,7 +59,7 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     enum class ShouldFollowRedirects { No, Yes };
</span><del>-    static void startPingLoad(Frame&, ResourceRequest&, HTTPHeaderMap&& originalRequestHeaders, ShouldFollowRedirects, ContentSecurityPolicyImposition, ReferrerPolicy);
</del><ins>+    static void startPingLoad(Frame&, ResourceRequest&, HTTPHeaderMap&& originalRequestHeaders, ShouldFollowRedirects, ContentSecurityPolicyImposition, ReferrerPolicy, std::optional<ViolationReportType> = std::nullopt);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreloaderReportingEndpointsCachecpp"></a>
<div class="addfile"><h4>Added: branches/safari-612-branch/Source/WebCore/loader/ReportingEndpointsCache.cpp (0 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/loader/ReportingEndpointsCache.cpp                             (rev 0)
+++ branches/safari-612-branch/Source/WebCore/loader/ReportingEndpointsCache.cpp        2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -0,0 +1,177 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ReportingEndpointsCache.h"
+
+#include "HTTPHeaderNames.h"
+#include "ResourceResponse.h"
+#include "SecurityOrigin.h"
+#include <wtf/JSONValues.h>
+
+namespace WebCore {
+
+struct ReportingEndpointsCache::Endpoint {
+    Endpoint() = default;
+    Endpoint(URL&&, Seconds maxAge);
+
+    bool hasExpired() const;
+
+    URL url;
+    MonotonicTime addTime;
+    Seconds maxAge;
+};
+
+ReportingEndpointsCache::Endpoint::Endpoint(URL&& url, Seconds maxAge)
+    : url(WTFMove(url))
+    , addTime(MonotonicTime::now())
+    , maxAge(maxAge)
+{
+}
+
+bool ReportingEndpointsCache::Endpoint::hasExpired() const
+{
+    return MonotonicTime::now() - addTime > maxAge;
+}
+
+Ref<ReportingEndpointsCache> ReportingEndpointsCache::create()
+{
+    return adoptRef(*new ReportingEndpointsCache);
+}
+
+ReportingEndpointsCache::ReportingEndpointsCache() = default;
+ReportingEndpointsCache::~ReportingEndpointsCache() = default;
+
+// https://www.w3.org/TR/reporting/#process-header
+void ReportingEndpointsCache::addEndPointsFromResponse(const ResourceResponse& response)
+{
+    auto reportToHeaderValue = response.httpHeaderField(HTTPHeaderName::ReportTo);
+    if (reportToHeaderValue.isEmpty())
+        return;
+
+    auto securityOrigin = SecurityOrigin::create(response.url());
+    if (securityOrigin->isUnique() || !securityOrigin->isPotentiallyTrustworthy())
+        return;
+
+    auto findNextTopLevelComma = [&reportToHeaderValue](size_t startIndex) {
+        unsigned depth = 0;
+        for (size_t i = startIndex; i < reportToHeaderValue.length(); ++i) {
+            auto c = reportToHeaderValue[i];
+            if (c == '{')
+                ++depth;
+            else if (c == '}') {
+                if (!depth)
+                    break;
+                --depth;
+            } else if (c == ',' && !depth)
+                return i;
+        }
+        return notFound;
+    };
+    size_t dictionaryStart = 0;
+    while (dictionaryStart < reportToHeaderValue.length()) {
+        auto indexOfNextTopLevelComma = findNextTopLevelComma(dictionaryStart);
+        if (indexOfNextTopLevelComma == notFound) {
+            addEndpointFromDictionary(securityOrigin->data(), response.url(), reportToHeaderValue.substring(dictionaryStart));
+            break;
+        }
+        addEndpointFromDictionary(securityOrigin->data(), response.url(), reportToHeaderValue.substring(dictionaryStart, indexOfNextTopLevelComma - dictionaryStart));
+        dictionaryStart = indexOfNextTopLevelComma + 1;
+    }
+}
+
+// https://www.w3.org/TR/reporting/#process-header
+void ReportingEndpointsCache::addEndpointFromDictionary(const SecurityOriginData& securityOrigin, const URL& responseURL, StringView dictionaryString)
+{
+    auto json = JSON::Value::parseJSON(dictionaryString.toStringWithoutCopying());
+    if (!json)
+        return;
+
+    auto jsonDictionary = json->asObject();
+    if (!jsonDictionary)
+        return;
+
+    auto group = jsonDictionary->getString("group"_s);
+    if (group.isEmpty())
+        group = "default"_s;
+
+    auto maxAge = jsonDictionary->getInteger("max_age");
+    if (!maxAge || *maxAge < 0)
+        return;
+
+    if (!*maxAge) {
+        // A value of 0 indicates we should remove the group from the cache.
+        auto it = m_endpointsPerOrigin.find(securityOrigin);
+        if (it == m_endpointsPerOrigin.end())
+            return;
+        it->value.remove(group);
+        if (it->value.isEmpty())
+            m_endpointsPerOrigin.remove(it);
+        return;
+    }
+
+    auto endpoints = jsonDictionary->getArray("endpoints"_s);
+    if (!endpoints || !endpoints->length())
+        return;
+
+    for (size_t i = 0; i < endpoints->length(); ++i) {
+        auto endpoint = endpoints->get(i)->asObject();
+        if (!endpoint)
+            continue;
+
+        auto endpointURLString = endpoint->getString("url"_s);
+        if (endpointURLString.isEmpty())
+            continue;
+
+        auto endpointURL = URL(responseURL, endpointURLString);
+        if (!endpointURL.isValid())
+            continue;
+
+        auto& endpointsForOrigin = m_endpointsPerOrigin.ensure(securityOrigin, [] {
+            return HashMap<String, Endpoint> { };
+        }).iterator->value;
+        endpointsForOrigin.add(WTFMove(group), Endpoint(WTFMove(endpointURL), Seconds { static_cast<double>(*maxAge) }));
+    }
+}
+
+URL ReportingEndpointsCache::endpointURL(const SecurityOriginData& origin, const String& group) const
+{
+    auto outerIterator = m_endpointsPerOrigin.find(origin);
+    if (outerIterator == m_endpointsPerOrigin.end())
+        return { };
+    auto& endpointsForOrigin = outerIterator->value;
+    auto innerIterator = endpointsForOrigin.find(group);
+    if (innerIterator == endpointsForOrigin.end())
+        return { };
+    if (innerIterator->value.hasExpired()) {
+        endpointsForOrigin.remove(innerIterator);
+        if (endpointsForOrigin.isEmpty())
+            m_endpointsPerOrigin.remove(outerIterator);
+        return { };
+    }
+    return innerIterator->value.url;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="branchessafari612branchSourceWebCoreloaderReportingEndpointsCacheh"></a>
<div class="addfile"><h4>Added: branches/safari-612-branch/Source/WebCore/loader/ReportingEndpointsCache.h (0 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/loader/ReportingEndpointsCache.h                               (rev 0)
+++ branches/safari-612-branch/Source/WebCore/loader/ReportingEndpointsCache.h  2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SecurityOriginData.h"
+#include <wtf/HashMap.h>
+#include <wtf/MonotonicTime.h>
+#include <wtf/RefCounted.h>
+#include <wtf/URLHash.h>
+
+namespace WebCore {
+
+class ResourceResponse;
+
+// https://www.w3.org/TR/reporting/#concept-storage
+class ReportingEndpointsCache : public RefCounted<ReportingEndpointsCache> {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    WEBCORE_EXPORT static Ref<ReportingEndpointsCache> create();
+    WEBCORE_EXPORT ~ReportingEndpointsCache();
+
+    void addEndPointsFromResponse(const ResourceResponse&);
+    URL endpointURL(const SecurityOriginData&, const String& group) const;
+
+private:
+    ReportingEndpointsCache();
+    void addEndpointFromDictionary(const SecurityOriginData&, const URL& responseURL, StringView);
+
+    struct Endpoint;
+    mutable HashMap<SecurityOriginData, HashMap<String, Endpoint>> m_endpointsPerOrigin;
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="branchessafari612branchSourceWebCoreloaderWorkerThreadableLoadercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/loader/WorkerThreadableLoader.cpp (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/loader/WorkerThreadableLoader.cpp      2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/loader/WorkerThreadableLoader.cpp 2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> #include "ServiceWorker.h"
</span><span class="cx"> #include "ServiceWorkerGlobalScope.h"
</span><span class="cx"> #include "ThreadableLoader.h"
</span><ins>+#include "WorkerGlobalScope.h"
</ins><span class="cx"> #include "WorkerLoaderProxy.h"
</span><span class="cx"> #include "WorkerOrWorkletGlobalScope.h"
</span><span class="cx"> #include "WorkerThread.h"
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreloadercacheCachedResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/loader/cache/CachedResourceLoader.cpp (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/loader/cache/CachedResourceLoader.cpp  2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/loader/cache/CachedResourceLoader.cpp     2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -358,7 +358,7 @@
</span><span class="cx"> 
</span><span class="cx"> ResourceErrorOr<CachedResourceHandle<CachedRawResource>> CachedResourceLoader::requestPingResource(CachedResourceRequest&& request)
</span><span class="cx"> {
</span><del>-    ASSERT(request.options().destination == FetchOptions::Destination::EmptyString);
</del><ins>+    ASSERT(request.options().destination == FetchOptions::Destination::EmptyString || request.options().destination == FetchOptions::Destination::Report);
</ins><span class="cx">     return castCachedResourceTo<CachedRawResource>(requestResource(CachedResource::Type::Ping, WTFMove(request)));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/page/Page.cpp (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/page/Page.cpp  2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/page/Page.cpp     2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -116,6 +116,7 @@
</span><span class="cx"> #include "RenderView.h"
</span><span class="cx"> #include "RenderWidget.h"
</span><span class="cx"> #include "RenderingUpdateScheduler.h"
</span><ins>+#include "ReportingEndpointsCache.h"
</ins><span class="cx"> #include "ResizeObserver.h"
</span><span class="cx"> #include "ResourceUsageOverlay.h"
</span><span class="cx"> #include "RuntimeEnabledFeatures.h"
</span><span class="lines">@@ -325,6 +326,7 @@
</span><span class="cx">     , m_loadsSubresources(pageConfiguration.loadsSubresources)
</span><span class="cx">     , m_shouldRelaxThirdPartyCookieBlocking(pageConfiguration.shouldRelaxThirdPartyCookieBlocking)
</span><span class="cx">     , m_httpsUpgradeEnabled(pageConfiguration.httpsUpgradeEnabled)
</span><ins>+    , m_reportingEndpointsCache(WTFMove(pageConfiguration.reportingEndpointsCache))
</ins><span class="cx"> {
</span><span class="cx">     updateTimerThrottlingState();
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/page/Page.h (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/page/Page.h    2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/page/Page.h       2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -138,6 +138,7 @@
</span><span class="cx"> class PointerLockController;
</span><span class="cx"> class ProgressTracker;
</span><span class="cx"> class RenderObject;
</span><ins>+class ReportingEndpointsCache;
</ins><span class="cx"> class ResourceUsageOverlay;
</span><span class="cx"> class RenderingUpdateScheduler;
</span><span class="cx"> class ScrollLatchingController;
</span><span class="lines">@@ -304,6 +305,8 @@
</span><span class="cx">     void remoteInspectorInformationDidChange() const;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    ReportingEndpointsCache* reportingEndpointsCache() { return m_reportingEndpointsCache.get(); }
+
</ins><span class="cx">     Chrome& chrome() const { return *m_chrome; }
</span><span class="cx">     DragCaretController& dragCaretController() const { return *m_dragCaretController; }
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="lines">@@ -1194,6 +1197,8 @@
</span><span class="cx">     const bool m_httpsUpgradeEnabled { true };
</span><span class="cx">     mutable MediaSessionGroupIdentifier m_mediaSessionGroupIdentifier;
</span><span class="cx"> 
</span><ins>+    RefPtr<ReportingEndpointsCache> m_reportingEndpointsCache;
+
</ins><span class="cx"> #if ENABLE(IMAGE_ANALYSIS)
</span><span class="cx">     // FIXME: These should be refactored to use a weak hash map of HTMLElement to std::pair<TextRecognitionResult, IntSize>.
</span><span class="cx">     Vector<std::pair<WeakPtr<HTMLElement>, std::pair<TextRecognitionResult, IntRect>>> m_textRecognitionResultsByElement;
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCorepagePageConfigurationcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/page/PageConfiguration.cpp (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/page/PageConfiguration.cpp     2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/page/PageConfiguration.cpp        2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #include "PerformanceLoggingClient.h"
</span><span class="cx"> #include "PluginInfoProvider.h"
</span><span class="cx"> #include "ProgressTrackerClient.h"
</span><ins>+#include "ReportingEndpointsCache.h"
</ins><span class="cx"> #include "SocketProvider.h"
</span><span class="cx"> #include "SpeechRecognitionProvider.h"
</span><span class="cx"> #include "SpeechSynthesisClient.h"
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCorepagePageConfigurationh"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/page/PageConfiguration.h (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/page/PageConfiguration.h       2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/page/PageConfiguration.h  2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -61,6 +61,7 @@
</span><span class="cx"> class PerformanceLoggingClient;
</span><span class="cx"> class PluginInfoProvider;
</span><span class="cx"> class ProgressTrackerClient;
</span><ins>+class ReportingEndpointsCache;
</ins><span class="cx"> class SocketProvider;
</span><span class="cx"> class SpeechRecognitionProvider;
</span><span class="cx"> class StorageNamespaceProvider;
</span><span class="lines">@@ -131,6 +132,7 @@
</span><span class="cx">     Vector<UserContentURLPattern> corsDisablingPatterns;
</span><span class="cx">     UniqueRef<SpeechRecognitionProvider> speechRecognitionProvider;
</span><span class="cx">     UniqueRef<MediaRecorderProvider> mediaRecorderProvider;
</span><ins>+    RefPtr<ReportingEndpointsCache> reportingEndpointsCache;
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: These should be all be Settings.
</span><span class="cx">     bool loadsSubresources { true };
</span></span></pre></div>
<a id="branchessafari612branchSourceWebCoreplatformnetworkHTTPHeaderNamesin"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebCore/platform/network/HTTPHeaderNames.in (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebCore/platform/network/HTTPHeaderNames.in    2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebCore/platform/network/HTTPHeaderNames.in       2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -83,6 +83,7 @@
</span><span class="cx"> Referer
</span><span class="cx"> Referrer-Policy
</span><span class="cx"> Refresh
</span><ins>+Report-To
</ins><span class="cx"> Sec-WebSocket-Accept
</span><span class="cx"> Sec-WebSocket-Extensions
</span><span class="cx"> Sec-WebSocket-Key
</span></span></pre></div>
<a id="branchessafari612branchSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebKit/ChangeLog (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebKit/ChangeLog       2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebKit/ChangeLog  2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2021-09-10  Chris Dumez  <cdumez@apple.com>
+
+        Implement navigation reporting for Cross-Origin-Opener-Policy
+        https://bugs.webkit.org/show_bug.cgi?id=230046
+
+        Reviewed by Alex Christensen.
+
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::NetworkConnectionToWebProcess::didCleanupResourceLoader):
+        Now that we may abort expired loaders that are cached on the NetworkSession
+        (because awaiting transfer to another web process connection), we would hit
+        this assertion because the loader is not associated with this connection
+        anymore at the point it is adopted. For this reason, I silenced this
+        assertion.
+
+        * NetworkProcess/NetworkSession.cpp:
+        (WebKit::NetworkSession::CachedNetworkResourceLoader::expirationTimerFired):
+        Abort the loader before destroying it to avoid hitting an assertion in the
+        destructor (loaders cannot be loading at the point they are destroyed).
+
</ins><span class="cx"> 2021-09-02  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [COOP] Cross origin isolation doesn't happen when going from an HTTP URL to a HTTPS one with COOP+COEP
</span></span></pre></div>
<a id="branchessafari612branchSourceWebKitNetworkProcessNetworkConnectionToWebProcesscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp        2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp   2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -175,7 +175,6 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    ASSERT(m_networkResourceLoaders.get(loader.coreIdentifier()) == &loader);
</del><span class="cx">     m_networkResourceLoaders.remove(loader.coreIdentifier());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchSourceWebKitNetworkProcessNetworkSessioncpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebKit/NetworkProcess/NetworkSession.cpp (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebKit/NetworkProcess/NetworkSession.cpp       2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebKit/NetworkProcess/NetworkSession.cpp  2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -416,7 +416,9 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     auto loader = session->takeLoaderAwaitingWebProcessTransfer(m_loader->identifier());
</span><del>-    ASSERT_UNUSED(loader, loader);
</del><ins>+    ASSERT(loader);
+    if (loader)
+        loader->abort();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NetworkSession::addLoaderAwaitingWebProcessTransfer(Ref<NetworkResourceLoader>&& loader)
</span></span></pre></div>
<a id="branchessafari612branchSourceWebKitWebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp  2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp     2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -229,6 +229,7 @@
</span><span class="cx"> #include <WebCore/RenderTheme.h>
</span><span class="cx"> #include <WebCore/RenderTreeAsText.h>
</span><span class="cx"> #include <WebCore/RenderView.h>
</span><ins>+#include <WebCore/ReportingEndpointsCache.h>
</ins><span class="cx"> #include <WebCore/ResourceLoadStatistics.h>
</span><span class="cx"> #include <WebCore/ResourceRequest.h>
</span><span class="cx"> #include <WebCore/ResourceResponse.h>
</span><span class="lines">@@ -603,6 +604,7 @@
</span><span class="cx">     pageConfiguration.pluginInfoProvider = &WebPluginInfoProvider::singleton();
</span><span class="cx">     pageConfiguration.storageNamespaceProvider = WebStorageNamespaceProvider::getOrCreate(*m_pageGroup);
</span><span class="cx">     pageConfiguration.visitedLinkStore = VisitedLinkTableController::getOrCreate(parameters.visitedLinkTableID);
</span><ins>+    pageConfiguration.reportingEndpointsCache = &WebProcess::singleton().reportingEndpointsCache();
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx">     pageConfiguration.paymentCoordinatorClient = new WebPaymentCoordinator(*this);
</span></span></pre></div>
<a id="branchessafari612branchSourceWebKitWebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebKit/WebProcess/WebProcess.cpp (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebKit/WebProcess/WebProcess.cpp       2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebKit/WebProcess/WebProcess.cpp  2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -126,6 +126,7 @@
</span><span class="cx"> #include <WebCore/ProcessWarming.h>
</span><span class="cx"> #include <WebCore/RegistrableDomain.h>
</span><span class="cx"> #include <WebCore/RemoteCommandListener.h>
</span><ins>+#include <WebCore/ReportingEndpointsCache.h>
</ins><span class="cx"> #include <WebCore/ResourceLoadStatistics.h>
</span><span class="cx"> #include <WebCore/RuntimeApplicationChecks.h>
</span><span class="cx"> #include <WebCore/RuntimeEnabledFeatures.h>
</span><span class="lines">@@ -274,6 +275,7 @@
</span><span class="cx">     , m_cacheStorageProvider(WebCacheStorageProvider::create())
</span><span class="cx">     , m_broadcastChannelRegistry(WebBroadcastChannelRegistry::create())
</span><span class="cx">     , m_cookieJar(WebCookieJar::create())
</span><ins>+    , m_reportingEndpointsCache(ReportingEndpointsCache::create())
</ins><span class="cx">     , m_dnsPrefetchHystereris([this](PAL::HysteresisState state) { if (state == PAL::HysteresisState::Stopped) m_dnsPrefetchedHosts.clear(); })
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx">     , m_pluginProcessConnectionManager(PluginProcessConnectionManager::create())
</span></span></pre></div>
<a id="branchessafari612branchSourceWebKitWebProcessWebProcessh"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/WebKit/WebProcess/WebProcess.h (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/WebKit/WebProcess/WebProcess.h 2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Source/WebKit/WebProcess/WebProcess.h    2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -93,6 +93,7 @@
</span><span class="cx"> class CertificateInfo;
</span><span class="cx"> class PageGroup;
</span><span class="cx"> class RegistrableDomain;
</span><ins>+class ReportingEndpointsCache;
</ins><span class="cx"> class ResourceRequest;
</span><span class="cx"> class UserGestureToken;
</span><span class="cx"> 
</span><span class="lines">@@ -339,6 +340,7 @@
</span><span class="cx">     WebBroadcastChannelRegistry& broadcastChannelRegistry() { return m_broadcastChannelRegistry.get(); }
</span><span class="cx">     WebCookieJar& cookieJar() { return m_cookieJar.get(); }
</span><span class="cx">     WebSocketChannelManager& webSocketChannelManager() { return m_webSocketChannelManager; }
</span><ins>+    WebCore::ReportingEndpointsCache& reportingEndpointsCache() { return m_reportingEndpointsCache.get(); }
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
</span><span class="cx">     float backlightLevel() const { return m_backlightLevel; }
</span><span class="lines">@@ -661,6 +663,7 @@
</span><span class="cx">     Ref<WebCacheStorageProvider> m_cacheStorageProvider;
</span><span class="cx">     Ref<WebBroadcastChannelRegistry> m_broadcastChannelRegistry;
</span><span class="cx">     Ref<WebCookieJar> m_cookieJar;
</span><ins>+    Ref<WebCore::ReportingEndpointsCache> m_reportingEndpointsCache;
</ins><span class="cx">     WebSocketChannelManager m_webSocketChannelManager;
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr<LibWebRTCNetwork> m_libWebRTCNetwork;
</span></span></pre></div>
<a id="branchessafari612branchToolsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Tools/ChangeLog (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Tools/ChangeLog       2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Tools/ChangeLog  2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2021-09-10  Chris Dumez  <cdumez@apple.com>
+
+        Implement navigation reporting for Cross-Origin-Opener-Policy
+        https://bugs.webkit.org/show_bug.cgi?id=230046
+
+        Reviewed by Alex Christensen.
+
+        Fix issue where [DumpJSConsoleLogInStdErr] was not working for tests that process-swap
+        due to COOP. Some data members on InjectedBundle such as m_dumpJSConsoleLogInStdErr
+        were only set in didReceiveMessageToPage(), before calling beginTesting(). However, in
+        case of process-swap, beginTesting() gets called a second time in the new process, from
+        InjectedBundle::didCreatePage() with BegingTestingMode::Resume. As a result, the
+        m_dumpJSConsoleLogInStdErr flag was not getting set in the new process' injected bundle
+        after a process-swap. To address the issue, those data members now get initialized in
+        beginTesting() instead.
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::didReceiveMessageToPage):
+        (WTR::InjectedBundle::beginTesting):
+
</ins><span class="cx"> 2021-08-31  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Enable SharedArrayBuffer support when COOP/COEP headers are used
</span></span></pre></div>
<a id="branchessafari612branchToolsWebKitTestRunnerInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (283919 => 283920)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp      2021-10-11 19:03:22 UTC (rev 283919)
+++ branches/safari-612-branch/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp 2021-10-11 19:14:52 UTC (rev 283920)
</span><span class="lines">@@ -192,9 +192,6 @@
</span><span class="cx">     if (WKStringIsEqualToUTF8CString(messageName, "BeginTest")) {
</span><span class="cx">         ASSERT(messageBody);
</span><span class="cx">         auto messageBodyDictionary = dictionaryValue(messageBody);
</span><del>-        m_dumpPixels = booleanValue(messageBodyDictionary, "DumpPixels");
-        m_timeout = Seconds::fromMilliseconds(uint64Value(messageBodyDictionary, "Timeout"));
-        m_dumpJSConsoleLogInStdErr = booleanValue(messageBodyDictionary, "DumpJSConsoleLogInStdErr");
</del><span class="cx">         WKBundlePagePostMessage(page, toWK("Ack").get(), toWK("BeginTest").get());
</span><span class="cx">         beginTesting(messageBodyDictionary, BegingTestingMode::New);
</span><span class="cx">         return;
</span><span class="lines">@@ -505,6 +502,10 @@
</span><span class="cx"> {
</span><span class="cx">     m_state = Testing;
</span><span class="cx"> 
</span><ins>+    m_dumpPixels = booleanValue(settings, "DumpPixels");
+    m_timeout = Seconds::fromMilliseconds(uint64Value(settings, "Timeout"));
+    m_dumpJSConsoleLogInStdErr = booleanValue(settings, "DumpJSConsoleLogInStdErr");
+
</ins><span class="cx">     m_pixelResult.clear();
</span><span class="cx">     m_repaintRects.clear();
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>