<!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>[197748] trunk</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/197748">197748</a></dd>
<dt>Author</dt> <dd>youenn.fablet@crf.canon.fr</dd>
<dt>Date</dt> <dd>2016-03-08 01:46:27 -0800 (Tue, 08 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Fetch API] Implement fetch skeleton
https://bugs.webkit.org/show_bug.cgi?id=155111

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Importing basic fetch api tests.

* resources/ImportExpectations: Activating fetch/api/basic import.
* web-platform-tests/fetch/api/basic/accept-header-expected.txt: Added.
* web-platform-tests/fetch/api/basic/accept-header-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/accept-header-worker.html: Added.
* web-platform-tests/fetch/api/basic/accept-header.html: Added.
* web-platform-tests/fetch/api/basic/accept-header.js: Added.
(promise_test):
* web-platform-tests/fetch/api/basic/integrity-expected.txt: Added.
* web-platform-tests/fetch/api/basic/integrity-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/integrity-worker.html: Added.
* web-platform-tests/fetch/api/basic/integrity.html: Added.
* web-platform-tests/fetch/api/basic/integrity.js: Added.
(integrity):
* web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt: Added.
* web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/mode-no-cors-worker.html: Added.
* web-platform-tests/fetch/api/basic/mode-no-cors.html: Added.
* web-platform-tests/fetch/api/basic/mode-no-cors.js: Added.
(fetchNoCors):
* web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt: Added.
* web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/mode-same-origin-worker.html: Added.
* web-platform-tests/fetch/api/basic/mode-same-origin.html: Added.
* web-platform-tests/fetch/api/basic/mode-same-origin.js: Added.
(fetchSameOrigin):
* web-platform-tests/fetch/api/basic/request-forbidden-headers-expected.txt: Added.
* web-platform-tests/fetch/api/basic/request-forbidden-headers-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/request-forbidden-headers-worker.html: Added.
* web-platform-tests/fetch/api/basic/request-forbidden-headers.html: Added.
* web-platform-tests/fetch/api/basic/request-forbidden-headers.js: Added.
(requestForbiddenHeaders):
* web-platform-tests/fetch/api/basic/request-headers-expected.txt: Added.
* web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/request-headers-worker.html: Added.
* web-platform-tests/fetch/api/basic/request-headers.html: Added.
* web-platform-tests/fetch/api/basic/request-headers.js: Added.
(requestHeaders):
* web-platform-tests/fetch/api/basic/scheme-about-expected.txt: Added.
* web-platform-tests/fetch/api/basic/scheme-about-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/scheme-about-worker.html: Added.
* web-platform-tests/fetch/api/basic/scheme-about.html: Added.
* web-platform-tests/fetch/api/basic/scheme-about.js: Added.
(checkFetchResponse):
(checkKoUrl):
* web-platform-tests/fetch/api/basic/scheme-blob-expected.txt: Added.
* web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/scheme-blob-worker.html: Added.
* web-platform-tests/fetch/api/basic/scheme-blob.html: Added.
* web-platform-tests/fetch/api/basic/scheme-blob.js: Added.
(checkFetchResponse):
(checkKoUrl):
* web-platform-tests/fetch/api/basic/scheme-data-expected.txt: Added.
* web-platform-tests/fetch/api/basic/scheme-data-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/scheme-data-worker.html: Added.
* web-platform-tests/fetch/api/basic/scheme-data.html: Added.
* web-platform-tests/fetch/api/basic/scheme-data.js: Added.
(checkFetchResponse):
(checkKoUrl):
* web-platform-tests/fetch/api/basic/scheme-others-expected.txt: Added.
* web-platform-tests/fetch/api/basic/scheme-others-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/scheme-others-worker.html: Added.
* web-platform-tests/fetch/api/basic/scheme-others.html: Added.
* web-platform-tests/fetch/api/basic/scheme-others.js: Added.
(checkKoUrl):
* web-platform-tests/fetch/api/basic/stream-response-expected.txt: Added.
* web-platform-tests/fetch/api/basic/stream-response-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/stream-response-worker.html: Added.
* web-platform-tests/fetch/api/basic/stream-response.html: Added.
* web-platform-tests/fetch/api/basic/stream-response.js: Added.
(streamBody):
(promise_test.):
(promise_test):
* web-platform-tests/fetch/api/basic/w3c-import.log: Added.

Source/WebCore:

Adding skeleton code to call fetch API from normal and worker scopes.
Fetch API implementation is limited to reject the promise.

Updating the binding generator to fix the case of overloaded promise-returning functions.
Made overloaded utility functions &quot;static inline&quot;.

Tests: imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker.html
       imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html
       imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html
       imported/w3c/web-platform-tests/fetch/api/basic/integrity.html
       imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html
       imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html
       imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker.html
       imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.html
       imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker.html
       imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.html
       imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html
       imported/w3c/web-platform-tests/fetch/api/basic/request-headers.html
       imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker.html
       imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.html
       imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html
       imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html
       imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker.html
       imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.html
       imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html
       imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html
       imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker.html
       imported/w3c/web-platform-tests/fetch/api/basic/stream-response.html

* CMakeLists.txt:
* DerivedSources.make:
* Modules/fetch/DOMWindowFetch.cpp: Added.
(WebCore::DOMWindowFetch::fetch):
* Modules/fetch/DOMWindowFetch.h: Added.
* Modules/fetch/DOMWindowFetch.idl: Added.
* Modules/fetch/WorkerGlobalScopeFetch.cpp: Added.
(WebCore::WorkerGlobalScopeFetch::fetch):
* Modules/fetch/WorkerGlobalScopeFetch.h: Added.
* Modules/fetch/WorkerGlobalScopeFetch.idl: Added.
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Fixing the case of overloaded promise-returning functions.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod12):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Deleted.
(WebCore::jsTestObjConstructorFunctionClassMethod2): Deleted.
(WebCore::jsTestObjPrototypeFunctionAny): Deleted.
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise): Deleted.
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise): Deleted.
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise): Deleted.
* bindings/scripts/test/TestObj.idl:

LayoutTests:

