<!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>[203408] trunk/LayoutTests/imported/w3c</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/203408">203408</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-07-19 09:08:56 -0700 (Tue, 19 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Refresh WPT tests up to 98ec1ad
https://bugs.webkit.org/show_bug.cgi?id=159879

Patch by Youenn Fablet &lt;youennf@gmail.com&gt; on 2016-07-19
Reviewed by Alex Christensen.

This refresh concerns fetch API tests with a number of test fixes.
Rebasing both window and worker expectations.

* resources/TestRepositories:
* web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt:
* web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt:
* web-platform-tests/fetch/api/basic/mode-same-origin-worker.html:
* web-platform-tests/fetch/api/basic/mode-same-origin.html:
* web-platform-tests/fetch/api/basic/mode-same-origin.js:
* web-platform-tests/fetch/api/cors/cors-basic-worker.html:
* web-platform-tests/fetch/api/cors/cors-basic.html:
* web-platform-tests/fetch/api/cors/cors-basic.js:
(cors):
* web-platform-tests/fetch/api/cors/cors-cookies-expected.txt:
* web-platform-tests/fetch/api/cors/cors-cookies-worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-cookies-worker.html:
* web-platform-tests/fetch/api/cors/cors-cookies.html:
* web-platform-tests/fetch/api/cors/cors-cookies.js:
(corsCookies):
* web-platform-tests/fetch/api/cors/cors-no-preflight-worker.html:
* web-platform-tests/fetch/api/cors/cors-no-preflight.html:
* web-platform-tests/fetch/api/cors/cors-no-preflight.js:
(corsNoPreflight):
* web-platform-tests/fetch/api/cors/cors-origin-worker.html:
* web-platform-tests/fetch/api/cors/cors-origin.html:
* web-platform-tests/fetch/api/cors/cors-origin.js:
(corsOrigin):
* web-platform-tests/fetch/api/cors/cors-preflight-redirect-worker.html:
* web-platform-tests/fetch/api/cors/cors-preflight-redirect.html:
* web-platform-tests/fetch/api/cors/cors-preflight-redirect.js:
* web-platform-tests/fetch/api/cors/cors-preflight-referrer-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker.html:
* web-platform-tests/fetch/api/cors/cors-preflight-referrer.html:
* web-platform-tests/fetch/api/cors/cors-preflight-referrer.js:
(corsPreflightReferrer):
* web-platform-tests/fetch/api/cors/cors-preflight-status-worker.html:
* web-platform-tests/fetch/api/cors/cors-preflight-status.html:
* web-platform-tests/fetch/api/cors/cors-preflight-status.js:
* web-platform-tests/fetch/api/cors/cors-redirect-credentials.html:
* web-platform-tests/fetch/api/cors/cors-redirect-credentials.js:
* web-platform-tests/fetch/api/cors/cors-redirect-worker.html:
* web-platform-tests/fetch/api/cors/cors-redirect.html:
* web-platform-tests/fetch/api/cors/cors-redirect.js:
* web-platform-tests/fetch/api/request/request-cache.html:
* web-platform-tests/fetch/api/request/resources/w3c-import.log:
* web-platform-tests/fetch/api/resources/get-host-info.sub.js: Added.
(get_host_info):
* web-platform-tests/fetch/api/resources/utils.js:
(validateBufferFromString):
* web-platform-tests/fetch/api/resources/w3c-import.log:
* web-platform-tests/fetch/api/response/response-clone-expected.txt:
* web-platform-tests/fetch/api/response/response-clone.html:
* web-platform-tests/fetch/api/response/response-consume-stream-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cresourcesTestRepositories">trunk/LayoutTests/imported/w3c/resources/TestRepositories</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsbasicworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsbasichtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsbasicjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorscookiesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorscookiesworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorscookiesworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorscookieshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorscookiesjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsnopreflightworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsnopreflighthtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsnopreflightjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsoriginworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsoriginhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsoriginjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightredirectworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightredirecthtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightredirectjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightreferrerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightreferrerworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightreferrerworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightreferrerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightreferrerjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightstatusworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightstatushtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightstatusjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsredirectcredentialshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-credentials.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsredirectcredentialsjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-credentials.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsredirectworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsredirecthtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsredirectjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapirequestrequestcachehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-cache.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapirequestresourcesw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/resources/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapiresourcesutilsjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/utils.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapiresourcesw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapiresponseresponsecloneexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-clone-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapiresponseresponseclonehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-clone.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapiresponseresponseconsumestreamexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-consume-stream-expected.txt</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapiresourcesgethostinfosubjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/get-host-info.sub.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -1,3 +1,65 @@
</span><ins>+2016-07-19  Youenn Fablet  &lt;youennf@gmail.com&gt;
+
+        Refresh WPT tests up to 98ec1ad
+        https://bugs.webkit.org/show_bug.cgi?id=159879
+
+        Reviewed by Alex Christensen.
+
+        This refresh concerns fetch API tests with a number of test fixes.
+        Rebasing both window and worker expectations.
+
+        * resources/TestRepositories:
+        * web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt:
+        * web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt:
+        * web-platform-tests/fetch/api/basic/mode-same-origin-worker.html:
+        * web-platform-tests/fetch/api/basic/mode-same-origin.html:
+        * web-platform-tests/fetch/api/basic/mode-same-origin.js:
+        * web-platform-tests/fetch/api/cors/cors-basic-worker.html:
+        * web-platform-tests/fetch/api/cors/cors-basic.html:
+        * web-platform-tests/fetch/api/cors/cors-basic.js:
+        (cors):
+        * web-platform-tests/fetch/api/cors/cors-cookies-expected.txt:
+        * web-platform-tests/fetch/api/cors/cors-cookies-worker-expected.txt:
+        * web-platform-tests/fetch/api/cors/cors-cookies-worker.html:
+        * web-platform-tests/fetch/api/cors/cors-cookies.html:
+        * web-platform-tests/fetch/api/cors/cors-cookies.js:
+        (corsCookies):
+        * web-platform-tests/fetch/api/cors/cors-no-preflight-worker.html:
+        * web-platform-tests/fetch/api/cors/cors-no-preflight.html:
+        * web-platform-tests/fetch/api/cors/cors-no-preflight.js:
+        (corsNoPreflight):
+        * web-platform-tests/fetch/api/cors/cors-origin-worker.html:
+        * web-platform-tests/fetch/api/cors/cors-origin.html:
+        * web-platform-tests/fetch/api/cors/cors-origin.js:
+        (corsOrigin):
+        * web-platform-tests/fetch/api/cors/cors-preflight-redirect-worker.html:
+        * web-platform-tests/fetch/api/cors/cors-preflight-redirect.html:
+        * web-platform-tests/fetch/api/cors/cors-preflight-redirect.js:
+        * web-platform-tests/fetch/api/cors/cors-preflight-referrer-expected.txt:
+        * web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker-expected.txt:
+        * web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker.html:
+        * web-platform-tests/fetch/api/cors/cors-preflight-referrer.html:
+        * web-platform-tests/fetch/api/cors/cors-preflight-referrer.js:
+        (corsPreflightReferrer):
+        * web-platform-tests/fetch/api/cors/cors-preflight-status-worker.html:
+        * web-platform-tests/fetch/api/cors/cors-preflight-status.html:
+        * web-platform-tests/fetch/api/cors/cors-preflight-status.js:
+        * web-platform-tests/fetch/api/cors/cors-redirect-credentials.html:
+        * web-platform-tests/fetch/api/cors/cors-redirect-credentials.js:
+        * web-platform-tests/fetch/api/cors/cors-redirect-worker.html:
+        * web-platform-tests/fetch/api/cors/cors-redirect.html:
+        * web-platform-tests/fetch/api/cors/cors-redirect.js:
+        * web-platform-tests/fetch/api/request/request-cache.html:
+        * web-platform-tests/fetch/api/request/resources/w3c-import.log:
+        * web-platform-tests/fetch/api/resources/get-host-info.sub.js: Added.
+        (get_host_info):
+        * web-platform-tests/fetch/api/resources/utils.js:
+        (validateBufferFromString):
+        * web-platform-tests/fetch/api/resources/w3c-import.log:
+        * web-platform-tests/fetch/api/response/response-clone-expected.txt:
+        * web-platform-tests/fetch/api/response/response-clone.html:
+        * web-platform-tests/fetch/api/response/response-consume-stream-expected.txt:
+
</ins><span class="cx"> 2016-07-19  Youenn Fablet  &lt;youenn@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Streams API] Make ReadableStream properties not enumerable
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cresourcesTestRepositories"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/resources/TestRepositories (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/resources/TestRepositories        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/resources/TestRepositories        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx">     {
</span><span class="cx">         &quot;name&quot;: &quot;web-platform-tests&quot;,
</span><span class="cx">         &quot;url&quot;: &quot;https://github.com/w3c/web-platform-tests.git&quot;, 
</span><del>-        &quot;revision&quot;: &quot;c875b42&quot;,
</del><ins>+        &quot;revision&quot;: &quot;98ec1ad&quot;,
</ins><span class="cx">         &quot;paths_to_skip&quot;: [
</span><span class="cx">             &quot;conformance-checkers&quot;,
</span><span class="cx">             &quot;docs&quot;,
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -2,5 +2,5 @@
</span><span class="cx"> PASS Fetch ../resources/top.txt with same-origin mode 
</span><span class="cx"> PASS Fetch http://localhost:8800/fetch/api/resources/top.txt with same-origin mode 
</span><span class="cx"> PASS Fetch https://localhost:9443/fetch/api/resources/top.txt with same-origin mode 
</span><del>-PASS Fetch http://www.localhost:8800/fetch/api/resources/top.txt with same-origin mode 
</del><ins>+PASS Fetch http://127.0.0.1:8800/fetch/api/resources/top.txt with same-origin mode 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -2,5 +2,5 @@
</span><span class="cx"> PASS Fetch ../resources/top.txt with same-origin mode 
</span><span class="cx"> PASS Fetch http://localhost:8800/fetch/api/resources/top.txt with same-origin mode 
</span><span class="cx"> PASS Fetch https://localhost:9443/fetch/api/resources/top.txt with same-origin mode 
</span><del>-PASS Fetch http://www.localhost:8800/fetch/api/resources/top.txt with same-origin mode 
</del><ins>+PASS Fetch http://127.0.0.1:8800/fetch/api/resources/top.txt with same-origin mode 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script&gt;
</span><del>-      fetch_tests_from_worker(new Worker(&quot;mode-same-origin.js?pipe=sub&quot;));
</del><ins>+      fetch_tests_from_worker(new Worker(&quot;mode-same-origin.js&quot;));
</ins><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -11,6 +11,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;mode-same-origin.js?pipe=sub&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../resources/get-host-info.sub.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;mode-same-origin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.js (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.js        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.js        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> if (this.document === undefined) {
</span><span class="cx">   importScripts(&quot;/resources/testharness.js&quot;);
</span><span class="cx">   importScripts(&quot;../resources/utils.js&quot;);
</span><ins>+  importScripts(&quot;../resources/get-host-info.sub.js&quot;)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function fetchSameOrigin(url, shouldPass) {
</span><span class="lines">@@ -15,10 +16,12 @@
</span><span class="cx">   }, &quot;Fetch &quot;+ url + &quot; with same-origin mode&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+var host_info = get_host_info();
+
</ins><span class="cx"> fetchSameOrigin(RESOURCES_DIR + &quot;top.txt&quot;, true);
</span><del>-fetchSameOrigin(&quot;http://{{host}}:{{ports[http][0]}}/fetch/api/resources/top.txt&quot;, true);
-fetchSameOrigin(&quot;https://{{host}}:{{ports[https][0]}}/fetch/api/resources/top.txt&quot;, false);
-fetchSameOrigin(&quot;http://{{domains[www]}}:{{ports[http][0]}}/fetch/api/resources/top.txt&quot;, false);
</del><ins>+fetchSameOrigin(host_info.HTTP_ORIGIN + &quot;/fetch/api/resources/top.txt&quot;, true);
+fetchSameOrigin(host_info.HTTPS_ORIGIN + &quot;/fetch/api/resources/top.txt&quot;, false);
+fetchSameOrigin(host_info.HTTP_REMOTE_ORIGIN + &quot;/fetch/api/resources/top.txt&quot;, false);
</ins><span class="cx"> 
</span><span class="cx"> done();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsbasicworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic-worker.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script&gt;
</span><del>-      fetch_tests_from_worker(new Worker(&quot;cors-basic.js?pipe=sub&quot;));
</del><ins>+      fetch_tests_from_worker(new Worker(&quot;cors-basic.js&quot;));
</ins><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsbasichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -13,6 +13,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;cors-basic.js?pipe=sub&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../resources/get-host-info.sub.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;cors-basic.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsbasicjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.js (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.js        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.js        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -1,17 +1,11 @@
</span><span class="cx"> if (this.document === undefined) {
</span><span class="cx">   importScripts(&quot;/resources/testharness.js&quot;);
</span><span class="cx">   importScripts(&quot;../resources/utils.js&quot;);
</span><ins>+  importScripts(&quot;../resources/get-host-info.sub.js&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function cors(desc, scheme, subdomain, port) {
-  if (!port)
-    port = location.port;
-  if (subdomain)
-    subdomain = subdomain + &quot;.&quot;;
-  else
-    subdomain = &quot;&quot;;
-
-  var url = scheme + &quot;://&quot; + subdomain + &quot;{{host}}&quot; + &quot;:&quot; + port + dirname(location.pathname);
</del><ins>+function cors(desc, origin) {
+  var url = origin + dirname(location.pathname);
</ins><span class="cx">   var urlParameters = &quot;?pipe=header(Access-Control-Allow-Origin,*)&quot;;
</span><span class="cx"> 
</span><span class="cx">   promise_test(function(test) {
</span><span class="lines">@@ -36,10 +30,12 @@
</span><span class="cx">   }, desc + &quot; [cors mode]&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-cors(&quot;Same domain different port&quot;, &quot;http&quot;, undefined, &quot;{{ports[http][1]}}&quot;);
-cors(&quot;Same domain different protocol different port&quot;, &quot;https&quot;, undefined, &quot;{{ports[https][0]}}&quot;);
-cors(&quot;Cross domain basic usage&quot;, &quot;http&quot;, &quot;www1&quot;);
-cors(&quot;Cross domain different port&quot;, &quot;http&quot;, &quot;www1&quot;, &quot;{{ports[http][1]}}&quot;);
-cors(&quot;Cross domain different protocol&quot;, &quot;https&quot;, &quot;www1&quot;, &quot;{{ports[https][0]}}&quot;);
</del><ins>+var host_info = get_host_info();
</ins><span class="cx"> 
</span><ins>+cors(&quot;Same domain different port&quot;, host_info.HTTP_ORIGIN_WITH_DIFFERENT_PORT);
+cors(&quot;Same domain different protocol different port&quot;, host_info.HTTPS_ORIGIN);
+cors(&quot;Cross domain basic usage&quot;, host_info.HTTP_REMOTE_ORIGIN);
+cors(&quot;Cross domain different port&quot;, host_info.HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT);
+cors(&quot;Cross domain different protocol&quot;, host_info.HTTPS_REMOTE_ORIGIN);
+
</ins><span class="cx"> done();
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorscookiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-expected.txt (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-expected.txt        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-expected.txt        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -3,6 +3,6 @@
</span><span class="cx"> FAIL Include mode: 1 cookie promise_test: Unhandled rejection with value: object &quot;TypeError: Type error&quot;
</span><span class="cx"> FAIL Include mode: local cookies are not sent with remote request promise_test: Unhandled rejection with value: object &quot;TypeError: Type error&quot;
</span><span class="cx"> FAIL Include mode: remote cookies are not sent with local request promise_test: Unhandled rejection with value: object &quot;TypeError: Type error&quot;
</span><ins>+FAIL Same-origin mode: cookies are discarded in cors request promise_test: Unhandled rejection with value: object &quot;TypeError: Type error&quot;
</ins><span class="cx"> FAIL Include mode: remote cookies are not sent with other remote request promise_test: Unhandled rejection with value: object &quot;TypeError: Type error&quot;
</span><del>-FAIL Same-origin mode: cookies are discarded in cors request promise_test: Unhandled rejection with value: object &quot;TypeError: Type error&quot;
</del><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorscookiesworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-worker-expected.txt (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-worker-expected.txt        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-worker-expected.txt        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -3,6 +3,6 @@
</span><span class="cx"> FAIL Include mode: 1 cookie promise_test: Unhandled rejection with value: object &quot;TypeError: Type error&quot;
</span><span class="cx"> FAIL Include mode: local cookies are not sent with remote request promise_test: Unhandled rejection with value: object &quot;TypeError: Type error&quot;
</span><span class="cx"> FAIL Include mode: remote cookies are not sent with local request promise_test: Unhandled rejection with value: object &quot;TypeError: Type error&quot;
</span><ins>+FAIL Same-origin mode: cookies are discarded in cors request promise_test: Unhandled rejection with value: object &quot;TypeError: Type error&quot;
</ins><span class="cx"> FAIL Include mode: remote cookies are not sent with other remote request promise_test: Unhandled rejection with value: object &quot;TypeError: Type error&quot;
</span><del>-FAIL Same-origin mode: cookies are discarded in cors request promise_test: Unhandled rejection with value: object &quot;TypeError: Type error&quot;
</del><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorscookiesworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-worker.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-worker.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-worker.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script&gt;
</span><del>-      fetch_tests_from_worker(new Worker(&quot;cors-cookies.js?pipe=sub&quot;));
</del><ins>+      fetch_tests_from_worker(new Worker(&quot;cors-cookies.js&quot;));
</ins><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorscookieshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -12,6 +12,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;cors-cookies.js?pipe=sub&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../resources/get-host-info.sub.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;cors-cookies.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorscookiesjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.js (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.js        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies.js        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -1,11 +1,12 @@
</span><span class="cx"> if (this.document === undefined) {
</span><span class="cx">   importScripts(&quot;/resources/testharness.js&quot;);
</span><span class="cx">   importScripts(&quot;../resources/utils.js&quot;);
</span><ins>+  importScripts(&quot;../resources/get-host-info.sub.js&quot;)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function corsCookies(desc, domain1, domain2, credentialsMode, cookies) {
-  var urlSetCookie = &quot;http://&quot; + domain1 + &quot;:{{ports[http][0]}}&quot; + dirname(location.pathname) + RESOURCES_DIR + &quot;top.txt&quot;;
-  var urlCheckCookies = &quot;http://&quot; + domain2 + &quot;:{{ports[http][0]}}&quot; + dirname(location.pathname) + RESOURCES_DIR + &quot;inspect-headers.py?cors&amp;headers=cookie&quot;;
</del><ins>+function corsCookies(desc, baseURL1, baseURL2, credentialsMode, cookies) {
+  var urlSetCookie = baseURL1 + dirname(location.pathname) + RESOURCES_DIR + &quot;top.txt&quot;;
+  var urlCheckCookies = baseURL2 + dirname(location.pathname) + RESOURCES_DIR + &quot;inspect-headers.py?cors&amp;headers=cookie&quot;;
</ins><span class="cx">   //enable cors with credentials
</span><span class="cx">   var urlParameters = &quot;?pipe=header(Access-Control-Allow-Origin,&quot; + location.origin + &quot;)&quot;;
</span><span class="cx">   urlParameters += &quot;|header(Access-Control-Allow-Credentials,true)&quot;;
</span><span class="lines">@@ -29,7 +30,7 @@
</span><span class="cx">     }).then(function(resp) {
</span><span class="cx">       assert_equals(resp.status, 200, &quot;HTTP status is 200&quot;);
</span><span class="cx">       assert_false(resp.headers.has(&quot;Cookie&quot;) , &quot;Cookie header is not exposed in response&quot;);
</span><del>-      if (credentialsMode === &quot;include&quot; &amp;&amp; domain1 === domain2) {
</del><ins>+      if (credentialsMode === &quot;include&quot; &amp;&amp; baseURL1 === baseURL2) {
</ins><span class="cx">         assert_equals(resp.headers.get(&quot;x-request-cookie&quot;) , cookies.join(&quot;; &quot;), &quot;Request includes cookie(s)&quot;);
</span><span class="cx">       }
</span><span class="cx">       else {
</span><span class="lines">@@ -44,15 +45,16 @@
</span><span class="cx">   }, desc);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-var local = &quot;{{host}}&quot;;
-var remote = &quot;www.{{host}}&quot;;
-var remote1 = &quot;www1.{{host}}&quot;;
</del><ins>+var local = get_host_info().HTTP_ORIGIN;
+var remote = get_host_info().HTTP_REMOTE_ORIGIN;
+// FIXME: otherRemote might not be accessible on some test environments.
+var otherRemote = &quot;www.&quot; + local;
</ins><span class="cx"> 
</span><span class="cx"> corsCookies(&quot;Omit mode: no cookie sent&quot;, local, local, &quot;omit&quot;, [&quot;g=7&quot;]);
</span><span class="cx"> corsCookies(&quot;Include mode: 1 cookie&quot;, remote, remote, &quot;include&quot;, [&quot;a=1&quot;]);
</span><span class="cx"> corsCookies(&quot;Include mode: local cookies are not sent with remote request&quot;, local, remote, &quot;include&quot;, [&quot;c=3&quot;]);
</span><span class="cx"> corsCookies(&quot;Include mode: remote cookies are not sent with local request&quot;, remote, local, &quot;include&quot;, [&quot;d=4&quot;]);
</span><del>-corsCookies(&quot;Include mode: remote cookies are not sent with other remote request&quot;, remote, remote1, &quot;include&quot;, [&quot;e=5&quot;]);
</del><span class="cx"> corsCookies(&quot;Same-origin mode: cookies are discarded in cors request&quot;, remote, remote, &quot;same-origin&quot;, [&quot;f=6&quot;]);
</span><ins>+corsCookies(&quot;Include mode: remote cookies are not sent with other remote request&quot;, remote, otherRemote, &quot;include&quot;, [&quot;e=5&quot;]);
</ins><span class="cx"> 
</span><span class="cx"> done();
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsnopreflightworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight-worker.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight-worker.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight-worker.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script&gt;
</span><del>-      fetch_tests_from_worker(new Worker(&quot;cors-no-preflight.js?pipe=sub&quot;));
</del><ins>+      fetch_tests_from_worker(new Worker(&quot;cors-no-preflight.js&quot;));
</ins><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsnopreflighthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -15,6 +15,7 @@
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script src=&quot;/common/utils.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;cors-no-preflight.js?pipe=sub&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../resources/get-host-info.sub.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;cors-no-preflight.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsnopreflightjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.js (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.js        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.js        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -1,19 +1,14 @@
</span><span class="cx"> if (this.document === undefined) {
</span><ins>+  importScripts(&quot;/common/utils.js&quot;);
</ins><span class="cx">   importScripts(&quot;/resources/testharness.js&quot;);
</span><del>-  importScripts(&quot;/common/utils.js&quot;);
</del><span class="cx">   importScripts(&quot;../resources/utils.js&quot;);
</span><ins>+  importScripts(&quot;../resources/get-host-info.sub.js&quot;)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function corsNoPreflight(desc, scheme, subdomain, port, method, headerName, headerValue) {
-  if (!port)
-    port = location.port;
-  if (subdomain)
-    subdomain = subdomain + &quot;.&quot;;
-  else
-    subdomain = &quot;&quot;;
</del><ins>+function corsNoPreflight(desc, baseURL, method, headerName, headerValue) {
</ins><span class="cx"> 
</span><span class="cx">   var uuid_token = token();
</span><del>-  var url = scheme + &quot;://&quot; + subdomain + &quot;{{host}}&quot; + &quot;:&quot; + port + dirname(location.pathname) + RESOURCES_DIR + &quot;preflight.py&quot;;
</del><ins>+  var url = baseURL + dirname(location.pathname) + RESOURCES_DIR + &quot;preflight.py&quot;;
</ins><span class="cx">   var urlParameters = &quot;?token=&quot; + uuid_token + &quot;&amp;max_age=0&quot;;
</span><span class="cx">   var requestInit = {&quot;mode&quot;: &quot;cors&quot;, &quot;method&quot;: method, &quot;headers&quot;:{}};
</span><span class="cx">   if (headerName)
</span><span class="lines">@@ -29,22 +24,22 @@
</span><span class="cx">     });
</span><span class="cx">   }, desc);
</span><span class="cx"> }
</span><del>-var port2 = &quot;{{ports[http][1]}}&quot;;
-var httpsPort = &quot;{{ports[https][0]}}&quot;;
</del><span class="cx"> 
</span><del>-corsNoPreflight(&quot;Cross domain basic usage [GET]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;GET&quot;);
-corsNoPreflight(&quot;Same domain different port [GET]&quot;, &quot;http&quot;, undefined, port2, &quot;GET&quot;);
-corsNoPreflight(&quot;Cross domain different port [GET]&quot;, &quot;http&quot;, &quot;www1&quot;, port2, &quot;GET&quot;);
-corsNoPreflight(&quot;Cross domain different protocol [GET]&quot;, &quot;https&quot;, &quot;www1&quot;, httpsPort, &quot;GET&quot;);
-corsNoPreflight(&quot;Same domain different protocol different port [GET]&quot;, &quot;https&quot;, undefined, httpsPort, &quot;GET&quot;);
-corsNoPreflight(&quot;Cross domain [POST]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;POST&quot;);
-corsNoPreflight(&quot;Cross domain [HEAD]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;HEAD&quot;);
-corsNoPreflight(&quot;Cross domain [GET] [Accept: */*]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;GET&quot; , &quot;Accept&quot;, &quot;*/*&quot;);
-corsNoPreflight(&quot;Cross domain [GET] [Accept-Language: fr]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;GET&quot; , &quot;Accept-Language&quot;, &quot;fr&quot;);
-corsNoPreflight(&quot;Cross domain [GET] [Content-Language: fr]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;GET&quot; , &quot;Content-Language&quot;, &quot;fr&quot;);
-corsNoPreflight(&quot;Cross domain [GET] [Content-Type: application/x-www-form-urlencoded]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;GET&quot; , &quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded&quot;);
-corsNoPreflight(&quot;Cross domain [GET] [Content-Type: multipart/form-data]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;GET&quot; , &quot;Content-Type&quot;, &quot;multipart/form-data&quot;);
-corsNoPreflight(&quot;Cross domain [GET] [Content-Type: text/plain]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;GET&quot; , &quot;Content-Type&quot;, &quot;text/plain&quot;);
-corsNoPreflight(&quot;Cross domain [GET] [Content-Type: text/plain;charset=utf-8]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;GET&quot; , &quot;Content-Type&quot;, &quot;text/plain;charset=utf-8&quot;);
</del><ins>+var host_info = get_host_info();
</ins><span class="cx"> 
</span><ins>+corsNoPreflight(&quot;Cross domain basic usage [GET]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;GET&quot;);
+corsNoPreflight(&quot;Same domain different port [GET]&quot;, host_info.HTTP_ORIGIN_WITH_DIFFERENT_ORIGIN, &quot;GET&quot;);
+corsNoPreflight(&quot;Cross domain different port [GET]&quot;, host_info.HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_ORIGIN, &quot;GET&quot;);
+corsNoPreflight(&quot;Cross domain different protocol [GET]&quot;, host_info.HTTPS_REMOTE_ORIGIN, &quot;GET&quot;);
+corsNoPreflight(&quot;Same domain different protocol different port [GET]&quot;, host_info.HTTPS_ORIGIN, &quot;GET&quot;);
+corsNoPreflight(&quot;Cross domain [POST]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;POST&quot;);
+corsNoPreflight(&quot;Cross domain [HEAD]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;HEAD&quot;);
+corsNoPreflight(&quot;Cross domain [GET] [Accept: */*]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;GET&quot; , &quot;Accept&quot;, &quot;*/*&quot;);
+corsNoPreflight(&quot;Cross domain [GET] [Accept-Language: fr]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;GET&quot; , &quot;Accept-Language&quot;, &quot;fr&quot;);
+corsNoPreflight(&quot;Cross domain [GET] [Content-Language: fr]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;GET&quot; , &quot;Content-Language&quot;, &quot;fr&quot;);
+corsNoPreflight(&quot;Cross domain [GET] [Content-Type: application/x-www-form-urlencoded]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;GET&quot; , &quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded&quot;);
+corsNoPreflight(&quot;Cross domain [GET] [Content-Type: multipart/form-data]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;GET&quot; , &quot;Content-Type&quot;, &quot;multipart/form-data&quot;);
+corsNoPreflight(&quot;Cross domain [GET] [Content-Type: text/plain]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;GET&quot; , &quot;Content-Type&quot;, &quot;text/plain&quot;);
+corsNoPreflight(&quot;Cross domain [GET] [Content-Type: text/plain;charset=utf-8]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;GET&quot; , &quot;Content-Type&quot;, &quot;text/plain;charset=utf-8&quot;);
+
</ins><span class="cx"> done();
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsoriginworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin-worker.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin-worker.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin-worker.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script&gt;
</span><del>-      fetch_tests_from_worker(new Worker(&quot;cors-origin.js?pipe=sub&quot;));
</del><ins>+      fetch_tests_from_worker(new Worker(&quot;cors-origin.js&quot;));
</ins><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsoriginhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -14,6 +14,7 @@
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script src=&quot;/common/utils.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;cors-origin.js?pipe=sub&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../resources/get-host-info.sub.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;cors-origin.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsoriginjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.js (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.js        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.js        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -1,23 +1,18 @@
</span><span class="cx"> if (this.document === undefined) {
</span><ins>+  importScripts(&quot;/common/utils.js&quot;);
</ins><span class="cx">   importScripts(&quot;/resources/testharness.js&quot;);
</span><span class="cx">   importScripts(&quot;../resources/utils.js&quot;);
</span><del>-  importScripts(&quot;/common/utils.js&quot;);
</del><ins>+  importScripts(&quot;../resources/get-host-info.sub.js&quot;)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /* If origin is undefined, it is set to fetched url's origin*/
</span><del>-function corsOrigin(desc, scheme, subdomain, port, method, origin, shouldPass) {
-  if (!port)
-    port = location.port;
-  if (subdomain)
-    subdomain = subdomain + &quot;.&quot;;
-  else
-    subdomain = &quot;&quot;;
</del><ins>+function corsOrigin(desc, baseURL, method, origin, shouldPass) {
</ins><span class="cx">   if (!origin)
</span><del>-    origin = scheme + &quot;://&quot; + subdomain + &quot;{{host}}&quot; + &quot;:&quot; + port;
</del><ins>+    origin = baseURL;
</ins><span class="cx"> 
</span><span class="cx">   var uuid_token = token();
</span><span class="cx">   var urlParameters = &quot;?token=&quot; + uuid_token + &quot;&amp;max_age=0&amp;origin=&quot; + encodeURIComponent(origin) + &quot;&amp;allow_methods=&quot; + method;
</span><del>-  var url = scheme + &quot;://&quot; + subdomain + &quot;{{host}}&quot; + &quot;:&quot; + port + dirname(location.pathname) + RESOURCES_DIR + &quot;preflight.py&quot;;
</del><ins>+  var url = baseURL + dirname(location.pathname) + RESOURCES_DIR + &quot;preflight.py&quot;;
</ins><span class="cx">   var requestInit = {&quot;mode&quot;: &quot;cors&quot;, &quot;method&quot;: method};
</span><span class="cx"> 
</span><span class="cx">   promise_test(function(test) {
</span><span class="lines">@@ -34,28 +29,28 @@
</span><span class="cx">   }, desc);
</span><span class="cx"> 
</span><span class="cx"> }
</span><del>-var port = &quot;{{ports[http][0]}}&quot;;
-var port2 = &quot;{{ports[http][1]}}&quot;;
-var httpsPort = &quot;{{ports[https][0]}}&quot;;
</del><ins>+
+var host_info = get_host_info();
+
</ins><span class="cx"> /* Actual origin */
</span><del>-var origin = &quot;http://{{host}}:{{ports[http][0]}}&quot;;
</del><ins>+var origin = host_info.HTTP_ORIGIN;
</ins><span class="cx"> 
</span><del>-corsOrigin(&quot;Cross domain different subdomain [origin OK]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;GET&quot;, origin, true);
-corsOrigin(&quot;Cross domain different subdomain [origin KO]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;GET&quot;, undefined, false);
-corsOrigin(&quot;Same domain different port [origin OK]&quot;, &quot;http&quot;, undefined, port2, &quot;GET&quot;, origin, true);
-corsOrigin(&quot;Same domain different port [origin KO]&quot;, &quot;http&quot;, undefined, port2, &quot;GET&quot;, undefined, false);
-corsOrigin(&quot;Cross domain different port [origin OK]&quot;, &quot;http&quot;, &quot;www1&quot;, port2, &quot;GET&quot;, origin, true);
-corsOrigin(&quot;Cross domain different port [origin KO]&quot;, &quot;http&quot;, &quot;www1&quot;, port2, &quot;GET&quot;, undefined, false);
-corsOrigin(&quot;Cross domain different protocol [origin OK]&quot;, &quot;https&quot;, &quot;www1&quot;, httpsPort, &quot;GET&quot;, origin, true);
-corsOrigin(&quot;Cross domain different protocol [origin KO]&quot;, &quot;https&quot;, &quot;www1&quot;, httpsPort, &quot;GET&quot;, undefined, false);
-corsOrigin(&quot;Same domain different protocol different port [origin OK]&quot;, &quot;https&quot;, undefined, httpsPort, &quot;GET&quot;, origin, true);
-corsOrigin(&quot;Same domain different protocol different port [origin KO]&quot;, &quot;https&quot;, undefined, httpsPort, &quot;GET&quot;, undefined, false);
-corsOrigin(&quot;Cross domain [POST] [origin OK]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;POST&quot;, origin, true);
-corsOrigin(&quot;Cross domain [POST] [origin KO]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;POST&quot;, undefined, false);
-corsOrigin(&quot;Cross domain [HEAD] [origin OK]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;HEAD&quot;, origin, true);
-corsOrigin(&quot;Cross domain [HEAD] [origin KO]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;HEAD&quot;, undefined, false);
-corsOrigin(&quot;CORS preflight [PUT] [origin OK]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;PUT&quot;, origin, true);
-corsOrigin(&quot;CORS preflight [PUT] [origin KO]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;PUT&quot;, undefined, false);
-corsOrigin(&quot;Allowed origin: \&quot;\&quot; [origin KO]&quot;, &quot;http&quot;, &quot;www1&quot;, undefined, &quot;GET&quot;, &quot;&quot; , false);
</del><ins>+corsOrigin(&quot;Cross domain different subdomain [origin OK]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;GET&quot;, origin, true);
+corsOrigin(&quot;Cross domain different subdomain [origin KO]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;GET&quot;, undefined, false);
+corsOrigin(&quot;Same domain different port [origin OK]&quot;, host_info.HTTP_ORIGIN_WITH_DIFFERENT_PORT, &quot;GET&quot;, origin, true);
+corsOrigin(&quot;Same domain different port [origin KO]&quot;, host_info.HTTP_ORIGIN_WITH_DIFFERENT_PORT, &quot;GET&quot;, undefined, false);
+corsOrigin(&quot;Cross domain different port [origin OK]&quot;, host_info.HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT, &quot;GET&quot;, origin, true);
+corsOrigin(&quot;Cross domain different port [origin KO]&quot;, host_info.HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT, &quot;GET&quot;, undefined, false);
+corsOrigin(&quot;Cross domain different protocol [origin OK]&quot;, host_info.HTTPS_REMOTE_ORIGIN, &quot;GET&quot;, origin, true);
+corsOrigin(&quot;Cross domain different protocol [origin KO]&quot;, host_info.HTTPS_REMOTE_ORIGIN, &quot;GET&quot;, undefined, false);
+corsOrigin(&quot;Same domain different protocol different port [origin OK]&quot;, host_info.HTTPS_ORIGIN, &quot;GET&quot;, origin, true);
+corsOrigin(&quot;Same domain different protocol different port [origin KO]&quot;, host_info.HTTPS_ORIGIN, &quot;GET&quot;, undefined, false);
+corsOrigin(&quot;Cross domain [POST] [origin OK]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;POST&quot;, origin, true);
+corsOrigin(&quot;Cross domain [POST] [origin KO]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;POST&quot;, undefined, false);
+corsOrigin(&quot;Cross domain [HEAD] [origin OK]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;HEAD&quot;, origin, true);
+corsOrigin(&quot;Cross domain [HEAD] [origin KO]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;HEAD&quot;, undefined, false);
+corsOrigin(&quot;CORS preflight [PUT] [origin OK]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;PUT&quot;, origin, true);
+corsOrigin(&quot;CORS preflight [PUT] [origin KO]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;PUT&quot;, undefined, false);
+corsOrigin(&quot;Allowed origin: \&quot;\&quot; [origin KO]&quot;, host_info.HTTP_REMOTE_ORIGIN, &quot;GET&quot;, &quot;&quot; , false);
</ins><span class="cx"> 
</span><span class="cx"> done();
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightredirectworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect-worker.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect-worker.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect-worker.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script&gt;
</span><del>-      fetch_tests_from_worker(new Worker(&quot;cors-preflight-redirect.js?pipe=sub&quot;));
</del><ins>+      fetch_tests_from_worker(new Worker(&quot;cors-preflight-redirect.js&quot;));
</ins><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightredirecthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -13,6 +13,7 @@
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script src=&quot;/common/utils.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;cors-preflight-redirect.js?pipe=sub&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../resources/get-host-info.sub.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;cors-preflight-redirect.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightredirectjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect.js (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect.js        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-redirect.js        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx">   importScripts(&quot;/resources/testharness.js&quot;);
</span><span class="cx">   importScripts(&quot;../resources/utils.js&quot;);
</span><span class="cx">   importScripts(&quot;/common/utils.js&quot;);
</span><ins>+  importScripts(&quot;../resources/get-host-info.sub.js&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function corsPreflightRedirect(desc, redirectUrl, redirectLocation, redirectStatus, redirectPreflight) {
</span><span class="lines">@@ -27,8 +28,8 @@
</span><span class="cx">   }, desc);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-var redirectUrl = &quot;http://www1.{{host}}:{{ports[http][0]}}&quot; + dirname(location.pathname) + RESOURCES_DIR + &quot;redirect.py&quot;;
-var locationUrl = &quot;http://www1.{{host}}:{{ports[http][0]}}&quot; + dirname(location.pathname) + RESOURCES_DIR + &quot;preflight.py&quot;;
</del><ins>+var redirectUrl = get_host_info().HTTP_REMOTE_ORIGIN + dirname(location.pathname) + RESOURCES_DIR + &quot;redirect.py&quot;;
+var locationUrl =  get_host_info().HTTP_REMOTE_ORIGIN + dirname(location.pathname) + RESOURCES_DIR + &quot;preflight.py&quot;;
</ins><span class="cx"> 
</span><span class="cx"> for (var code of [301, 302, 303, 307, 308]) {
</span><span class="cx">   /* preflight should not follow the redirection */
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightreferrerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer-expected.txt (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer-expected.txt        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer-expected.txt        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -1,7 +1,9 @@
</span><span class="cx"> 
</span><del>-PASS Referrer policy: no-referrer 
-PASS Referrer policy: &quot;&quot; 
-PASS Referrer policy: origin 
-PASS Referrer policy: origin-when-cross-origin 
-PASS Referrer policy: unsafe-url 
</del><ins>+Harness Error (TIMEOUT), message = null
</ins><span class="cx"> 
</span><ins>+FAIL Referrer policy: no-referrer assert_equals: Clean stash response's status is 200 expected 200 but got 500
+TIMEOUT Referrer policy: &quot;&quot; Test timed out
+TIMEOUT Referrer policy: origin Test timed out
+TIMEOUT Referrer policy: origin-when-cross-origin Test timed out
+TIMEOUT Referrer policy: unsafe-url Test timed out
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightreferrerworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker-expected.txt (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker-expected.txt        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker-expected.txt        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -1,7 +1,9 @@
</span><span class="cx"> 
</span><del>-PASS Referrer policy: no-referrer 
-PASS Referrer policy: &quot;&quot; 
-PASS Referrer policy: origin 
-PASS Referrer policy: origin-when-cross-origin 
-PASS Referrer policy: unsafe-url 
</del><ins>+Harness Error (TIMEOUT), message = null
</ins><span class="cx"> 
</span><ins>+FAIL Referrer policy: no-referrer assert_equals: Clean stash response's status is 200 expected 200 but got 500
+TIMEOUT Referrer policy: &quot;&quot; Test timed out
+TIMEOUT Referrer policy: origin Test timed out
+TIMEOUT Referrer policy: origin-when-cross-origin Test timed out
+TIMEOUT Referrer policy: unsafe-url Test timed out
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightreferrerworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script&gt;
</span><del>-      fetch_tests_from_worker(new Worker(&quot;cors-preflight-referrer.js?pipe=sub&quot;));
</del><ins>+      fetch_tests_from_worker(new Worker(&quot;cors-preflight-referrer.js&quot;));
</ins><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightreferrerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -13,6 +13,7 @@
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script src=&quot;/common/utils.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;cors-preflight-referrer.js?pipe=sub&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../resources/get-host-info.sub.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;cors-preflight-referrer.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightreferrerjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer.js (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer.js        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-referrer.js        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx">   urlParameters += &quot;&amp;allow_headers=x-force-preflight&quot;;
</span><span class="cx"> 
</span><span class="cx">   promise_test(function(test) {
</span><del>-    fetch(RESOURCES_DIR + &quot;clean-stash.py?token=&quot; + uuid_token).then(function(resp) {
</del><ins>+    return fetch(RESOURCES_DIR + &quot;clean-stash.py?token=&quot; + uuid_token).then(function(resp) {
</ins><span class="cx">       assert_equals(resp.status, 200, &quot;Clean stash response's status is 200&quot;);
</span><span class="cx">       return fetch(url + urlParameters, requestInit).then(function(resp) {
</span><span class="cx">         assert_equals(resp.status, 200, &quot;Response's status is 200&quot;);
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">   }, desc);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-var corsUrl = &quot;http://www1.{{host}}:{{ports[http][0]}}&quot; + dirname(location.pathname) + RESOURCES_DIR + &quot;preflight.py&quot;;
</del><ins>+var corsUrl = &quot;http://{{host}}:{{ports[http][1]}}&quot; + dirname(location.pathname) + RESOURCES_DIR + &quot;preflight.py&quot;;
</ins><span class="cx"> var origin = &quot;http://{{host}}:{{ports[http][0]}}&quot;;
</span><span class="cx"> 
</span><span class="cx"> corsPreflightReferrer(&quot;Referrer policy: no-referrer&quot;, corsUrl, &quot;no-referrer&quot;, &quot;&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightstatusworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status-worker.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status-worker.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status-worker.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script&gt;
</span><del>-      fetch_tests_from_worker(new Worker(&quot;cors-preflight-status.js?pipe=sub&quot;));
</del><ins>+      fetch_tests_from_worker(new Worker(&quot;cors-preflight-status.js&quot;));
</ins><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightstatushtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -12,6 +12,7 @@
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script src=&quot;/common/utils.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;cors-preflight-status.js?pipe=sub&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../resources/get-host-info.sub.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;cors-preflight-status.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorspreflightstatusjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status.js (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status.js        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-status.js        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx">   importScripts(&quot;/resources/testharness.js&quot;);
</span><span class="cx">   importScripts(&quot;../resources/utils.js&quot;);
</span><span class="cx">   importScripts(&quot;/common/utils.js&quot;);
</span><ins>+  importScripts(&quot;../resources/get-host-info.sub.js&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /* Check preflight is ok if status is ok status (200  to 299)*/
</span><span class="lines">@@ -31,7 +32,7 @@
</span><span class="cx">   }, desc);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-var corsUrl = &quot;http://www1.{{host}}:{{ports[http][0]}}&quot; + dirname(location.pathname) + RESOURCES_DIR + &quot;preflight.py&quot;;
</del><ins>+var corsUrl = get_host_info().HTTP_REMOTE_ORIGIN + dirname(location.pathname) + RESOURCES_DIR + &quot;preflight.py&quot;;
</ins><span class="cx"> for (status of [200, 201, 202, 203, 204, 205, 206,
</span><span class="cx">                 300, 301, 302, 303, 304, 305, 306, 307, 308,
</span><span class="cx">                 400, 401, 402, 403, 404, 405,
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsredirectcredentialshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-credentials.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-credentials.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-credentials.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -10,6 +10,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;cors-redirect-credentials.js?pipe=sub&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../resources/get-host-info.sub.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;cors-redirect-credentials.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsredirectcredentialsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-credentials.js (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-credentials.js        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-credentials.js        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> if (this.document === undefined) {
</span><span class="cx">   importScripts(&quot;/resources/testharness.js&quot;);
</span><span class="cx">   importScripts(&quot;../resources/utils.js&quot;);
</span><ins>+  importScripts(&quot;../resources/get-host-info.sub.js&quot;)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function corsRedirectCredentials(desc, redirectUrl, redirectLocation, redirectStatus, locationCredentials) {
</span><span class="lines">@@ -19,13 +20,15 @@
</span><span class="cx"> var redirPath = dirname(location.pathname) + RESOURCES_DIR + &quot;redirect.py&quot;;
</span><span class="cx"> var preflightPath = dirname(location.pathname) + RESOURCES_DIR + &quot;preflight.py&quot;;
</span><span class="cx"> 
</span><del>-var localRedirect = &quot;http://{{host}}:{{ports[http][0]}}&quot; + redirPath;
-var remoteRedirect = &quot;http://{{host}}:{{ports[http][1]}}&quot; + redirPath;
</del><ins>+var host_info = get_host_info();
</ins><span class="cx"> 
</span><del>-var localLocation = &quot;http://{{host}}:{{ports[http][0]}}&quot; + preflightPath;
-var remoteLocation = &quot;http://{{host}}:{{ports[http][1]}}&quot; + preflightPath;
-var remoteLocation2 = &quot;http://www.{{host}}:{{ports[http][0]}}&quot; + preflightPath;
</del><ins>+var localRedirect = host_info.HTTP_ORIGIN + redirPath;
+var remoteRedirect = host_info.HTTP_ORIGIN_WITH_DIFFERENT_PORT + redirPath;
</ins><span class="cx"> 
</span><ins>+var localLocation = host_info.HTTP_ORIGIN + preflightPath;
+var remoteLocation = host_info.HTTP_ORIGIN_WITH_DIFFERENT_PORT + preflightPath;
+var remoteLocation2 = host_info.HTTP_REMOTE_ORIGIN + preflightPath;
+
</ins><span class="cx"> for (var code of [301, 302, 303, 307, 308]) {
</span><span class="cx">   corsRedirectCredentials(&quot;Redirect &quot; + code + &quot; from same origin to remote with user and password&quot;, localRedirect, remoteLocation, code, &quot;user:password&quot;);
</span><span class="cx">   corsRedirectCredentials(&quot;Redirect &quot; + code + &quot; from same origin to remote with user&quot;, localRedirect, remoteLocation, code, &quot;user:&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsredirectworkerhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-worker.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-worker.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect-worker.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script&gt;
</span><del>-      fetch_tests_from_worker(new Worker(&quot;cors-redirect.js?pipe=sub&quot;));
</del><ins>+      fetch_tests_from_worker(new Worker(&quot;cors-redirect.js&quot;));
</ins><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsredirecthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -12,6 +12,7 @@
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script src=&quot;/common/utils.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;cors-redirect.js?pipe=sub&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../resources/get-host-info.sub.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;cors-redirect.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">   &lt;/body&gt;
</span><del>-&lt;/html&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapicorscorsredirectjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect.js (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect.js        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-redirect.js        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx">   importScripts(&quot;/resources/testharness.js&quot;);
</span><span class="cx">   importScripts(&quot;/common/utils.js&quot;);
</span><span class="cx">   importScripts(&quot;../resources/utils.js&quot;);
</span><ins>+  importScripts(&quot;../resources/get-host-info.sub.js&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function corsRedirect(desc, redirectUrl, redirectLocation, redirectStatus, expectedOrigin) {
</span><span class="lines">@@ -27,13 +28,15 @@
</span><span class="cx"> var redirPath = dirname(location.pathname) + RESOURCES_DIR + &quot;redirect.py&quot;;
</span><span class="cx"> var preflightPath = dirname(location.pathname) + RESOURCES_DIR + &quot;preflight.py&quot;;
</span><span class="cx"> 
</span><del>-var localRedirect = &quot;http://{{host}}:{{ports[http][0]}}&quot; + redirPath;
-var remoteRedirect = &quot;http://www1.{{host}}:{{ports[http][0]}}&quot; + redirPath;
</del><ins>+var host_info = get_host_info();
</ins><span class="cx"> 
</span><del>-var localLocation = &quot;http://{{host}}:{{ports[http][0]}}&quot; + preflightPath;
-var remoteLocation = &quot;http://www1.{{host}}:{{ports[http][0]}}&quot; + preflightPath;
-var remoteLocation2 = &quot;http://www.{{host}}:{{ports[http][0]}}&quot; + preflightPath;
</del><ins>+var localRedirect = host_info.HTTP_ORIGIN + redirPath;
+var remoteRedirect = host_info.HTTP_REMOTE_ORIGIN + redirPath;
</ins><span class="cx"> 
</span><ins>+var localLocation = host_info.HTTP_ORIGIN + preflightPath;
+var remoteLocation = host_info.HTTP_REMOTE_ORIGIN + preflightPath;
+var remoteLocation2 = host_info.HTTP_ORIGIN_WITH_DIFFERENT_PORT + preflightPath;
+
</ins><span class="cx"> for (var code of [301, 302, 303, 307, 308]) {
</span><span class="cx">   corsRedirect(&quot;Redirect &quot; + code + &quot;: cors to same cors&quot;, remoteRedirect, remoteLocation, code, location.origin);
</span><span class="cx">   corsRedirect(&quot;Redirect &quot; + code + &quot;: cors to another cors&quot;, remoteRedirect, remoteLocation2, code, &quot;null&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapirequestrequestcachehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-cache.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-cache.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-cache.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx">     &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;/common/utils.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;resources/get-host-info.sub.js&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../resources/get-host-info.sub.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">   &lt;/head&gt;
</span><span class="cx">   &lt;body&gt;
</span><span class="cx">     &lt;script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapirequestresourcesw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/resources/w3c-import.log (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/resources/w3c-import.log        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/resources/w3c-import.log        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -16,4 +16,3 @@
</span><span class="cx"> ------------------------------------------------------------------------
</span><span class="cx"> List of files:
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/resources/cache.py
</span><del>-/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/resources/get-host-info.sub.js
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapiresourcesgethostinfosubjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/get-host-info.sub.js (0 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/get-host-info.sub.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/get-host-info.sub.js        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+// This file is duplicated verbatim from:
+// service-workers/service-worker/resources/get-host-info.sub.js
+// with the rationale that:
+// - it's better to not reinvent this
+// - at the same time, referencing tests deep inside a sibling test group is
+//   not a great idea and copying the file is the lesser evil.
+function get_host_info() {
+  var ORIGINAL_HOST = '127.0.0.1';
+  var REMOTE_HOST = 'localhost';
+  var UNAUTHENTICATED_HOST = 'example.test';
+  var HTTP_PORT = 8000;
+  var HTTP_PORT2 = 8080;
+  var HTTPS_PORT = 8443;
+  try {
+    // In W3C test, we can get the hostname and port number in config.json
+    // using wptserve's built-in pipe.
+    // http://wptserve.readthedocs.org/en/latest/pipes.html#built-in-pipes
+    HTTP_PORT = eval('{{ports[http][0]}}');
+    HTTP_PORT2 = eval('{{ports[http][1]}}');
+    HTTPS_PORT = eval('{{ports[https][0]}}');
+    ORIGINAL_HOST = eval('\'{{host}}\'');
+    REMOTE_HOST = (ORIGINAL_HOST === 'localhost') ? '127.0.0.1' : ('www1.' + ORIGINAL_HOST);
+  } catch (e) {
+  }
+  return {
+    HTTP_ORIGIN: 'http://' + ORIGINAL_HOST + ':' + HTTP_PORT,
+    HTTPS_ORIGIN: 'https://' + ORIGINAL_HOST + ':' + HTTPS_PORT,
+    HTTPS_ORIGIN_WITH_CREDS: 'https://foo:bar@' + ORIGINAL_HOST + ':' + HTTPS_PORT,
+    HTTP_ORIGIN_WITH_DIFFERENT_PORT: 'http://' + ORIGINAL_HOST + ':' + HTTP_PORT2,
+    HTTP_REMOTE_ORIGIN: 'http://' + REMOTE_HOST + ':' + HTTP_PORT,
+    HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT: 'http://' + REMOTE_HOST + ':' + HTTP_PORT2,
+    HTTPS_REMOTE_ORIGIN: 'https://' + REMOTE_HOST + ':' + HTTPS_PORT,
+    HTTPS_REMOTE_ORIGIN_WITH_CREDS: 'https://foo:bar@' + REMOTE_HOST + ':' + HTTPS_PORT,
+    UNAUTHENTICATED_ORIGIN: 'http://' + UNAUTHENTICATED_HOST + ':' + HTTP_PORT
+  };
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapiresourcesutilsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/utils.js (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/utils.js        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/utils.js        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> 
</span><span class="cx"> function validateBufferFromString(buffer, expectedValue, message)
</span><span class="cx"> {
</span><del>-  return assert_array_equals(new Uint8Array(buffer), stringToArray(expectedValue), message);
</del><ins>+  return assert_array_equals(new Uint8Array(buffer !== undefined ? buffer : []), stringToArray(expectedValue), message);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function validateStreamFromString(reader, expectedValue, retrievedArrayBuffer) {
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapiresourcesw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/w3c-import.log (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/w3c-import.log        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/w3c-import.log        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -18,6 +18,7 @@
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/authentication.py
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/clean-stash.py
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/data.json
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/get-host-info.sub.js
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/inspect-headers.py
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/method.py
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/preflight.py
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapiresponseresponsecloneexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-clone-expected.txt (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-clone-expected.txt        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-clone-expected.txt        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -3,5 +3,5 @@
</span><span class="cx"> PASS Check Response's clone has the expected attribute values 
</span><span class="cx"> PASS Check orginal response's body after cloning 
</span><span class="cx"> PASS Check cloned response's body 
</span><del>-FAIL Cannot clone a disturbed response assert_true: response is disturbed expected true got false
</del><ins>+PASS Cannot clone a disturbed response 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapiresponseresponseclonehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-clone.html (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-clone.html        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-clone.html        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">       }, &quot;Check cloned response's body&quot;);
</span><span class="cx"> 
</span><span class="cx">       promise_test(function(test) {
</span><del>-        var disturbedResponse = new Response();
</del><ins>+        var disturbedResponse = new Response(&quot;data&quot;);
</ins><span class="cx">         return disturbedResponse.text().then(function() {
</span><span class="cx">             assert_true(disturbedResponse.bodyUsed, &quot;response is disturbed&quot;);
</span><span class="cx">             assert_throws(new TypeError() , function() { disturbedResponse.clone(); },
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapiresponseresponseconsumestreamexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-consume-stream-expected.txt (203407 => 203408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-consume-stream-expected.txt        2016-07-19 14:33:16 UTC (rev 203407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-consume-stream-expected.txt        2016-07-19 16:08:56 UTC (rev 203408)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> 
</span><span class="cx"> PASS Read empty text response's body as readableStream 
</span><del>-FAIL Read empty blob response's body as readableStream promise_test: Unhandled rejection with value: object &quot;TypeError: Invalid array length argument&quot;
</del><ins>+PASS Read empty blob response's body as readableStream 
</ins><span class="cx"> PASS Read blob response's body as readableStream 
</span><span class="cx"> PASS Read text response's body as readableStream 
</span><span class="cx"> FAIL Read form data response's body as readableStream promise_test: Unhandled rejection with value: &quot;not implemented&quot;
</span></span></pre>
</div>
</div>

</body>
</html>