<!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>[206769] trunk/LayoutTests</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/206769">206769</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-04 08:15:35 -0700 (Tue, 04 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[mac-wk1] LayoutTest http/tests/security/cached-cross-origin-preloading-css-stylesheet.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=162791
Patch by Youenn Fablet <youenn@apple.com> on 2016-10-04
Reviewed by Alex Christensen.
Flackiness was due to one preload sometimes arriving after the test was finished.
This causes the issue of not having the preload actually being checked against CORS and the console error was not displayed.
Making the test wait 1 second after all loads finish to ensure the preload will also finishes.
Cleaning the test and improving it by:
- making each load to take 1 second (so that preload is not finished when actual load happens
- adding some comments explaining each subtest
- printing DONE at the end of all loads.
* http/tests/security/cached-cross-origin-preloading-css-stylesheet-expected.txt:
* http/tests/security/cached-cross-origin-preloading-css-stylesheet.html:
* platform/mac-wk1/TestExpectations: Removed flaky expectation.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycachedcrossoriginpreloadingcssstylesheetexpectedtxt">trunk/LayoutTests/http/tests/security/cached-cross-origin-preloading-css-stylesheet-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycachedcrossoriginpreloadingcssstylesheethtml">trunk/LayoutTests/http/tests/security/cached-cross-origin-preloading-css-stylesheet.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1TestExpectations">trunk/LayoutTests/platform/mac-wk1/TestExpectations</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (206768 => 206769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-04 13:49:38 UTC (rev 206768)
+++ trunk/LayoutTests/ChangeLog        2016-10-04 15:15:35 UTC (rev 206769)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-10-04 Youenn Fablet <youenn@apple.com>
+
+ [mac-wk1] LayoutTest http/tests/security/cached-cross-origin-preloading-css-stylesheet.html is a flaky failure
+ https://bugs.webkit.org/show_bug.cgi?id=162791
+
+ Reviewed by Alex Christensen.
+
+ Flackiness was due to one preload sometimes arriving after the test was finished.
+ This causes the issue of not having the preload actually being checked against CORS and the console error was not displayed.
+ Making the test wait 1 second after all loads finish to ensure the preload will also finishes.
+
+ Cleaning the test and improving it by:
+ - making each load to take 1 second (so that preload is not finished when actual load happens
+ - adding some comments explaining each subtest
+ - printing DONE at the end of all loads.
+
+ * http/tests/security/cached-cross-origin-preloading-css-stylesheet-expected.txt:
+ * http/tests/security/cached-cross-origin-preloading-css-stylesheet.html:
+ * platform/mac-wk1/TestExpectations: Removed flaky expectation.
+
</ins><span class="cx"> 2016-10-03 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Implement rendering of font-variation-settings
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycachedcrossoriginpreloadingcssstylesheetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cached-cross-origin-preloading-css-stylesheet-expected.txt (206768 => 206769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cached-cross-origin-preloading-css-stylesheet-expected.txt        2016-10-04 13:49:38 UTC (rev 206768)
+++ trunk/LayoutTests/http/tests/security/cached-cross-origin-preloading-css-stylesheet-expected.txt        2016-10-04 15:15:35 UTC (rev 206769)
</span><span class="lines">@@ -1,8 +1,9 @@
</span><span class="cx"> CONSOLE MESSAGE: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.
</span><span class="cx"> CONSOLE MESSAGE: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.
</span><span class="cx">
</span><del>-PASS: did not load http://localhost:8000/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss1.css&contentType=text/css&allowCredentials (cors mode)
-PASS: loaded successfuly http://localhost:8000/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=xorigincss2.css&contentType=text/css&allowCredentials (cors mode)
-PASS: loaded successfuly http://localhost:8000/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss1.css&contentType=text/css&allowCredentials (no-cors mode)
-PASS: loaded successfuly http://localhost:8080/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=xorigincss1.css&contentType=text/css&allowCredentials (cors mode)
-PASS: loaded successfuly http://localhost:8080/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss2.css&contentType=text/css&allowCredentials (no-cors mode)
</del><ins>+PASS: did not load http://localhost:8000/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss1.css&contentType=text/css&allowCredentials (cors mode)
+PASS: loaded successfuly http://localhost:8000/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=xorigincss2.css&contentType=text/css&allowCredentials (cors mode)
+PASS: loaded successfuly http://localhost:8000/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss1.css&contentType=text/css&allowCredentials (no-cors mode)
+PASS: loaded successfuly http://localhost:8080/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=xorigincss1.css&contentType=text/css&allowCredentials (cors mode)
+PASS: loaded successfuly http://localhost:8080/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss2.css&contentType=text/css&allowCredentials (no-cors mode)
+DONE
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycachedcrossoriginpreloadingcssstylesheethtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cached-cross-origin-preloading-css-stylesheet.html (206768 => 206769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cached-cross-origin-preloading-css-stylesheet.html        2016-10-04 13:49:38 UTC (rev 206768)
+++ trunk/LayoutTests/http/tests/security/cached-cross-origin-preloading-css-stylesheet.html        2016-10-04 15:15:35 UTC (rev 206769)
</span><span class="lines">@@ -12,18 +12,14 @@
</span><span class="cx"> {
</span><span class="cx"> console.log("unexpected loading result for preload " + e);
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> </script>
</span><del>-<link rel=preload onerror="errorPreload(1)" as=style href="http://localhost:8000/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss1.css&contentType=text/css&allowCredentials">
-<link rel=preload onerror="errorPreload(2)" as=style href="http://localhost:8080/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=xorigincss1.css&contentType=text/css&allowCredentials">
-<link rel=preload onerror="errorPreload(3)" as=style crossorigin="with-credentials" href="http://localhost:8000/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=xorigincss2.css&contentType=text/css&allowCredentials"><link rel=preload onload="errorPreload(4)" as=style crossorigin="with-credentials" href="http://localhost:8080/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss2.css&contentType=text/css&allowCredentials">
-<link rel=preload onload="errorPreload(4)" as=style crossorigin="with-credentials" href="http://localhost:8080/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss2.css&contentType=text/css&allowCredentials">
</del><ins>+<link rel=preload onerror="errorPreload(1)" as=style href="http://localhost:8000/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss1.css&contentType=text/css&allowCredentials">
+<link rel=preload onerror="errorPreload(2)" as=style href="http://localhost:8080/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=xorigincss1.css&contentType=text/css&allowCredentials">
+<link rel=preload onerror="errorPreload(3)" as=style crossorigin="with-credentials" href="http://localhost:8000/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=xorigincss2.css&contentType=text/css&allowCredentials">
+<link rel=preload onload="errorPreload(4)" as=style crossorigin="with-credentials" href="http://localhost:8080/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss2.css&contentType=text/css&allowCredentials">
</ins><span class="cx"> <div id="log"></div>
</span><span class="cx"> <script>
</span><del>-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-
</del><span class="cx"> var maxResults = 5;
</span><span class="cx"> var results = [];
</span><span class="cx">
</span><span class="lines">@@ -35,9 +31,9 @@
</span><span class="cx"> results.sort();
</span><span class="cx"> for (value of results)
</span><span class="cx"> log += "<br>" + value;
</span><del>- document.getElementById('log').innerHTML = log;
</del><ins>+ document.getElementById('log').innerHTML = log + "<br>DONE";
</ins><span class="cx"> if (window.testRunner)
</span><del>- testRunner.notifyDone();
</del><ins>+ setTimeout(() => { testRunner.notifyDone(); }, 1000);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function logOnLoad(url, isCORS, expectSuccess)
</span><span class="lines">@@ -65,11 +61,16 @@
</span><span class="cx"> return link;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-document.body.appendChild(createLinkElement("http://localhost:8000/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss1.css&contentType=text/css&allowCredentials", true, false));
-document.body.appendChild(createLinkElement("http://localhost:8000/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss1.css&contentType=text/css&allowCredentials", false, true));
-document.body.appendChild(createLinkElement("http://localhost:8080/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=xorigincss1.css&contentType=text/css&allowCredentials", true, true));
-document.body.appendChild(createLinkElement("http://localhost:8000/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=xorigincss2.css&contentType=text/css&allowCredentials", true, true));
-document.body.appendChild(createLinkElement("http://localhost:8080/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss2.css&contentType=text/css&allowCredentials", false, true));
</del><ins>+// Preload 1 (no-cors) with link element (cors): should fail
+document.body.appendChild(createLinkElement("http://localhost:8000/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss1.css&contentType=text/css&allowCredentials", true, false));
+// Preload 1 (no-cors) with link element (no-cors): should succeed
+document.body.appendChild(createLinkElement("http://localhost:8000/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss1.css&contentType=text/css&allowCredentials", false, true));
+// Preload 2 (no-cors) with link element (cors): should succeed since 127.0.0.1:8000 allowed
+document.body.appendChild(createLinkElement("http://localhost:8080/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=xorigincss1.css&contentType=text/css&allowCredentials", true, true));
+// Preload 3 (cors) with link element (cors): should succeed
+document.body.appendChild(createLinkElement("http://localhost:8000/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=xorigincss2.css&contentType=text/css&allowCredentials", true, true));
+// Preload 4 (cors, preload should fail) with link element (no-cors): should succeed
+document.body.appendChild(createLinkElement("http://localhost:8080/security/resources/allow-if-origin.php?delay=1000&allowCache&origin=http%3A%2F%2Flocalhost%3A8080&name=xorigincss2.css&contentType=text/css&allowCredentials", false, true));
</ins><span class="cx"> </script>
</span><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (206768 => 206769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/TestExpectations        2016-10-04 13:49:38 UTC (rev 206768)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations        2016-10-04 15:15:35 UTC (rev 206769)
</span><span class="lines">@@ -259,6 +259,4 @@
</span><span class="cx"> webkit.org/b/162591 [ Sierra+ ] css3/filters/backdrop/backdrop-filter-with-reflection-add-backdrop.html [ Pass ImageOnlyFailure ]
</span><span class="cx"> webkit.org/b/162591 [ Sierra+ ] css3/filters/backdrop/backdrop-filter-with-reflection-value-change.html [ Pass ImageOnlyFailure ]
</span><span class="cx">
</span><del>-webkit.org/b/162791 http/tests/security/cached-cross-origin-preloading-css-stylesheet.html [ Pass Failure ]
-
</del><span class="cx"> webkit.org/b/162507 http/tests/media/hls/hls-video-resize.html [ Pass Failure ]
</span></span></pre>
</div>
</div>
</body>
</html>