* TestExpectations: Marking some tests as flaky.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cresourcesImportExpectations">trunk/LayoutTests/imported/w3c/resources/ImportExpectations</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestObjidl">trunk/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicacceptheaderexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicacceptheaderworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicacceptheaderworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicacceptheaderhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicacceptheaderjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicintegrityexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicintegrityworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicintegrityworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicintegrityhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicintegrityjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodenocorsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodenocorsworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodenocorsworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodenocorshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodenocorsjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.js</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="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestforbiddenheadersexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestforbiddenheadersworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestforbiddenheadersworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestforbiddenheadershtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestforbiddenheadersjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestheadersexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestheadersworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestheadersworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestheadershtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestheadersjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeaboutexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeaboutworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeaboutworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeabouthtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeaboutjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemedataexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemedataworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemedataworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemedatahtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemedatajs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeothersexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeothersworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeothersworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeothershtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeothersjs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicstreamresponseexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicstreamresponseworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicstreamresponseworkerhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicstreamresponsehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicstreamresponsejs">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/w3c-import.log</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchDOMWindowFetchcpp">trunk/Source/WebCore/Modules/fetch/DOMWindowFetch.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchDOMWindowFetchh">trunk/Source/WebCore/Modules/fetch/DOMWindowFetch.h</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchDOMWindowFetchidl">trunk/Source/WebCore/Modules/fetch/DOMWindowFetch.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchWorkerGlobalScopeFetchcpp">trunk/Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchWorkerGlobalScopeFetchh">trunk/Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.h</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchWorkerGlobalScopeFetchidl">trunk/Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (197747 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-08 09:44:37 UTC (rev 197747)
+++ trunk/LayoutTests/ChangeLog        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2016-03-08  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
+
+        [Fetch API] Implement fetch skeleton
+        https://bugs.webkit.org/show_bug.cgi?id=155111
+
+        Reviewed by Darin Adler.
+
+        * TestExpectations: Marking some tests as flaky.
+
</ins><span class="cx"> 2016-03-08  Nikos Andronikos  &lt;nikos.andronikos-webkit@cisra.canon.com.au&gt;
</span><span class="cx"> 
</span><span class="cx">         [SVG2] Implement marker orient='auto-start-reverse'
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (197747 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2016-03-08 09:44:37 UTC (rev 197747)
+++ trunk/LayoutTests/TestExpectations        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -316,6 +316,9 @@
</span><span class="cx"> imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-to-cors.htm [ Skip ]
</span><span class="cx"> imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-to-non-cors.htm [ Skip ]
</span><span class="cx"> 
</span><ins>+# Tests that are flaky as failing assertions print a new token generated for each test run.
+imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html [ Failure ]
+imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html [ Failure ]
</ins><span class="cx"> 
</span><span class="cx"> # New W3C ref tests that are failing.
</span><span class="cx"> webkit.org/b/148856 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_initially_paused.html [ ImageOnlyFailure ]
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (197747 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-03-08 09:44:37 UTC (rev 197747)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -1,3 +1,86 @@
</span><ins>+2016-03-08  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
+
+        [Fetch API] Implement fetch skeleton
+        https://bugs.webkit.org/show_bug.cgi?id=155111
+
+        Reviewed by Darin Adler.
+
+        Importing basic fetch api tests.
+
+        * resources/ImportExpectations: Activating fetch/api/basic import.
+        * web-platform-tests/fetch/api/basic/accept-header-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/accept-header-worker-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/accept-header-worker.html: Added.
+        * web-platform-tests/fetch/api/basic/accept-header.html: Added.
+        * web-platform-tests/fetch/api/basic/accept-header.js: Added.
+        (promise_test):
+        * web-platform-tests/fetch/api/basic/integrity-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/integrity-worker-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/integrity-worker.html: Added.
+        * web-platform-tests/fetch/api/basic/integrity.html: Added.
+        * web-platform-tests/fetch/api/basic/integrity.js: Added.
+        (integrity):
+        * web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/mode-no-cors-worker.html: Added.
+        * web-platform-tests/fetch/api/basic/mode-no-cors.html: Added.
+        * web-platform-tests/fetch/api/basic/mode-no-cors.js: Added.
+        (fetchNoCors):
+        * web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/mode-same-origin-worker.html: Added.
+        * web-platform-tests/fetch/api/basic/mode-same-origin.html: Added.
+        * web-platform-tests/fetch/api/basic/mode-same-origin.js: Added.
+        (fetchSameOrigin):
+        * web-platform-tests/fetch/api/basic/request-forbidden-headers-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/request-forbidden-headers-worker-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/request-forbidden-headers-worker.html: Added.
+        * web-platform-tests/fetch/api/basic/request-forbidden-headers.html: Added.
+        * web-platform-tests/fetch/api/basic/request-forbidden-headers.js: Added.
+        (requestForbiddenHeaders):
+        * web-platform-tests/fetch/api/basic/request-headers-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/request-headers-worker.html: Added.
+        * web-platform-tests/fetch/api/basic/request-headers.html: Added.
+        * web-platform-tests/fetch/api/basic/request-headers.js: Added.
+        (requestHeaders):
+        * web-platform-tests/fetch/api/basic/scheme-about-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/scheme-about-worker-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/scheme-about-worker.html: Added.
+        * web-platform-tests/fetch/api/basic/scheme-about.html: Added.
+        * web-platform-tests/fetch/api/basic/scheme-about.js: Added.
+        (checkFetchResponse):
+        (checkKoUrl):
+        * web-platform-tests/fetch/api/basic/scheme-blob-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/scheme-blob-worker.html: Added.
+        * web-platform-tests/fetch/api/basic/scheme-blob.html: Added.
+        * web-platform-tests/fetch/api/basic/scheme-blob.js: Added.
+        (checkFetchResponse):
+        (checkKoUrl):
+        * web-platform-tests/fetch/api/basic/scheme-data-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/scheme-data-worker-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/scheme-data-worker.html: Added.
+        * web-platform-tests/fetch/api/basic/scheme-data.html: Added.
+        * web-platform-tests/fetch/api/basic/scheme-data.js: Added.
+        (checkFetchResponse):
+        (checkKoUrl):
+        * web-platform-tests/fetch/api/basic/scheme-others-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/scheme-others-worker-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/scheme-others-worker.html: Added.
+        * web-platform-tests/fetch/api/basic/scheme-others.html: Added.
+        * web-platform-tests/fetch/api/basic/scheme-others.js: Added.
+        (checkKoUrl):
+        * web-platform-tests/fetch/api/basic/stream-response-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/stream-response-worker-expected.txt: Added.
+        * web-platform-tests/fetch/api/basic/stream-response-worker.html: Added.
+        * web-platform-tests/fetch/api/basic/stream-response.html: Added.
+        * web-platform-tests/fetch/api/basic/stream-response.js: Added.
+        (streamBody):
+        (promise_test.):
+        (promise_test):
+        * web-platform-tests/fetch/api/basic/w3c-import.log: Added.
+
</ins><span class="cx"> 2016-03-07  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Align HTMLCanvasElement.width / height with the specification
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cresourcesImportExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/resources/ImportExpectations (197747 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/resources/ImportExpectations        2016-03-08 09:44:37 UTC (rev 197747)
+++ trunk/LayoutTests/imported/w3c/resources/ImportExpectations        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -120,7 +120,6 @@
</span><span class="cx"> web-platform-tests/eventsource [ Skip ]
</span><span class="cx"> web-platform-tests/ext-xhtml-pubid [ Skip ]
</span><span class="cx"> #web-platform-tests/fetch [ Import ]
</span><del>-web-platform-tests/fetch/api/basic [ Skip ]
</del><span class="cx"> web-platform-tests/fetch/api/cors [ Skip ]
</span><span class="cx"> web-platform-tests/fetch/api/credentials [ Skip ]
</span><span class="cx"> web-platform-tests/fetch/api/policies [ Skip ]
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicacceptheaderexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+FAIL Request through fetch should have 'accept' header with value '*/*' promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicacceptheaderworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+FAIL Request through fetch should have 'accept' header with value '*/*' promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicacceptheaderworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch in worker: accept header&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#fetching&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script&gt;
+      fetch_tests_from_worker(new Worker(&quot;accept-header.js&quot;));
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicacceptheaderhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch: accept header&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#fetching&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;accept-header.js&quot;&gt;&lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicacceptheaderjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header.js (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header.js        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+if (this.document === undefined) {
+  importScripts(&quot;/resources/testharness.js&quot;);
+  importScripts(&quot;../resources/utils.js&quot;);
+}
+
+promise_test(function() {
+  return fetch(RESOURCES_DIR + &quot;inspect-headers.py?headers=Accept&quot;).then(function(response) {
+    assert_equals(response.status, 200, &quot;HTTP status is 200&quot;);
+    assert_equals(response.type , &quot;basic&quot;, &quot;Response's type is basic&quot;);
+    assert_equals(response.headers.get(&quot;x-request-accept&quot;), &quot;*/*&quot;, &quot;Request has accept header with value '*/*'&quot;);
+  });
+}, &quot;Request through fetch should have 'accept' header with value '*/*'&quot;);
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicintegrityexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+
+FAIL Empty string integrity promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL SHA-256 integrity promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL SHA-384 integrity promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL SHA-512 integrity promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Invalid integrity assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Multiple integrities: valid stronger than invalid promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Multiple integrities: invalid stronger than valid assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Multiple integrities: invalid as strong as valid promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Multiple integrities: both are valid promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Multiple integrities: both are invalid assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL CORS empty integrity promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL CORS SHA-512 integrity promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL CORS invalid integrity assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicintegrityworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+
+FAIL Empty string integrity promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL SHA-256 integrity promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL SHA-384 integrity promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL SHA-512 integrity promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Invalid integrity assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Multiple integrities: valid stronger than invalid promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Multiple integrities: invalid stronger than valid assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Multiple integrities: invalid as strong as valid promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Multiple integrities: both are valid promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Multiple integrities: both are invalid assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL CORS empty integrity promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL CORS SHA-512 integrity promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL CORS invalid integrity assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicintegrityworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch in worker: integrity handling&lt;/title&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script&gt;
+      fetch_tests_from_worker(new Worker(&quot;integrity.js?pipe=sub&quot;));
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicintegrityhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch: integrity handling&lt;/title&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;integrity.js?pipe=sub&quot;&gt;&lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicintegrityjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.js (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.js        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+if (this.document === undefined) {
+  importScripts(&quot;/resources/testharness.js&quot;);
+  importScripts(&quot;../resources/utils.js&quot;);
+}
+
+function integrity(desc, url, integrity, shouldPass) {
+   if (shouldPass) {
+    promise_test(function(test) {
+      return fetch(url, {'integrity': integrity}).then(function(resp) {
+        assert_equals(resp.status, 200, &quot;Response's status is 200&quot;);
+      });
+    }, desc);
+  } else {
+    promise_test(function(test) {
+      return promise_rejects(test, new TypeError(), fetch(url, {'integrity': integrity}));
+    }, desc);
+  }
+}
+
+var topSha256 = &quot;sha256-KHIDZcXnR2oBHk9DrAA+5fFiR6JjudYjqoXtMR1zvzk=&quot;;
+var topSha384 = &quot;sha384-MgZYnnAzPM/MjhqfOIMfQK5qcFvGZsGLzx4Phd7/A8fHTqqLqXqKo8cNzY3xEPTL&quot;;
+var topSha512 = &quot;sha512-D6yns0qxG0E7+TwkevZ4Jt5t7Iy3ugmAajG/dlf6Pado1JqTyneKXICDiqFIkLMRExgtvg8PlxbKTkYfRejSOg==&quot;;
+var invalidSha256 = &quot;sha256-dKUcPOn/AlUjWIwcHeHNqYXPlvyGiq+2dWOdFcE+24I=&quot;;
+var invalidSha512 = &quot;sha512-oUceBRNxPxnY60g/VtPCj2syT4wo4EZh2CgYdWy9veW8+OsReTXoh7dizMGZafvx9+QhMS39L/gIkxnPIn41Zg==&quot;;
+
+var url = &quot;../resources/top.txt&quot;;
+var corsUrl = &quot;http://www1.{{host}}:{{ports[http][0]}}&quot; + dirname(location.pathname) + RESOURCES_DIR + &quot;top.txt&quot;;
+/* Enable CORS*/
+corsUrl += &quot;?pipe=header(Access-Control-Allow-Origin,*)&quot;;
+
+integrity(&quot;Empty string integrity&quot;, url, &quot;&quot;, true);
+integrity(&quot;SHA-256 integrity&quot;, url, topSha256, true);
+integrity(&quot;SHA-384 integrity&quot;, url, topSha384, true);
+integrity(&quot;SHA-512 integrity&quot;, url, topSha512, true);
+integrity(&quot;Invalid integrity&quot;, url, invalidSha256, false);
+integrity(&quot;Multiple integrities: valid stronger than invalid&quot;, url, invalidSha256 + &quot; &quot; + topSha384, true);
+integrity(&quot;Multiple integrities: invalid stronger than valid&quot;, url, invalidSha512 + &quot; &quot; + topSha384, false);
+integrity(&quot;Multiple integrities: invalid as strong as valid&quot;, url, invalidSha512 + &quot; &quot; + topSha512, true);
+integrity(&quot;Multiple integrities: both are valid&quot;, url,  topSha384 + &quot; &quot; + topSha512, true);
+integrity(&quot;Multiple integrities: both are invalid&quot;, url, invalidSha256 + &quot; &quot; + invalidSha512, false);
+integrity(&quot;CORS empty integrity&quot;, corsUrl, &quot;&quot;, true);
+integrity(&quot;CORS SHA-512 integrity&quot;, corsUrl, topSha512, true);
+integrity(&quot;CORS invalid integrity&quot;, corsUrl, invalidSha512, false);
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodenocorsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+
+FAIL Fetch ../resources/top.txt with no-cors mode promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch http://localhost:8800/fetch/api/resources/top.txt with no-cors mode promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch https://localhost:8443/fetch/api/resources/top.txt with no-cors mode promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch http://www.localhost:8800/fetch/api/resources/top.txt with no-cors mode promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodenocorsworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+
+FAIL Fetch ../resources/top.txt with no-cors mode promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch http://localhost:8800/fetch/api/resources/top.txt with no-cors mode promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch https://localhost:8443/fetch/api/resources/top.txt with no-cors mode promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch http://www.localhost:8800/fetch/api/resources/top.txt with no-cors mode promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodenocorsworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch in worker: no-cors mode and opaque filtering&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#concept-filtered-response-opaque&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script&gt;
+      fetch_tests_from_worker(new Worker(&quot;mode-no-cors.js?pipe=sub&quot;));
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodenocorshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch: no-cors mode and opaque filtering&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#concept-filtered-response-opaque&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;mode-no-cors.js?pipe=sub&quot;&gt;&lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodenocorsjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.js (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.js        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+if (this.document === undefined) {
+  importScripts(&quot;/resources/testharness.js&quot;);
+  importScripts(&quot;../resources/utils.js&quot;);
+}
+
+function fetchNoCors(url, isOpaqueFiltered) {
+  var urlQuery = &quot;?pipe=header(x-is-filtered,value)&quot;
+  promise_test(function(test) {
+    if (isOpaqueFiltered)
+      return fetch(url + urlQuery, {&quot;mode&quot;: &quot;no-cors&quot;}).then(function(resp) {
+        assert_equals(resp.status, 0, &quot;Opaque filter: status is 0&quot;);
+        assert_equals(resp.statusText, &quot;&quot;, &quot;Opaque filter: statusText is \&quot;\&quot;&quot;);
+        assert_equals(resp.type , &quot;opaque&quot;, &quot;Opaque filter: response's type is opaque&quot;);
+        assert_equals(resp.headers.get(&quot;x-is-filtered&quot;), null, &quot;Header x-is-filtered is filtered&quot;);
+      });
+    else
+      return fetch(url + urlQuery, {&quot;mode&quot;: &quot;no-cors&quot;}).then(function(resp) {
+        assert_equals(resp.status, 200, &quot;HTTP status is 200&quot;);
+        assert_equals(resp.type , &quot;basic&quot;, &quot;Response's type is basic&quot;);
+        assert_equals(resp.headers.get(&quot;x-is-filtered&quot;), &quot;value&quot;, &quot;Header x-is-filtered is not filtered&quot;);
+      });
+  }, &quot;Fetch &quot;+ url + &quot; with no-cors mode&quot;);
+}
+
+fetchNoCors(RESOURCES_DIR + &quot;top.txt&quot;, false);
+fetchNoCors(&quot;http://{{host}}:{{ports[http][0]}}/fetch/api/resources/top.txt&quot;, false);
+fetchNoCors(&quot;https://{{host}}:{{ports[https][0]}}/fetch/api/resources/top.txt&quot;, true);
+fetchNoCors(&quot;http://{{domains[www]}}:{{ports[http][0]}}/fetch/api/resources/top.txt&quot;, true);
+
+done();
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+
+FAIL Fetch ../resources/top.txt with same-origin mode promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch http://localhost:8800/fetch/api/resources/top.txt with same-origin mode promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch https://localhost:8443/fetch/api/resources/top.txt with same-origin mode assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetch http://www.localhost:8800/fetch/api/resources/top.txt with same-origin mode assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+
+FAIL Fetch ../resources/top.txt with same-origin mode promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch http://localhost:8800/fetch/api/resources/top.txt with same-origin mode promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch https://localhost:8443/fetch/api/resources/top.txt with same-origin mode assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetch http://www.localhost:8800/fetch/api/resources/top.txt with same-origin mode assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch in worker: same-origin mode&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#basic-fetch&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script&gt;
+      fetch_tests_from_worker(new Worker(&quot;mode-same-origin.js?pipe=sub&quot;));
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch: same-origin mode&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#basic-fetch&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;mode-same-origin.js?pipe=sub&quot;&gt;&lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicmodesameoriginjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.js (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.js        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+if (this.document === undefined) {
+  importScripts(&quot;/resources/testharness.js&quot;);
+  importScripts(&quot;../resources/utils.js&quot;);
+}
+
+function fetchSameOrigin(url, shouldPass) {
+  promise_test(function(test) {
+    if (shouldPass)
+      return fetch(url , {&quot;mode&quot;: &quot;same-origin&quot;}).then(function(resp) {
+        assert_equals(resp.status, 200, &quot;HTTP status is 200&quot;);
+        assert_equals(resp.type, &quot;basic&quot;, &quot;response type is basic&quot;);
+      });
+    else
+      return promise_rejects(test, new TypeError, fetch(url, {mode: &quot;same-origin&quot;}));
+  }, &quot;Fetch &quot;+ url + &quot; with same-origin mode&quot;);
+}
+
+fetchSameOrigin(RESOURCES_DIR + &quot;top.txt&quot;, true);
+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);
+
+done();
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestforbiddenheadersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+
+FAIL Accept-Charset is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Accept-Encoding is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Access-Control-Request-Headers is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Access-Control-Request-Method is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Connection is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Content-Length is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Cookie is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Cookie2 is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Date is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL DNT is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Expect is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Host is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Keep-Alive is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Origin is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Referer is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL TE is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Trailer is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Transfer-Encoding is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Upgrade is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Via is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Proxy- is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Proxy-Test is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Sec- is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Sec-Test is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestforbiddenheadersworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+
+FAIL Accept-Charset is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Accept-Encoding is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Access-Control-Request-Headers is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Access-Control-Request-Method is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Connection is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Content-Length is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Cookie is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Cookie2 is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Date is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL DNT is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Expect is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Host is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Keep-Alive is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Origin is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Referer is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL TE is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Trailer is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Transfer-Encoding is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Upgrade is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Via is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Proxy- is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Proxy-Test is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Sec- is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Sec-Test is a forbidden request header promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestforbiddenheadersworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch in worker: forbidden request header management&lt;/title&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#forbidden-header-name&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script&gt;
+      fetch_tests_from_worker(new Worker(&quot;request-forbidden-headers.js&quot;));
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestforbiddenheadershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch: forbidden request header management&lt;/title&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#forbidden-header-name&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;request-forbidden-headers.js&quot;&gt;&lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestforbiddenheadersjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.js (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.js        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+if (this.document === undefined) {
+  importScripts(&quot;/resources/testharness.js&quot;);
+  importScripts(&quot;../resources/utils.js&quot;);
+}
+
+function requestForbiddenHeaders(desc, forbiddenHeaders) {
+  var url = RESOURCES_DIR + &quot;inspect-headers.py&quot;;
+  var requestInit = {&quot;headers&quot;: forbiddenHeaders}
+  var urlParameters = &quot;?headers=&quot; + Object.keys(forbiddenHeaders).join(&quot;|&quot;);
+
+  promise_test(function(test){
+    return fetch(url + urlParameters, requestInit).then(function(resp) {
+      assert_equals(resp.status, 200, &quot;HTTP status is 200&quot;);
+      assert_equals(resp.type , &quot;basic&quot;, &quot;Response's type is basic&quot;);
+      for (var header in forbiddenHeaders)
+        assert_not_equals(resp.headers.get(&quot;x-request-&quot; + header), forbiddenHeaders[header], header + &quot; does not have the value we defined&quot;);
+    });
+  }, desc);
+}
+
+requestForbiddenHeaders(&quot;Accept-Charset is a forbidden request header&quot;, {&quot;Accept-Charset&quot;: &quot;utf-8&quot;});
+requestForbiddenHeaders(&quot;Accept-Encoding is a forbidden request header&quot;, {&quot;Accept-Encoding&quot;: &quot;&quot;});
+
+requestForbiddenHeaders(&quot;Access-Control-Request-Headers is a forbidden request header&quot;, {&quot;Access-Control-Request-Headers&quot;: &quot;&quot;});
+requestForbiddenHeaders(&quot;Access-Control-Request-Method is a forbidden request header&quot;, {&quot;Access-Control-Request-Method&quot;: &quot;&quot;});
+requestForbiddenHeaders(&quot;Connection is a forbidden request header&quot;, {&quot;Connection&quot;: &quot;close&quot;});
+requestForbiddenHeaders(&quot;Content-Length is a forbidden request header&quot;, {&quot;Content-Length&quot;: &quot;42&quot;});
+requestForbiddenHeaders(&quot;Cookie is a forbidden request header&quot;, {&quot;Cookie&quot;: &quot;cookie=none&quot;});
+requestForbiddenHeaders(&quot;Cookie2 is a forbidden request header&quot;, {&quot;Cookie2&quot;: &quot;cookie2=none&quot;});
+requestForbiddenHeaders(&quot;Date is a forbidden request header&quot;, {&quot;Date&quot;: &quot;Wed, 04 May 1988 22:22:22 GMT&quot;});
+requestForbiddenHeaders(&quot;DNT is a forbidden request header&quot;, {&quot;DNT&quot;: &quot;4&quot;});
+requestForbiddenHeaders(&quot;Expect is a forbidden request header&quot;, {&quot;Expect&quot;: &quot;100-continue&quot;});
+requestForbiddenHeaders(&quot;Host is a forbidden request header&quot;, {&quot;Host&quot;: &quot;http://wrong-host.com&quot;});
+requestForbiddenHeaders(&quot;Keep-Alive is a forbidden request header&quot;, {&quot;Keep-Alive&quot;: &quot;timeout=15&quot;});
+requestForbiddenHeaders(&quot;Origin is a forbidden request header&quot;, {&quot;Origin&quot;: &quot;http://wrong-origin.com&quot;});
+requestForbiddenHeaders(&quot;Referer is a forbidden request header&quot;, {&quot;Referer&quot;: &quot;http://wrong-referer.com&quot;});
+requestForbiddenHeaders(&quot;TE is a forbidden request header&quot;, {&quot;TE&quot;: &quot;trailers&quot;});
+requestForbiddenHeaders(&quot;Trailer is a forbidden request header&quot;, {&quot;Trailer&quot;: &quot;Accept&quot;});
+requestForbiddenHeaders(&quot;Transfer-Encoding is a forbidden request header&quot;, {&quot;Transfer-Encoding&quot;: &quot;chunked&quot;});
+requestForbiddenHeaders(&quot;Upgrade is a forbidden request header&quot;, {&quot;Upgrade&quot;: &quot;HTTP/2.0&quot;});
+requestForbiddenHeaders(&quot;Via is a forbidden request header&quot;, {&quot;Via&quot;: &quot;1.1 nowhere.com&quot;});
+requestForbiddenHeaders(&quot;Proxy- is a forbidden request header&quot;, {&quot;Proxy-&quot;: &quot;value&quot;});
+requestForbiddenHeaders(&quot;Proxy-Test is a forbidden request header&quot;, {&quot;Proxy-Test&quot;: &quot;value&quot;});
+requestForbiddenHeaders(&quot;Sec- is a forbidden request header&quot;, {&quot;Sec-&quot;: &quot;value&quot;});
+requestForbiddenHeaders(&quot;Sec-Test is a forbidden request header&quot;, {&quot;Sec-Test&quot;: &quot;value&quot;});
+
+done();
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestheadersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+
+FAIL Fetch with GET promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with HEAD promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with HEAD with body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with PUT without body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with PUT with body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with POST without body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with POST with body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with Chicken promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with Chicken with body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestheadersworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+
+FAIL Fetch with GET promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with HEAD promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with HEAD with body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with PUT without body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with PUT with body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with POST without body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with POST with body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with Chicken promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetch with Chicken with body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestheadersworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch in worker: User agent add headers to request&lt;/title&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#http-network-or-cache-fetch&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script&gt;
+      fetch_tests_from_worker(new Worker(&quot;request-headers.js&quot;));
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestheadershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch: User agent add headers to request&lt;/title&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#http-network-or-cache-fetch&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;request-headers.js&quot;&gt;&lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicrequestheadersjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.js (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.js        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+if (this.document === undefined) {
+  importScripts(&quot;/resources/testharness.js&quot;);
+  importScripts(&quot;../resources/utils.js&quot;);
+}
+
+function requestHeaders(desc, url, method, body, expectedOrigin, expectedContentLength) {
+  var urlParameters = &quot;?headers=origin|user-agent|accept-charset|content-length&quot;;
+  var requestInit = {&quot;method&quot;: method}
+  if (body)
+    requestInit[&quot;body&quot;] = body;
+  promise_test(function(test){
+    return fetch(url + urlParameters, requestInit).then(function(resp) {
+      assert_equals(resp.status, 200, &quot;HTTP status is 200&quot;);
+      assert_equals(resp.type , &quot;basic&quot;, &quot;Response's type is basic&quot;);
+      assert_equals(resp.headers.get(&quot;x-request-origin&quot;) , expectedOrigin, &quot;Request has header origin: &quot; + expectedOrigin);
+      assert_equals(resp.headers.get(&quot;x-request-content-length&quot;) , expectedContentLength, &quot;Request has header content-length: &quot; + expectedContentLength);
+      assert_true(resp.headers.has(&quot;x-request-user-agent&quot;), &quot;Request has header user-agent&quot;);
+      assert_false(resp.headers.has(&quot;accept-charset&quot;), &quot;Request has header accept-charset&quot;);
+    });
+  }, desc);
+}
+
+var url = RESOURCES_DIR + &quot;inspect-headers.py&quot;
+
+requestHeaders(&quot;Fetch with GET&quot;, url, &quot;GET&quot;, null, location.origin, null);
+requestHeaders(&quot;Fetch with HEAD&quot;, url, &quot;HEAD&quot;, null, location.origin, &quot;0&quot;);
+requestHeaders(&quot;Fetch with HEAD with body&quot;, url, &quot;HEAD&quot;, &quot;Request's body&quot;, location.origin, &quot;14&quot;);
+requestHeaders(&quot;Fetch with PUT without body&quot;, url, &quot;POST&quot;, null, location.origin, &quot;0&quot;);
+requestHeaders(&quot;Fetch with PUT with body&quot;, url, &quot;PUT&quot;, &quot;Request's body&quot;, location.origin, &quot;14&quot;);
+requestHeaders(&quot;Fetch with POST without body&quot;, url, &quot;POST&quot;, null, location.origin, &quot;0&quot;);
+requestHeaders(&quot;Fetch with POST with body&quot;, url, &quot;POST&quot;, &quot;Request's body&quot;, location.origin, &quot;14&quot;);
+requestHeaders(&quot;Fetch with Chicken&quot;, url, &quot;Chicken&quot;, null, location.origin, null);
+requestHeaders(&quot;Fetch with Chicken with body&quot;, url, &quot;Chicken&quot;, &quot;Request's body&quot;, location.origin, &quot;14&quot;);
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeaboutexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+
+FAIL Fetching about:blank is OK promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetching about:unicorn is OK promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetching about:invalid.com is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching about:config is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeaboutworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+
+FAIL Fetching about:blank is OK promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetching about:unicorn is OK promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetching about:invalid.com is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching about:config is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeaboutworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch in worker: about scheme&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#basic-fetch&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script&gt;
+      fetch_tests_from_worker(new Worker(&quot;scheme-about.js&quot;));
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeabouthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch: about scheme&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#basic-fetch&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;scheme-about.js&quot;&gt;&lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeaboutjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.js (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.js        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+if (this.document === undefined) {
+  importScripts(&quot;/resources/testharness.js&quot;);
+  importScripts(&quot;../resources/utils.js&quot;);
+}
+
+var unicorn = '&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 2361 1572&quot; fill=&quot;hotpink&quot;&gt;&lt;path d=&quot;m1648 1570c-42-12 6-93 55-94 46 0 50-10 46-123-5-122-7-126-119-202-81-55-145-128-175-201-12-30-26-59-31-63s-58-4-119 0c-70 6-131 5-170-2-59-10-84-21-220-93-68-36-72-37-145-31-41 4-100 11-131 17-55 10-57 12-62 47-16 95 3 152 49 152 14 0 29 8 34 19 14 25 13 101-0 101-12 0-60-46-60-58 0-4-17-18-38-31l-38-23-2-115c-1-64 2-124 8-133s24-21 42-25c59-12 128-37 128-46 0-5-4-9-10-9-14 0-28-30-45-95-12-47-13-69-3-124 11-62 10-71-10-109-12-23-22-50-22-60s-7-27-15-37c-18-23-19-18-5 24 8 24 7 50-5 110-10 48-14 96-10 120 8 47-9 72-48 72-40 0-66-26-77-81-6-28-30-88-53-133-23-45-45-88-48-96-4-8-22-20-41-26-26-9-34-17-34-36 0-22 4-24 37-21l37 3-9-33c-12-43-6-47 31-20l30 22 26-20c14-11 39-38 55-61 39-53 63-62 139-49 46 8 64 8 75-2 8-7 15-8 15-4-0 15-14 30-34 37-37 14-6 19 44 7 49-12 53-11 90 15 28 19 48 26 69 23 37-6 29 10-16 28-19 8-32 19-28 24 4 6
  15 5 30-2 18-8 35-7 71 5 27 9 58 16 71 16 32 0 29 17-7 35-16 9-30 17-30 20 0 2 22 2 49-2 44-5 52-3 96 31 27 20 54 34 62 32 25-10 14 4-16 19-16 8-39 15-50 15-29 0-26 16 20 87 45 68 96 101 189 123 149 35 239 59 268 71 27 12 36 11 67-4 21-10 41-29 47-45 23-59 39-78 80-101 60-32 141-27 175 12 23 28 25 34 43 178 15 118 36 182 72 224 28 32 35 35 90 35 75 0 125-21 167-68l33-37-17 40c-16 41-65 98-100 117-11 6-42 17-70 24l-50 12 62 1c48 0 72-5 116-28 50-25 55-26 45-8-17 33-98 115-136 139-29 18-51 22-113 22-71 1-80-2-115-30-21-17-86-28-99-128-7-56 0-176 0-176s18-102-6-175c-19-57-81-86-123-20-19 30-43 60-54 67-18 12-18 13 6 59 34 67 38 144 14 260l-20 95 24 35c13 20 40 51 59 70 40 38 41 50 29 252-6 92-9 107-25 111-10 3-19 12-19 20s-7 18-17 20c-32 10-87 15-105 10zm-1228-1255c0-18-2-19-16-8-12 10-13 15-3 21 18 11 18 11 18-13zm743 1151c-12-5-23-14-23-20 0-17 57-69 76-69 21 0 130-65 167-99 47-43 36-101-38-198-30-39-73-148-63-158 2-2 30-5 63-7l60-3 32 60c41 77 38 69 63 145 40 115 41 112-31 
 166-34 27-79 62-98 79-20 17-43 34-53 38-10 3-22 17-27 30-5 14-13 27-17 29-19 12-90 16-111 7zm-913-440c0-23 28-113 44-145 6-11 32-51 57-90 26-39 50-81 53-95 5-21 22-30 103-59 53-19 102-36 108-38 6-2 18 11 27 30l16 34-92 28c-105 32-126 47-161 122-16 34-35 58-50 63-32 13-40 42-22 85l15 36-37 25c-45 30-62 31-62 4zm-48-843c-41-18-25-52 19-39 21 6 23 10 14 28-9 17-15 19-33 11zm-74-25c-28-6-31-32-4-32 13 0 26 4 29 8 8 13-8 28-25 24zm-78-37c0-9 6-12 15-9 19 7 19 24 0 24-8 0-15-7-15-15zm-50-15c0-5 7-7 15-4 19 7 19 14 0 14-8 0-15-4-15-10z&quot;/&gt;&lt;/svg&gt;';
+
+function checkFetchResponse(url, data, mime, desc) {
+  if (!desc) {
+    var cut = (url.length &gt;= 45) ? &quot;[...]&quot; : &quot;&quot;;
+    desc = &quot;Fetching &quot; + url.substring(0, 45) + cut + &quot; is OK&quot;
+  }
+  promise_test(function(test) {
+    return fetch(url).then(function(resp) {
+     assert_equals(resp.status, 200, &quot;HTTP status is 200&quot;);
+     assert_equals(resp.type, &quot;basic&quot;, &quot;response type is basic&quot;);
+     assert_equals(resp.headers.get(&quot;Content-Type&quot;), mime, &quot;Content-Type is &quot; + resp.headers.get(&quot;Content-Type&quot;));
+     return resp.text();
+    }).then(function(bodyAsText) {
+      assert_equals(bodyAsText, data, &quot;Response's body is &quot; + data);
+    })
+  }, desc);
+}
+
+checkFetchResponse(&quot;about:blank&quot;, &quot;&quot;, &quot;text/html;charset=utf-8&quot;);
+checkFetchResponse(&quot;about:unicorn&quot;, unicorn, &quot;image/svg+xml&quot;);
+
+function checkKoUrl(url, desc) {
+  if (!desc)
+    desc = &quot;Fetching &quot; + url.substring(0, 45) + &quot; is KO&quot;
+  promise_test(function(test) {
+    var promise = fetch(url);
+    return promise_rejects(test, new TypeError(), promise);
+  }, desc);
+}
+
+checkKoUrl(&quot;about:invalid.com&quot;);
+checkKoUrl(&quot;about:config&quot;);
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+FAIL Fetching blob:http://localhost:8800/4580501e-3c0f-4b03[...] is OK promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetching [GET] blob:http://www.localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching [POST] blob:http://localhost:8800/ad829fe3-9045-4b29[...] is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+
+FAIL Fetching blob:http://localhost:8800/8807dca8-91bf-4414[...] is OK promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetching [GET] blob:http://www.localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching [POST] blob:http://localhost:8800/41805be3-d8cc-490f[...] is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch in worker: blob scheme&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#basic-fetch&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script&gt;
+      fetch_tests_from_worker(new Worker(&quot;scheme-blob.js?pipe=sub&quot;));
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch: blob scheme&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#basic-fetch&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;scheme-blob.js?pipe=sub&quot;&gt;&lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeblobjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.js (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.js        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+if (this.document === undefined) {
+  importScripts(&quot;/resources/testharness.js&quot;);
+  importScripts(&quot;../resources/utils.js&quot;);
+}
+
+function checkFetchResponse(url, data, mime, size, desc) {
+  if (!desc)
+    var cut = (url.length &gt;= 45) ? &quot;[...]&quot; : &quot;&quot;;
+    desc = &quot;Fetching &quot; + url.substring(0, 45) + cut + &quot; is OK&quot;
+  promise_test(function(test) {
+    size = size.toString();
+    return fetch(url).then(function(resp) {
+      assert_equals(resp.status, 200, &quot;HTTP status is 200&quot;);
+      assert_equals(resp.type, &quot;basic&quot;, &quot;response type is basic&quot;);
+      assert_equals(resp.headers.get(&quot;Content-Type&quot;), mime, &quot;Content-Type is &quot; + resp.headers.get(&quot;Content-Type&quot;));
+      assert_equals(resp.headers.get(&quot;Content-Length&quot;), size, &quot;Content-Length is &quot; + resp.headers.get(&quot;Content-Length&quot;));
+      return resp.text();
+    }).then(function(bodyAsText) {
+      assert_equals(bodyAsText, data, &quot;Response's body is &quot; + data);
+    })
+  }, desc);
+}
+
+var blob = new Blob([&quot;Blob's data&quot;], { &quot;type&quot; : &quot;text/plain&quot; });
+checkFetchResponse(URL.createObjectURL(blob), &quot;Blob's data&quot;, &quot;text/plain&quot;,  blob.size);
+
+function checkKoUrl(url, method, desc) {
+  if (!desc)
+    var cut = (url.length &gt;= 45) ? &quot;[...]&quot; : &quot;&quot;;
+    desc = &quot;Fetching [&quot; + method + &quot;] &quot; + url.substring(0, 45) + cut +  &quot; is KO&quot;
+  promise_test(function(test) {
+    var promise = fetch(url, {&quot;method&quot;: method});
+    return promise_rejects(test, new TypeError(), promise);
+  }, desc);
+}
+
+var blob2 = new Blob([&quot;Blob's data&quot;], { &quot;type&quot; : &quot;text/plain&quot; });
+checkKoUrl(&quot;blob:http://{{domains[www]}}:{{ports[http][0]}}/&quot;, &quot;GET&quot;);
+checkKoUrl(URL.createObjectURL(blob2), &quot;POST&quot;);
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemedataexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+FAIL Fetching data:,response%27s%20body is OK promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetching data:text/plain;base64,cmVzcG9uc2UncyBib[...] is OK promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetching data:image/png;base64,cmVzcG9uc2UncyBib2[...] is OK promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetching [GET] data:notAdataUrl.com is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching [POST] data:,response%27s%20body is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching [HEAD] data:,response%27s%20body is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemedataworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+
+FAIL Fetching data:,response%27s%20body is OK promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetching data:text/plain;base64,cmVzcG9uc2UncyBib[...] is OK promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetching data:image/png;base64,cmVzcG9uc2UncyBib2[...] is OK promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+FAIL Fetching [GET] data:notAdataUrl.com is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching [POST] data:,response%27s%20body is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching [HEAD] data:,response%27s%20body is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemedataworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch in worker: data scheme&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#basic-fetch&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script&gt;
+      fetch_tests_from_worker(new Worker(&quot;scheme-data.js&quot;));
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemedatahtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch: data scheme&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#basic-fetch&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;scheme-data.js&quot;&gt;&lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemedatajs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.js (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.js        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+if (this.document === undefined) {
+  importScripts(&quot;/resources/testharness.js&quot;);
+  importScripts(&quot;../resources/utils.js&quot;);
+}
+
+function checkFetchResponse(url, data, mime) {
+  var cut = (url.length &gt;= 40) ? &quot;[...]&quot; : &quot;&quot;;
+  desc = &quot;Fetching &quot; + url.substring(0, 40) + cut + &quot; is OK&quot;
+  promise_test(function(test) {
+    return fetch(url).then(function(resp) {
+      assert_equals(resp.status, 200, &quot;HTTP status is 200&quot;);
+      assert_equals(resp.type, &quot;basic&quot;, &quot;response type is basic&quot;);
+      assert_equals(resp.headers.get(&quot;Content-Type&quot;), mime, &quot;Content-Type is &quot; + resp.headers.get(&quot;Content-Type&quot;));
+     return resp.text();
+    }).then(function(body) {
+        assert_equals(body, data, &quot;Response's body is correct&quot;);
+    });
+  }, desc);
+}
+
+checkFetchResponse(&quot;data:,response%27s%20body&quot;, &quot;response's body&quot;, &quot;text/plain;charset=US-ASCII&quot;);
+checkFetchResponse(&quot;data:text/plain;base64,cmVzcG9uc2UncyBib2R5&quot;, &quot;response's body&quot;, &quot;text/plain&quot;);
+checkFetchResponse(&quot;data:image/png;base64,cmVzcG9uc2UncyBib2R5&quot;,
+                   &quot;response's body&quot;,
+                   &quot;image/png&quot;);
+
+function checkKoUrl(url, method, desc) {
+  var cut = (url.length &gt;= 40) ? &quot;[...]&quot; : &quot;&quot;;
+  desc = &quot;Fetching [&quot; + method + &quot;] &quot; + url.substring(0, 45) + cut + &quot; is KO&quot;
+  promise_test(function(test) {
+    return promise_rejects(test, new TypeError(), fetch(url, {&quot;method&quot;: method}));
+  }, desc);
+}
+
+checkKoUrl(&quot;data:notAdataUrl.com&quot;, &quot;GET&quot;);
+checkKoUrl(&quot;data:,response%27s%20body&quot;, &quot;POST&quot;);
+checkKoUrl(&quot;data:,response%27s%20body&quot;, &quot;HEAD&quot;);
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeothersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+
+FAIL Fetching aaa://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching cap://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching cid://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching dav://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching dict://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching dns://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching geo://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching im://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching imap://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching ipp://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching ldap://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching mailto://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching nfs://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching pop://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching rtsp://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching snmp://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeothersworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+
+FAIL Fetching aaa://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching cap://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching cid://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching dav://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching dict://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching dns://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching geo://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching im://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching imap://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching ipp://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching ldap://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching mailto://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching nfs://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching pop://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching rtsp://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+FAIL Fetching snmp://localhost:8800/ is KO assert_throws: function &quot;function () { throw e }&quot; threw &quot;Fetch is not yet implemented&quot; (undefined) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeothersworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch in worker: urls with unsupported schemes&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#basic-fetch&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script&gt;
+      fetch_tests_from_worker(new Worker(&quot;scheme-others.js?pipe=sub&quot;));
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeothershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch: urls with unsupported schemes&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#basic-fetch&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;scheme-others.js?pipe=sub&quot;&gt;&lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicschemeothersjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.js (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.js        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+if (this.document === undefined) {
+  importScripts(&quot;/resources/testharness.js&quot;);
+  importScripts(&quot;../resources/utils.js&quot;);
+}
+
+function checkKoUrl(url, desc) {
+  if (!desc)
+    desc = &quot;Fetching &quot; + url.substring(0, 45) + &quot; is KO&quot;
+  promise_test(function(test) {
+    var promise = fetch(url);
+    return promise_rejects(test, new TypeError(), promise);
+  }, desc);
+}
+
+var urlWithoutScheme = &quot;://{{host}}:{{ports[http][0]}}/&quot;;
+checkKoUrl(&quot;aaa&quot; + urlWithoutScheme);
+checkKoUrl(&quot;cap&quot; + urlWithoutScheme);
+checkKoUrl(&quot;cid&quot; + urlWithoutScheme);
+checkKoUrl(&quot;dav&quot; + urlWithoutScheme);
+checkKoUrl(&quot;dict&quot; + urlWithoutScheme);
+checkKoUrl(&quot;dns&quot; + urlWithoutScheme);
+checkKoUrl(&quot;geo&quot; + urlWithoutScheme);
+checkKoUrl(&quot;im&quot; + urlWithoutScheme);
+checkKoUrl(&quot;imap&quot; + urlWithoutScheme);
+checkKoUrl(&quot;ipp&quot; + urlWithoutScheme);
+checkKoUrl(&quot;ldap&quot; + urlWithoutScheme);
+checkKoUrl(&quot;mailto&quot; + urlWithoutScheme);
+checkKoUrl(&quot;nfs&quot; + urlWithoutScheme);
+checkKoUrl(&quot;pop&quot; + urlWithoutScheme);
+checkKoUrl(&quot;rtsp&quot; + urlWithoutScheme);
+checkKoUrl(&quot;snmp&quot; + urlWithoutScheme);
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicstreamresponseexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+FAIL Stream response's body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicstreamresponseworkerexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker-expected.txt (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker-expected.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+FAIL Stream response's body promise_test: Unhandled rejection with value: &quot;Fetch is not yet implemented&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicstreamresponseworkerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch in worker: retrieve response's body progressively&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#http-fetch&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script&gt;
+      fetch_tests_from_worker(new Worker(&quot;stream-response.js&quot;));
+    &lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicstreamresponsehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response.html (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response.html        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;title&gt;Fetch: retrieve response's body progressively&lt;/title&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#main-fetch&quot;&gt;
+    &lt;meta name=&quot;help&quot; href=&quot;https://fetch.spec.whatwg.org/#http-fetch&quot;&gt;
+    &lt;meta name=&quot;author&quot; title=&quot;Canon Research France&quot; href=&quot;https://www.crf.canon.fr&quot;&gt;
+    &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;script src=&quot;../resources/utils.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;stream-response.js&quot;&gt;&lt;/script&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicstreamresponsejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response.js (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response.js                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response.js        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+if (this.document === undefined) {
+  importScripts(&quot;/resources/testharness.js&quot;);
+  importScripts(&quot;../resources/utils.js&quot;);
+}
+
+function streamBody(reader, test, count) {
+  return reader.read().then(function(data) {
+    if (!data.done &amp;&amp; count &lt; 2) {
+      count += 1;
+      return streamBody(reader, test, count);
+    } else {
+      test.step(function() {
+        assert_true(count &gt;= 2, &quot;Retrieve body progressively&quot;);
+      });
+    }
+  });
+}
+
+//simulate streaming:
+//count is large enough to let the UA deliver the body before it is completely retrieved
+promise_test(function(test) {
+  return fetch(RESOURCES_DIR + &quot;trickle.py?ms=30&amp;count=100&quot;).then(function(resp) {
+    var count = 0;
+    if (resp.body)
+      return streamBody(resp.body.getReader(), test, count);
+    else
+      test.step(function() {
+        assert_unreached( &quot;Body does not exist in response&quot;);
+      });
+  });
+}, &quot;Stream response's body&quot;);
+
+done();
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsfetchapibasicw3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/w3c-import.log (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/w3c-import.log                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/w3c-import.log        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in Webkit.
+Instead, create a pull request on the W3C CSS or WPT github:
+        https://github.com/w3c/csswg-test
+        https://github.com/w3c/web-platform-tests
+
+Then run the Tools/Scripts/import-w3c-tests in Webkit to reimport
+
+Do NOT modify or remove this file
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/request-headers.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.js
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response.html
+/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/stream-response.js
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (197747 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-03-08 09:44:37 UTC (rev 197747)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -165,10 +165,12 @@
</span><span class="cx">     Modules/battery/BatteryManager.idl
</span><span class="cx">     Modules/battery/NavigatorBattery.idl
</span><span class="cx"> 
</span><ins>+    Modules/fetch/DOMWindowFetch.idl
</ins><span class="cx">     Modules/fetch/FetchBody.idl
</span><span class="cx">     Modules/fetch/FetchHeaders.idl
</span><span class="cx">     Modules/fetch/FetchRequest.idl
</span><span class="cx">     Modules/fetch/FetchResponse.idl
</span><ins>+    Modules/fetch/WorkerGlobalScopeFetch.idl
</ins><span class="cx"> 
</span><span class="cx">     Modules/geolocation/Coordinates.idl
</span><span class="cx">     Modules/geolocation/Geolocation.idl
</span><span class="lines">@@ -812,10 +814,12 @@
</span><span class="cx">     Modules/battery/BatteryStatus.cpp
</span><span class="cx">     Modules/battery/NavigatorBattery.cpp
</span><span class="cx"> 
</span><ins>+    Modules/fetch/DOMWindowFetch.cpp
</ins><span class="cx">     Modules/fetch/FetchBody.cpp
</span><span class="cx">     Modules/fetch/FetchHeaders.cpp
</span><span class="cx">     Modules/fetch/FetchRequest.cpp
</span><span class="cx">     Modules/fetch/FetchResponse.cpp
</span><ins>+    Modules/fetch/WorkerGlobalScopeFetch.cpp
</ins><span class="cx"> 
</span><span class="cx">     Modules/geolocation/Coordinates.cpp
</span><span class="cx">     Modules/geolocation/GeoNotifier.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (197747 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-08 09:44:37 UTC (rev 197747)
+++ trunk/Source/WebCore/ChangeLog        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -1,5 +1,84 @@
</span><span class="cx"> 2016-03-08  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><ins>+        [Fetch API] Implement fetch skeleton
+        https://bugs.webkit.org/show_bug.cgi?id=155111
+
+        Reviewed by Darin Adler.
+
+        Adding skeleton code to call fetch API from normal and worker scopes.
+        Fetch API implementation is limited to reject the promise.
+
+        Updating the binding generator to fix the case of overloaded promise-returning functions.
+        Made overloaded utility functions &quot;static inline&quot;.
+
+        Tests: imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker.html
+               imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html
+               imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html
+               imported/w3c/web-platform-tests/fetch/api/basic/integrity.html
+               imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html
+               imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html
+               imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker.html
+               imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.html
+               imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker.html
+               imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.html
+               imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html
+               imported/w3c/web-platform-tests/fetch/api/basic/request-headers.html
+               imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker.html
+               imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.html
+               imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html
+               imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html
+               imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker.html
+               imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.html
+               imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html
+               imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html
+               imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker.html
+               imported/w3c/web-platform-tests/fetch/api/basic/stream-response.html
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * Modules/fetch/DOMWindowFetch.cpp: Added.
+        (WebCore::DOMWindowFetch::fetch):
+        * Modules/fetch/DOMWindowFetch.h: Added.
+        * Modules/fetch/DOMWindowFetch.idl: Added.
+        * Modules/fetch/WorkerGlobalScopeFetch.cpp: Added.
+        (WebCore::WorkerGlobalScopeFetch::fetch):
+        * Modules/fetch/WorkerGlobalScopeFetch.h: Added.
+        * Modules/fetch/WorkerGlobalScopeFetch.idl: Added.
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation): Fixing the case of overloaded promise-returning functions.
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
+        (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
+        (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
+        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1):
+        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise):
+        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2):
+        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
+        (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Deleted.
+        (WebCore::jsTestObjConstructorFunctionClassMethod2): Deleted.
+        (WebCore::jsTestObjPrototypeFunctionAny): Deleted.
+        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise): Deleted.
+        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise): Deleted.
+        (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise): Deleted.
+        * bindings/scripts/test/TestObj.idl:
+
+2016-03-08  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
+
</ins><span class="cx">         [Fetch API] Make FetchRequest and FetchResponse ActiveDOMObject
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=154729
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (197747 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2016-03-08 09:44:37 UTC (rev 197747)
+++ trunk/Source/WebCore/DerivedSources.make        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -80,10 +80,12 @@
</span><span class="cx">     $(WebCore)/Modules/encryptedmedia/MediaKeyNeededEvent.idl \
</span><span class="cx">     $(WebCore)/Modules/encryptedmedia/MediaKeySession.idl \
</span><span class="cx">     $(WebCore)/Modules/encryptedmedia/MediaKeys.idl \
</span><ins>+    $(WebCore)/Modules/fetch/DOMWindowFetch.idl \
</ins><span class="cx">     $(WebCore)/Modules/fetch/FetchBody.idl \
</span><span class="cx">     $(WebCore)/Modules/fetch/FetchHeaders.idl \
</span><span class="cx">     $(WebCore)/Modules/fetch/FetchRequest.idl \
</span><span class="cx">     $(WebCore)/Modules/fetch/FetchResponse.idl \
</span><ins>+    $(WebCore)/Modules/fetch/WorkerGlobalScopeFetch.idl \
</ins><span class="cx">     $(WebCore)/Modules/gamepad/Gamepad.idl \
</span><span class="cx">     $(WebCore)/Modules/gamepad/GamepadButton.idl \
</span><span class="cx">     $(WebCore)/Modules/gamepad/GamepadEvent.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchDOMWindowFetchcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/fetch/DOMWindowFetch.cpp (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/DOMWindowFetch.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/fetch/DOMWindowFetch.cpp        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2016 Canon Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted, provided that the following conditions
+ * are required to be met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Canon Inc. nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;DOMWindowFetch.h&quot;
+
+#if ENABLE(FETCH_API)
+
+namespace WebCore {
+
+void DOMWindowFetch::fetch(DOMWindow&amp;, FetchRequest*, const Dictionary&amp;, FetchPromise&amp;&amp; promise)
+{
+    promise.reject(ASCIILiteral(&quot;Fetch is not yet implemented&quot;));
+}
+
+void DOMWindowFetch::fetch(DOMWindow&amp;, const String&amp;, const Dictionary&amp;, FetchPromise&amp;&amp; promise)
+{
+    promise.reject(ASCIILiteral(&quot;Fetch is not yet implemented&quot;));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FETCH_API)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchDOMWindowFetchh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/fetch/DOMWindowFetch.h (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/DOMWindowFetch.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/fetch/DOMWindowFetch.h        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+/*
+ * Copyright (C) 2016 Canon Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted, provided that the following conditions
+ * are required to be met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Canon Inc. nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef DOMWindowFetch_h
+#define DOMWindowFetch_h
+
+#if ENABLE(FETCH_API)
+
+#include &quot;JSDOMPromise.h&quot;
+
+namespace WebCore {
+
+class Dictionary;
+class FetchRequest;
+class FetchResponse;
+
+class DOMWindowFetch {
+public:
+    using FetchPromise = DOMPromise&lt;RefPtr&lt;FetchResponse&gt;, String&gt;;
+    static void fetch(DOMWindow&amp;, FetchRequest*, const Dictionary&amp;, FetchPromise&amp;&amp;);
+    static void fetch(DOMWindow&amp;, const String&amp;, const Dictionary&amp;, FetchPromise&amp;&amp;);
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(FETCH_API)
+
+#endif // DOMWindowFetch_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchDOMWindowFetchidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/fetch/DOMWindowFetch.idl (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/DOMWindowFetch.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/fetch/DOMWindowFetch.idl        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2016 Canon Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted, provided that the following conditions
+ * are required to be met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Canon Inc. nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=FETCH_API,
+] partial interface DOMWindow {
+    Promise fetch(DOMString input, optional Dictionary init);
+    Promise fetch(FetchRequest input, optional Dictionary init);
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchWorkerGlobalScopeFetchcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.cpp (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.cpp        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2016 Canon Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted, provided that the following conditions
+ * are required to be met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Canon Inc. nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WorkerGlobalScopeFetch.h&quot;
+
+#if ENABLE(FETCH_API)
+
+namespace WebCore {
+
+void WorkerGlobalScopeFetch::fetch(WorkerGlobalScope&amp;, FetchRequest*, const Dictionary&amp;, FetchPromise&amp;&amp; promise)
+{
+    promise.reject(ASCIILiteral(&quot;Fetch is not yet implemented&quot;));
+}
+
+void WorkerGlobalScopeFetch::fetch(WorkerGlobalScope&amp;, const String&amp;, const Dictionary&amp;, FetchPromise&amp;&amp; promise)
+{
+    promise.reject(ASCIILiteral(&quot;Fetch is not yet implemented&quot;));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FETCH_API)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchWorkerGlobalScopeFetchh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.h (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.h                                (rev 0)
+++ trunk/Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.h        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2016 Canon Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted, provided that the following conditions
+ * are required to be met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Canon Inc. nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef WorkerGlobalScopeFetch_h
+#define WorkerGlobalScopeFetch_h
+
+#if ENABLE(FETCH_API)
+
+#include &quot;JSDOMPromise.h&quot;
+
+namespace WebCore {
+
+class Dictionary;
+class FetchRequest;
+class FetchResponse;
+class ScriptExecutionContext;
+class WorkerGlobalScope;
+
+class WorkerGlobalScopeFetch {
+public:
+    using FetchPromise = DOMPromise&lt;RefPtr&lt;FetchResponse&gt;, String&gt;;
+    static void fetch(WorkerGlobalScope&amp;, FetchRequest*, const Dictionary&amp;, FetchPromise&amp;&amp;);
+    static void fetch(WorkerGlobalScope&amp;, const String&amp;, const Dictionary&amp;, FetchPromise&amp;&amp;);
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(FETCH_API)
+
+#endif // WorkerGlobalScopeFetch_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchWorkerGlobalScopeFetchidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.idl (0 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.idl                                (rev 0)
+++ trunk/Source/WebCore/Modules/fetch/WorkerGlobalScopeFetch.idl        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2016 Canon Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted, provided that the following conditions
+ * are required to be met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Canon Inc. nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=FETCH_API,
+] partial interface WorkerGlobalScope {
+    Promise fetch(DOMString input, optional Dictionary init);
+    Promise fetch(FetchRequest input, optional Dictionary init);
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (197747 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-03-08 09:44:37 UTC (rev 197747)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -1553,6 +1553,8 @@
</span><span class="cx">                 41885B9411B6FDA6003383BB /* FormSubmission.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41885B9211B6FDA6003383BB /* FormSubmission.cpp */; };
</span><span class="cx">                 418A06D0133C04D500CD379C /* EventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 418A06CE133C04D500CD379C /* EventDispatcher.h */; };
</span><span class="cx">                 418A06D1133C04D500CD379C /* EventDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418A06CF133C04D500CD379C /* EventDispatcher.cpp */; };
</span><ins>+                418C39561C8DAC7F0051C8A3 /* DOMWindowFetch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418C39521C8DAC7B0051C8A3 /* DOMWindowFetch.cpp */; };
+                418C395A1C8DD6990051C8A3 /* WorkerGlobalScopeFetch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418C39571C8DD6960051C8A3 /* WorkerGlobalScopeFetch.cpp */; };
</ins><span class="cx">                 418F88040FF957AE0080F045 /* JSAbstractWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418F88020FF957AE0080F045 /* JSAbstractWorker.cpp */; };
</span><span class="cx">                 418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 418F88030FF957AE0080F045 /* JSAbstractWorker.h */; };
</span><span class="cx">                 419BC2DE1685329900D64D6D /* VisitedLinkState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 419BC2DC1685329900D64D6D /* VisitedLinkState.cpp */; };
</span><span class="lines">@@ -9029,6 +9031,12 @@
</span><span class="cx">                 41885B9211B6FDA6003383BB /* FormSubmission.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormSubmission.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 418A06CE133C04D500CD379C /* EventDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventDispatcher.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 418A06CF133C04D500CD379C /* EventDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventDispatcher.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                418C39521C8DAC7B0051C8A3 /* DOMWindowFetch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowFetch.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                418C39531C8DAC7B0051C8A3 /* DOMWindowFetch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindowFetch.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                418C39541C8DAC7B0051C8A3 /* DOMWindowFetch.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMWindowFetch.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
+                418C39571C8DD6960051C8A3 /* WorkerGlobalScopeFetch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkerGlobalScopeFetch.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                418C39581C8DD6960051C8A3 /* WorkerGlobalScopeFetch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerGlobalScopeFetch.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                418C39591C8DD6960051C8A3 /* WorkerGlobalScopeFetch.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WorkerGlobalScopeFetch.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 418F88020FF957AE0080F045 /* JSAbstractWorker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAbstractWorker.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 418F88030FF957AE0080F045 /* JSAbstractWorker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAbstractWorker.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 419BC2DC1685329900D64D6D /* VisitedLinkState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisitedLinkState.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16809,6 +16817,9 @@
</span><span class="cx">                 41F54F7C1C50C4F600338488 /* fetch */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                418C39521C8DAC7B0051C8A3 /* DOMWindowFetch.cpp */,
+                                418C39531C8DAC7B0051C8A3 /* DOMWindowFetch.h */,
+                                418C39541C8DAC7B0051C8A3 /* DOMWindowFetch.idl */,
</ins><span class="cx">                                 41F54F7D1C50C4F600338488 /* FetchBody.cpp */,
</span><span class="cx">                                 41F54F7E1C50C4F600338488 /* FetchBody.h */,
</span><span class="cx">                                 41F54F7F1C50C4F600338488 /* FetchBody.idl */,
</span><span class="lines">@@ -16824,6 +16835,9 @@
</span><span class="cx">                                 413015D61C7B570400091C6E /* FetchResponse.h */,
</span><span class="cx">                                 413015D71C7B570400091C6E /* FetchResponse.idl */,
</span><span class="cx">                                 413015D81C7B570400091C6E /* FetchResponse.js */,
</span><ins>+                                418C39571C8DD6960051C8A3 /* WorkerGlobalScopeFetch.cpp */,
+                                418C39581C8DD6960051C8A3 /* WorkerGlobalScopeFetch.h */,
+                                418C39591C8DD6960051C8A3 /* WorkerGlobalScopeFetch.idl */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = fetch;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -26297,7 +26311,6 @@
</span><span class="cx">                                 5148453F1BB9D07E006A72ED /* IDBError.h in Headers */,
</span><span class="cx">                                 5185FC8B1BB4C4E80012898F /* IDBEventDispatcher.h in Headers */,
</span><span class="cx">                                 5185FC8D1BB4C4E80012898F /* IDBFactory.h in Headers */,
</span><del>-                                51F41A721BA73B5B002E053B /* IDBFactoryBackendInterface.h in Headers */,
</del><span class="cx">                                 69A6CBAD1C6BE42C00B836E9 /* AccessibilitySVGElement.h in Headers */,
</span><span class="cx">                                 510310501BA8CC03003329C0 /* IDBFactoryImpl.h in Headers */,
</span><span class="cx">                                 5185FC8F1BB4C4E80012898F /* IDBGetResult.h in Headers */,
</span><span class="lines">@@ -29014,6 +29027,7 @@
</span><span class="cx">                                 FD31607D12B026F700C1A359 /* AudioChannel.cpp in Sources */,
</span><span class="cx">                                 FD31600412B0267600C1A359 /* AudioContext.cpp in Sources */,
</span><span class="cx">                                 CD0EEE0E14743F39003EAFA2 /* AudioDestinationIOS.cpp in Sources */,
</span><ins>+                                418C39561C8DAC7F0051C8A3 /* DOMWindowFetch.cpp in Sources */,
</ins><span class="cx">                                 FD3160BC12B0272A00C1A359 /* AudioDestinationMac.cpp in Sources */,
</span><span class="cx">                                 FD31600712B0267600C1A359 /* AudioDestinationNode.cpp in Sources */,
</span><span class="cx">                                 FD31608112B026F700C1A359 /* AudioDSPKernelProcessor.cpp in Sources */,
</span><span class="lines">@@ -29869,6 +29883,7 @@
</span><span class="cx">                                 A871DE250A152AC800B12A68 /* HTMLHeadElement.cpp in Sources */,
</span><span class="cx">                                 A8EA7CAE0A192B9C00A8EF5F /* HTMLHeadingElement.cpp in Sources */,
</span><span class="cx">                                 A8EA7CB30A192B9C00A8EF5F /* HTMLHRElement.cpp in Sources */,
</span><ins>+                                418C395A1C8DD6990051C8A3 /* WorkerGlobalScopeFetch.cpp in Sources */,
</ins><span class="cx">                                 A871DE260A152AC800B12A68 /* HTMLHtmlElement.cpp in Sources */,
</span><span class="cx">                                 A871DE240A152AC800B12A68 /* HTMLIFrameElement.cpp in Sources */,
</span><span class="cx">                                 A8EA7D310A19385500A8EF5F /* HTMLImageElement.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (197747 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-03-08 09:44:37 UTC (rev 197747)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -2882,13 +2882,12 @@
</span><span class="cx">                 push(@implContent, &quot;#if ${conditionalString}\n&quot;);
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-
</del><ins>+            my $functionReturn = &quot;EncodedJSValue JSC_HOST_CALL&quot;;
</ins><span class="cx">             if (!$isCustom &amp;&amp; $isOverloaded) {
</span><span class="cx">                 # Append a number to an overloaded method's name to make it unique:
</span><span class="cx">                 $functionName = $functionName . $function-&gt;{overloadIndex};
</span><del>-                # Make this function static to avoid compiler warnings, since we
-                # don't generate a prototype for it in the header.
-                push(@implContent, &quot;static &quot;);
</del><ins>+                # Make this function static to avoid compiler warnings, since we don't generate a prototype for it in the header.
+                $functionReturn = &quot;static inline EncodedJSValue&quot;;
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             my $functionImplementationName = $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;ImplementedAs&quot;} || $codeGenerator-&gt;WK_lcfirst($function-&gt;signature-&gt;name);
</span><span class="lines">@@ -2896,17 +2895,18 @@
</span><span class="cx">             if (IsReturningPromise($function) &amp;&amp; !$isCustom) {
</span><span class="cx">                 AddToImplIncludes(&quot;JSDOMPromise.h&quot;);
</span><span class="cx"> 
</span><del>-                push(@implContent, &quot;static inline EncodedJSValue ${functionName}Promise(ExecState*, JSPromiseDeferred*);\n&quot;);
-                push(@implContent, &quot;EncodedJSValue JSC_HOST_CALL ${functionName}(ExecState* state)\n&quot;);
-                push(@implContent, &quot;{\n&quot;);
</del><ins>+                push(@implContent, &lt;&lt;END);
+static EncodedJSValue ${functionName}Promise(ExecState*, JSPromiseDeferred*);
+${functionReturn} ${functionName}(ExecState* state)
+{
+    return JSValue::encode(callPromiseFunction(*state, ${functionName}Promise));
+}
</ins><span class="cx"> 
</span><del>-                push(@implContent, &quot;    return JSValue::encode(callPromiseFunction(*state, ${functionName}Promise));\n&quot;);
-
-                push(@implContent, &quot;}\n&quot;);
-                push(@implContent, &quot;\nstatic inline EncodedJSValue ${functionName}Promise(ExecState* state, JSPromiseDeferred* promiseDeferred)\n&quot;);
</del><ins>+static inline EncodedJSValue ${functionName}Promise(ExecState* state, JSPromiseDeferred* promiseDeferred)
+END
</ins><span class="cx">             }
</span><span class="cx">             else {
</span><del>-                push(@implContent, &quot;EncodedJSValue JSC_HOST_CALL ${functionName}(ExecState* state)\n&quot;);
</del><ins>+                push(@implContent, &quot;${functionReturn} ${functionName}(ExecState* state)\n&quot;);
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             push(@implContent, &quot;{\n&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (197747 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-03-08 09:44:37 UTC (rev 197747)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include &quot;JSDOMStringList.h&quot;
</span><span class="cx"> #include &quot;JSDocument.h&quot;
</span><span class="cx"> #include &quot;JSEventListener.h&quot;
</span><ins>+#include &quot;JSFetchRequest.h&quot;
</ins><span class="cx"> #include &quot;JSKeyValueIterator.h&quot;
</span><span class="cx"> #include &quot;JSNode.h&quot;
</span><span class="cx"> #include &quot;JSSVGDocument.h&quot;
</span><span class="lines">@@ -186,6 +187,7 @@
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithException(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument(JSC::ExecState*);
</span><ins>+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseOverloadedFunction(JSC::ExecState*);
</ins><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNeedsLifecycleProcessingStack(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSymbolIterator(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionEntries(JSC::ExecState*);
</span><span class="lines">@@ -715,6 +717,7 @@
</span><span class="cx">     { &quot;testPromiseFunctionWithFloatArgument&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument), (intptr_t) (1) } },
</span><span class="cx">     { &quot;testPromiseFunctionWithException&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionTestPromiseFunctionWithException), (intptr_t) (0) } },
</span><span class="cx">     { &quot;testPromiseFunctionWithOptionalIntArgument&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument), (intptr_t) (0) } },
</span><ins>+    { &quot;testPromiseOverloadedFunction&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionTestPromiseOverloadedFunction), (intptr_t) (1) } },
</ins><span class="cx">     { &quot;methodWithNeedsLifecycleProcessingStack&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithNeedsLifecycleProcessingStack), (intptr_t) (0) } },
</span><span class="cx">     { &quot;entries&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionEntries), (intptr_t) (0) } },
</span><span class="cx">     { &quot;keys&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionKeys), (intptr_t) (0) } },
</span><span class="lines">@@ -4128,7 +4131,7 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod1(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod1(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4148,7 +4151,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod2(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod2(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4175,7 +4178,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod3(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod3(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4192,7 +4195,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod4(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod4(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4209,7 +4212,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod5(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod5(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4226,7 +4229,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod6(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod6(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4243,7 +4246,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod7(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod7(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4260,7 +4263,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod8(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod8(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4277,7 +4280,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod9(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod9(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4294,7 +4297,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod10(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod10(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4311,7 +4314,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod11(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod11(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4328,7 +4331,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod12(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod12(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4380,7 +4383,7 @@
</span><span class="cx">     return throwVMTypeError(state);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4407,7 +4410,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="cx">     auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
</span><span class="lines">@@ -4478,7 +4481,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition1)
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod11(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjConstructorFunctionOverloadedMethod11(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="lines">@@ -4492,7 +4495,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition1)
</span><del>-static EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod12(ExecState* state)
</del><ins>+static inline EncodedJSValue jsTestObjConstructorFunctionOverloadedMethod12(ExecState* state)
</ins><span class="cx"> {
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="lines">@@ -4931,7 +4934,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionPromise(ExecState*, JSPromiseDeferred*);
</del><ins>+static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionPromise(ExecState*, JSPromiseDeferred*);
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunction(ExecState* state)
</span><span class="cx"> {
</span><span class="cx">     return JSValue::encode(callPromiseFunction(*state, jsTestObjPrototypeFunctionTestPromiseFunctionPromise));
</span><span class="lines">@@ -4949,7 +4952,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise(ExecState*, JSPromiseDeferred*);
</del><ins>+static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise(ExecState*, JSPromiseDeferred*);
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument(ExecState* state)
</span><span class="cx"> {
</span><span class="cx">     return JSValue::encode(callPromiseFunction(*state, jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise));
</span><span class="lines">@@ -4976,7 +4979,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise(ExecState*, JSPromiseDeferred*);
</del><ins>+static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise(ExecState*, JSPromiseDeferred*);
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithException(ExecState* state)
</span><span class="cx"> {
</span><span class="cx">     return JSValue::encode(callPromiseFunction(*state, jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise));
</span><span class="lines">@@ -4996,7 +4999,7 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise(ExecState*, JSPromiseDeferred*);
</del><ins>+static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise(ExecState*, JSPromiseDeferred*);
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument(ExecState* state)
</span><span class="cx"> {
</span><span class="cx">     return JSValue::encode(callPromiseFunction(*state, jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise));
</span><span class="lines">@@ -5024,6 +5027,69 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise(ExecState*, JSPromiseDeferred*);
+static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1(ExecState* state)
+{
+    return JSValue::encode(callPromiseFunction(*state, jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise));
+}
+
+static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise(ExecState* state, JSPromiseDeferred* promiseDeferred)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;testPromiseOverloadedFunction&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
+        return throwVMError(state, createNotEnoughArgumentsError(state));
+    float a = state-&gt;argument(0).toFloat(state);
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    if (!std::isfinite(a)) {
+        setDOMException(state, TypeError);
+        return JSValue::encode(jsUndefined());
+    }
+    impl.testPromiseOverloadedFunction(a, DeferredWrapper(state, castedThis-&gt;globalObject(), promiseDeferred));
+    return JSValue::encode(jsUndefined());
+}
+
+static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise(ExecState*, JSPromiseDeferred*);
+static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2(ExecState* state)
+{
+    return JSValue::encode(callPromiseFunction(*state, jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise));
+}
+
+static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise(ExecState* state, JSPromiseDeferred* promiseDeferred)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;testPromiseOverloadedFunction&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
+        return throwVMError(state, createNotEnoughArgumentsError(state));
+    FetchRequest* request = JSFetchRequest::toWrapped(state-&gt;argument(0));
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.testPromiseOverloadedFunction(request, DeferredWrapper(state, castedThis-&gt;globalObject(), promiseDeferred));
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseOverloadedFunction(ExecState* state)
+{
+    size_t argsCount = std::min&lt;size_t&gt;(1, state-&gt;argumentCount());
+    if (argsCount == 1)
+        return jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1(state);
+    JSValue arg0(state-&gt;argument(0));
+    if ((argsCount == 1 &amp;&amp; ((arg0.isObject() &amp;&amp; asObject(arg0)-&gt;inherits(JSFetchRequest::info())))))
+        return jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2(state);
+    if (argsCount &lt; 1)
+        return throwVMError(state, createNotEnoughArgumentsError(state));
+    return throwVMTypeError(state);
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNeedsLifecycleProcessingStack(ExecState* state)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(CUSTOM_ELEMENTS)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (197747 => 197748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-03-08 09:44:37 UTC (rev 197747)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-03-08 09:46:27 UTC (rev 197748)
</span><span class="lines">@@ -328,6 +328,8 @@
</span><span class="cx">     Promise testPromiseFunctionWithFloatArgument(float a);
</span><span class="cx">     [RaisesException] Promise testPromiseFunctionWithException();
</span><span class="cx">     Promise testPromiseFunctionWithOptionalIntArgument(optional long a);
</span><ins>+    Promise testPromiseOverloadedFunction(float a);
+    Promise testPromiseOverloadedFunction(FetchRequest request);
</ins><span class="cx"> 
</span><span class="cx">     // PutForwards
</span><span class="cx">     [PutForwards=name] readonly attribute TestNode putForwardsAttribute;
</span></span></pre>
</div>
</div>

</body>
</html>