⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 230330 in webkit


Ignore:
Timestamp:
Apr 6, 2018, 8:53:16 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Sync 2dcontext, FileAPI, IndexedDB, background-fetch, credential-management, custom-elements, dom, encoding, and fetch web-platform-tests to 94b33b573a069ae5170104ca581a354a35762536
​https://bugs.webkit.org/show_bug.cgi?id=184299

Patch by Brendan McLoughlin <​brendan@bocoup.com> on 2018-04-06
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/2dcontext/imagebitmap/common.sub.js:

(makeMakeHTMLImage.return.new.Promise): Deleted.

  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html:
  • web-platform-tests/FileAPI/BlobURL/support/file_test1.js: Removed.
  • web-platform-tests/FileAPI/BlobURL/support/file_test3.html: Removed.
  • web-platform-tests/FileAPI/FileReader/w3c-import.log:
  • web-platform-tests/FileAPI/blob/Blob-XHR-revoke-expected.txt: Removed.
  • web-platform-tests/FileAPI/blob/Blob-XHR-revoke.html: Removed.
  • web-platform-tests/FileAPI/blob/Blob-constructor-expected.txt:
  • web-platform-tests/FileAPI/blob/Blob-constructor.html:
  • web-platform-tests/FileAPI/blob/Blob-slice-overflow.html:
  • web-platform-tests/FileAPI/blob/w3c-import.log:
  • web-platform-tests/FileAPI/file/File-constructor-expected.txt:
  • web-platform-tests/FileAPI/file/File-constructor.html:
  • web-platform-tests/FileAPI/file/w3c-import.log:
  • web-platform-tests/FileAPI/url/blob-url-in-sandboxed-iframe-expected.txt: Removed.
  • web-platform-tests/FileAPI/url/blob-url-in-sandboxed-iframe.html: Removed.
  • web-platform-tests/FileAPI/url/cross-global-revoke.sub-expected.txt: Added.
  • web-platform-tests/FileAPI/url/cross-global-revoke.sub.html: Added.
  • web-platform-tests/FileAPI/url/resources/create-helper.html: Added.
  • web-platform-tests/FileAPI/url/resources/create-helper.js: Added.
  • web-platform-tests/FileAPI/url/resources/fetch-tests.js: Added.

(fetch_tests):

  • web-platform-tests/FileAPI/url/resources/revoke-helper.html: Added.
  • web-platform-tests/FileAPI/url/resources/revoke-helper.js: Added.
  • web-platform-tests/FileAPI/url/sandboxed-iframe-expected.txt: Added.
  • web-platform-tests/FileAPI/url/sandboxed-iframe.html: Added.
  • web-platform-tests/FileAPI/url/unicode-origin.sub-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/origin.sub-expected.txt.
  • web-platform-tests/FileAPI/url/unicode-origin.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/origin.sub.html.
  • web-platform-tests/FileAPI/url/url-format.any-expected.txt: Added.
  • web-platform-tests/FileAPI/url/url-format.any.html: Added.
  • web-platform-tests/FileAPI/url/url-format.any.js: Added.

(test):

  • web-platform-tests/FileAPI/url/url-format.any.worker-expected.txt: Added.
  • web-platform-tests/FileAPI/url/url-format.any.worker.html: Added.
  • web-platform-tests/FileAPI/url/url-in-tags.window.js: Added.

(async_test.t.e.onload.t.step_func_done):
(async_test.t.frame.onload.t.step_func_done):

  • web-platform-tests/FileAPI/url/url-lifetime-expected.txt: Added.
  • web-platform-tests/FileAPI/url/url-lifetime.html: Added.
  • web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt: Added.
  • web-platform-tests/FileAPI/url/url-with-fetch.any.html: Added.
  • web-platform-tests/FileAPI/url/url-with-fetch.any.js: Added.

(fetch_should_succeed):
(promise_test):

  • web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt: Added.
  • web-platform-tests/FileAPI/url/url-with-fetch.any.worker.html: Added.
  • web-platform-tests/FileAPI/url/url-with-xhr.any-expected.txt: Added.
  • web-platform-tests/FileAPI/url/url-with-xhr.any.html: Added.
  • web-platform-tests/FileAPI/url/url-with-xhr.any.js: Added.

(xhr_should_succeed):
(async_test.t.xhr.onloadend.t.step_func_done):
(async_test.t.xhr.onload.t.step_func_done):

  • web-platform-tests/FileAPI/url/url-with-xhr.any.worker-expected.txt: Added.
  • web-platform-tests/FileAPI/url/url-with-xhr.any.worker.html: Added.
  • web-platform-tests/FileAPI/url/url_createobjecturl_blob-expected.txt: Removed.
  • web-platform-tests/FileAPI/url/url_createobjecturl_blob.html: Removed.
  • web-platform-tests/FileAPI/url/url_xmlhttprequest.html: Removed.
  • web-platform-tests/FileAPI/url/url_xmlhttprequest_img.html:
  • web-platform-tests/FileAPI/url/w3c-import.log:
  • web-platform-tests/FileAPI/w3c-import.log:
  • web-platform-tests/IndexedDB/README.md:
  • web-platform-tests/IndexedDB/interleaved-cursors.html: Removed.
  • web-platform-tests/IndexedDB/w3c-import.log:
  • web-platform-tests/background-fetch/mixed-content-and-allowed-schemes.https.window.js:

(backgroundFetchTest):

  • web-platform-tests/background-fetch/w3c-import.log:
  • web-platform-tests/credential-management/credentialscontainer-create-basics.https-expected.txt:
  • web-platform-tests/credential-management/credentialscontainer-create-basics.https.html:
  • web-platform-tests/custom-elements/Document-createElement-expected.txt:
  • web-platform-tests/custom-elements/Document-createElement.html:
  • web-platform-tests/custom-elements/OWNERS:
  • web-platform-tests/custom-elements/attribute-changed-callback-expected.txt:
  • web-platform-tests/custom-elements/attribute-changed-callback.html:
  • web-platform-tests/custom-elements/custom-element-registry/w3c-import.log:
  • web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children-expected.txt:
  • web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children.html:
  • web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document-expected.txt:
  • web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document.html:
  • web-platform-tests/custom-elements/parser/w3c-import.log:
  • web-platform-tests/custom-elements/reactions/CSSStyleDeclaration-expected.txt:
  • web-platform-tests/custom-elements/reactions/CSSStyleDeclaration.html:
  • web-platform-tests/custom-elements/reactions/Document.html:
  • web-platform-tests/custom-elements/reactions/HTMLElement-expected.txt:
  • web-platform-tests/custom-elements/reactions/HTMLElement.html:
  • web-platform-tests/custom-elements/reactions/w3c-import.log:
  • web-platform-tests/custom-elements/resources/custom-elements-helpers.js:

(CustomElement):
(CustomElement.prototype.attributeChangedCallback):
(CustomElement.prototype.connectedCallback):
(CustomElement.prototype.disconnectedCallback):
(CustomElement.prototype.adoptedCallback):
(document_types.return.create): Deleted.
(document_types.create): Deleted.
(document_types.): Deleted.
(document_types): Deleted.

  • web-platform-tests/custom-elements/resources/w3c-import.log:
  • web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt:
  • web-platform-tests/custom-elements/upgrading/Node-cloneNode.html:
  • web-platform-tests/custom-elements/upgrading/w3c-import.log:
  • web-platform-tests/custom-elements/w3c-import.log:
  • web-platform-tests/dom/nodes/Element-classlist.html:
  • web-platform-tests/dom/nodes/w3c-import.log:
  • web-platform-tests/encoding/big5-encoder-expected.txt:
  • web-platform-tests/encoding/big5-encoder.html:
  • web-platform-tests/encoding/gbk-encoder-expected.txt:
  • web-platform-tests/encoding/gbk-encoder.html:
  • web-platform-tests/fetch/README.md:
  • web-platform-tests/fetch/api/abort/general.any.js:
  • web-platform-tests/fetch/api/basic/integrity.js:
  • web-platform-tests/fetch/api/cors/cors-expose-star.js:

(string_appeared_here.promise_test):

  • web-platform-tests/fetch/api/cors/cors-filtering.js:
  • web-platform-tests/fetch/api/cors/cors-preflight-star.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight-star.any.js:
  • web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-location.js:
  • web-platform-tests/fetch/api/redirect/redirect-method-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-method-worker-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-method.js:

(redirectMethod):

  • web-platform-tests/fetch/api/redirect/redirect-mode-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-mode-worker-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-mode.js:

(redirectMode):

  • web-platform-tests/fetch/api/request/request-disturbed-expected.txt:
  • web-platform-tests/fetch/api/request/request-disturbed.html:
  • web-platform-tests/fetch/api/request/request-keepalive-expected.txt:
  • web-platform-tests/fetch/api/request/request-keepalive-quota-expected.txt:
  • web-platform-tests/fetch/api/request/request-keepalive-quota.html:
  • web-platform-tests/fetch/api/request/request-keepalive.html:
  • web-platform-tests/fetch/api/resources/redirect.py:

(main):

  • web-platform-tests/fetch/api/resources/trickle.py:

(main):

  • web-platform-tests/fetch/api/response/response-consume.html:
  • web-platform-tests/fetch/api/response/response-init-002-expected.txt:
  • web-platform-tests/fetch/api/response/response-init-002.html:
  • web-platform-tests/fetch/api/response/response-trailer-expected.txt:
  • web-platform-tests/fetch/api/response/response-trailer.html:
  • web-platform-tests/fetch/data-urls/resources/base64.json: Added.
  • web-platform-tests/fetch/http-cache/cc-request.html:
  • web-platform-tests/fetch/http-cache/heuristic.html:
  • web-platform-tests/fetch/http-cache/partial.html:
  • web-platform-tests/fetch/http-cache/vary-expected.txt:
  • web-platform-tests/fetch/http-cache/vary.html:
  • web-platform-tests/fetch/nosniff/importscripts.js:

(string_appeared_here.forEach):

  • web-platform-tests/fetch/nosniff/resources/css.py:

(main):

  • web-platform-tests/fetch/nosniff/script-expected.txt:
  • web-platform-tests/fetch/nosniff/script.html:
  • web-platform-tests/fetch/nosniff/stylesheet-expected.txt:
  • web-platform-tests/fetch/nosniff/stylesheet.html:
  • web-platform-tests/fetch/nosniff/worker-expected.txt:
  • web-platform-tests/fetch/nosniff/worker.html:

LayoutTests:

  • TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios-simulator/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt: Added.
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/wpe/TestExpectations:
Location:
trunk/LayoutTests
Files:
34 added
10 deleted
99 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r230328 r230330  
     12018-04-06  Brendan McLoughlin  <brendan@bocoup.com>
     2
     3        Sync 2dcontext, FileAPI, IndexedDB, background-fetch, credential-management, custom-elements, dom, encoding, and fetch web-platform-tests to 94b33b573a069ae5170104ca581a354a35762536
     4        https://bugs.webkit.org/show_bug.cgi?id=184299
     5
     6        Reviewed by Youenn Fablet.
     7
     8        * TestExpectations:
     9        * platform/gtk/TestExpectations:
     10        * platform/ios-simulator/TestExpectations:
     11        * platform/ios/TestExpectations:
     12        * platform/mac-wk1/TestExpectations:
     13        * platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt: Added.
     14        * platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt: Added.
     15        * platform/mac-wk2/TestExpectations:
     16        * platform/mac/TestExpectations:
     17        * platform/wpe/TestExpectations:
     18
    1192018-04-05  Youenn Fablet  <youenn@apple.com>
    220
  • trunk/LayoutTests/TestExpectations

    r230285 r230330  
    250250imported/w3c/web-platform-tests/payment-request [ Skip ]
    251251
    252 imported/w3c/web-platform-tests/2dcontext/transformations/canvas_transformations_reset_001.html [ ImageOnlyFailure ]
    253252imported/w3c/web-platform-tests/XMLHttpRequest/xmlhttprequest-sync-default-feature-policy.sub.html [ Skip ]
    254253webkit.org/b/179607 imported/w3c/web-platform-tests/XMLHttpRequest/access-control-and-redirects-async.htm [ Pass Failure ]
    … …  
    16001599# FileAPI
    16011600webkit.org/b/172099 imported/w3c/web-platform-tests/FileAPI/url/url_xmlhttprequest_img.html [ ImageOnlyFailure ]
     1601imported/w3c/web-platform-tests/FileAPI/url/sandboxed-iframe.html [ Failure ]
    16021602
    16031603# Secure Contexts tests that timeout
    … …  
    16391639# Only relevant on Mac-WK2
    16401640compositing/tiling/non-visible-window-tile-coverage.html [ Skip ]
    1641 
    1642 webkit.org/b/170698 [ Debug ] imported/w3c/web-platform-tests/IndexedDB/interleaved-cursors.html [ Skip ]
    16431641
    16441642webkit.org/b/170699 [ Debug ] imported/w3c/web-platform-tests/html/webappapis/timers/negative-settimeout.html [ Failure ]
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r230285 r230330  
     12018-04-06  Brendan McLoughlin  <brendan@bocoup.com>
     2
     3        Sync 2dcontext, FileAPI, IndexedDB, background-fetch, credential-management, custom-elements, dom, encoding, and fetch web-platform-tests to 94b33b573a069ae5170104ca581a354a35762536
     4        https://bugs.webkit.org/show_bug.cgi?id=184299
     5
     6        Reviewed by Youenn Fablet.
     7
     8        * web-platform-tests/2dcontext/imagebitmap/common.sub.js:
     9        (makeMakeHTMLImage.return.new.Promise): Deleted.
     10        * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html:
     11        * web-platform-tests/FileAPI/BlobURL/support/file_test1.js: Removed.
     12        * web-platform-tests/FileAPI/BlobURL/support/file_test3.html: Removed.
     13        * web-platform-tests/FileAPI/FileReader/w3c-import.log:
     14        * web-platform-tests/FileAPI/blob/Blob-XHR-revoke-expected.txt: Removed.
     15        * web-platform-tests/FileAPI/blob/Blob-XHR-revoke.html: Removed.
     16        * web-platform-tests/FileAPI/blob/Blob-constructor-expected.txt:
     17        * web-platform-tests/FileAPI/blob/Blob-constructor.html:
     18        * web-platform-tests/FileAPI/blob/Blob-slice-overflow.html:
     19        * web-platform-tests/FileAPI/blob/w3c-import.log:
     20        * web-platform-tests/FileAPI/file/File-constructor-expected.txt:
     21        * web-platform-tests/FileAPI/file/File-constructor.html:
     22        * web-platform-tests/FileAPI/file/w3c-import.log:
     23        * web-platform-tests/FileAPI/url/blob-url-in-sandboxed-iframe-expected.txt: Removed.
     24        * web-platform-tests/FileAPI/url/blob-url-in-sandboxed-iframe.html: Removed.
     25        * web-platform-tests/FileAPI/url/cross-global-revoke.sub-expected.txt: Added.
     26        * web-platform-tests/FileAPI/url/cross-global-revoke.sub.html: Added.
     27        * web-platform-tests/FileAPI/url/resources/create-helper.html: Added.
     28        * web-platform-tests/FileAPI/url/resources/create-helper.js: Added.
     29        * web-platform-tests/FileAPI/url/resources/fetch-tests.js: Added.
     30        (fetch_tests):
     31        * web-platform-tests/FileAPI/url/resources/revoke-helper.html: Added.
     32        * web-platform-tests/FileAPI/url/resources/revoke-helper.js: Added.
     33        * web-platform-tests/FileAPI/url/sandboxed-iframe-expected.txt: Added.
     34        * web-platform-tests/FileAPI/url/sandboxed-iframe.html: Added.
     35        * web-platform-tests/FileAPI/url/unicode-origin.sub-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/origin.sub-expected.txt.
     36        * web-platform-tests/FileAPI/url/unicode-origin.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/origin.sub.html.
     37        * web-platform-tests/FileAPI/url/url-format.any-expected.txt: Added.
     38        * web-platform-tests/FileAPI/url/url-format.any.html: Added.
     39        * web-platform-tests/FileAPI/url/url-format.any.js: Added.
     40        (test):
     41        * web-platform-tests/FileAPI/url/url-format.any.worker-expected.txt: Added.
     42        * web-platform-tests/FileAPI/url/url-format.any.worker.html: Added.
     43        * web-platform-tests/FileAPI/url/url-in-tags.window.js: Added.
     44        (async_test.t.e.onload.t.step_func_done):
     45        (async_test.t.frame.onload.t.step_func_done):
     46        * web-platform-tests/FileAPI/url/url-lifetime-expected.txt: Added.
     47        * web-platform-tests/FileAPI/url/url-lifetime.html: Added.
     48        * web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt: Added.
     49        * web-platform-tests/FileAPI/url/url-with-fetch.any.html: Added.
     50        * web-platform-tests/FileAPI/url/url-with-fetch.any.js: Added.
     51        (fetch_should_succeed):
     52        (promise_test):
     53        * web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt: Added.
     54        * web-platform-tests/FileAPI/url/url-with-fetch.any.worker.html: Added.
     55        * web-platform-tests/FileAPI/url/url-with-xhr.any-expected.txt: Added.
     56        * web-platform-tests/FileAPI/url/url-with-xhr.any.html: Added.
     57        * web-platform-tests/FileAPI/url/url-with-xhr.any.js: Added.
     58        (xhr_should_succeed):
     59        (async_test.t.xhr.onloadend.t.step_func_done):
     60        (async_test.t.xhr.onload.t.step_func_done):
     61        * web-platform-tests/FileAPI/url/url-with-xhr.any.worker-expected.txt: Added.
     62        * web-platform-tests/FileAPI/url/url-with-xhr.any.worker.html: Added.
     63        * web-platform-tests/FileAPI/url/url_createobjecturl_blob-expected.txt: Removed.
     64        * web-platform-tests/FileAPI/url/url_createobjecturl_blob.html: Removed.
     65        * web-platform-tests/FileAPI/url/url_xmlhttprequest.html: Removed.
     66        * web-platform-tests/FileAPI/url/url_xmlhttprequest_img.html:
     67        * web-platform-tests/FileAPI/url/w3c-import.log:
     68        * web-platform-tests/FileAPI/w3c-import.log:
     69        * web-platform-tests/IndexedDB/README.md:
     70        * web-platform-tests/IndexedDB/interleaved-cursors.html: Removed.
     71        * web-platform-tests/IndexedDB/w3c-import.log:
     72        * web-platform-tests/background-fetch/mixed-content-and-allowed-schemes.https.window.js:
     73        (backgroundFetchTest):
     74        * web-platform-tests/background-fetch/w3c-import.log:
     75        * web-platform-tests/credential-management/credentialscontainer-create-basics.https-expected.txt:
     76        * web-platform-tests/credential-management/credentialscontainer-create-basics.https.html:
     77        * web-platform-tests/custom-elements/Document-createElement-expected.txt:
     78        * web-platform-tests/custom-elements/Document-createElement.html:
     79        * web-platform-tests/custom-elements/OWNERS:
     80        * web-platform-tests/custom-elements/attribute-changed-callback-expected.txt:
     81        * web-platform-tests/custom-elements/attribute-changed-callback.html:
     82        * web-platform-tests/custom-elements/custom-element-registry/w3c-import.log:
     83        * web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children-expected.txt:
     84        * web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children.html:
     85        * web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document-expected.txt:
     86        * web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document.html:
     87        * web-platform-tests/custom-elements/parser/w3c-import.log:
     88        * web-platform-tests/custom-elements/reactions/CSSStyleDeclaration-expected.txt:
     89        * web-platform-tests/custom-elements/reactions/CSSStyleDeclaration.html:
     90        * web-platform-tests/custom-elements/reactions/Document.html:
     91        * web-platform-tests/custom-elements/reactions/HTMLElement-expected.txt:
     92        * web-platform-tests/custom-elements/reactions/HTMLElement.html:
     93        * web-platform-tests/custom-elements/reactions/w3c-import.log:
     94        * web-platform-tests/custom-elements/resources/custom-elements-helpers.js:
     95        (CustomElement):
     96        (CustomElement.prototype.attributeChangedCallback):
     97        (CustomElement.prototype.connectedCallback):
     98        (CustomElement.prototype.disconnectedCallback):
     99        (CustomElement.prototype.adoptedCallback):
     100        (document_types.return.create): Deleted.
     101        (document_types.create): Deleted.
     102        (document_types.): Deleted.
     103        (document_types): Deleted.
     104        * web-platform-tests/custom-elements/resources/w3c-import.log:
     105        * web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt:
     106        * web-platform-tests/custom-elements/upgrading/Node-cloneNode.html:
     107        * web-platform-tests/custom-elements/upgrading/w3c-import.log:
     108        * web-platform-tests/custom-elements/w3c-import.log:
     109        * web-platform-tests/dom/nodes/Element-classlist.html:
     110        * web-platform-tests/dom/nodes/w3c-import.log:
     111        * web-platform-tests/encoding/big5-encoder-expected.txt:
     112        * web-platform-tests/encoding/big5-encoder.html:
     113        * web-platform-tests/encoding/gbk-encoder-expected.txt:
     114        * web-platform-tests/encoding/gbk-encoder.html:
     115        * web-platform-tests/fetch/README.md:
     116        * web-platform-tests/fetch/api/abort/general.any.js:
     117        * web-platform-tests/fetch/api/basic/integrity.js:
     118        * web-platform-tests/fetch/api/cors/cors-expose-star.js:
     119        (string_appeared_here.promise_test):
     120        * web-platform-tests/fetch/api/cors/cors-filtering.js:
     121        * web-platform-tests/fetch/api/cors/cors-preflight-star.any-expected.txt:
     122        * web-platform-tests/fetch/api/cors/cors-preflight-star.any.js:
     123        * web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker-expected.txt:
     124        * web-platform-tests/fetch/api/redirect/redirect-location.js:
     125        * web-platform-tests/fetch/api/redirect/redirect-method-expected.txt:
     126        * web-platform-tests/fetch/api/redirect/redirect-method-worker-expected.txt:
     127        * web-platform-tests/fetch/api/redirect/redirect-method.js:
     128        (redirectMethod):
     129        * web-platform-tests/fetch/api/redirect/redirect-mode-expected.txt:
     130        * web-platform-tests/fetch/api/redirect/redirect-mode-worker-expected.txt:
     131        * web-platform-tests/fetch/api/redirect/redirect-mode.js:
     132        (redirectMode):
     133        * web-platform-tests/fetch/api/request/request-disturbed-expected.txt:
     134        * web-platform-tests/fetch/api/request/request-disturbed.html:
     135        * web-platform-tests/fetch/api/request/request-keepalive-expected.txt:
     136        * web-platform-tests/fetch/api/request/request-keepalive-quota-expected.txt:
     137        * web-platform-tests/fetch/api/request/request-keepalive-quota.html:
     138        * web-platform-tests/fetch/api/request/request-keepalive.html:
     139        * web-platform-tests/fetch/api/resources/redirect.py:
     140        (main):
     141        * web-platform-tests/fetch/api/resources/trickle.py:
     142        (main):
     143        * web-platform-tests/fetch/api/response/response-consume.html:
     144        * web-platform-tests/fetch/api/response/response-init-002-expected.txt:
     145        * web-platform-tests/fetch/api/response/response-init-002.html:
     146        * web-platform-tests/fetch/api/response/response-trailer-expected.txt:
     147        * web-platform-tests/fetch/api/response/response-trailer.html:
     148        * web-platform-tests/fetch/data-urls/resources/base64.json: Added.
     149        * web-platform-tests/fetch/http-cache/cc-request.html:
     150        * web-platform-tests/fetch/http-cache/heuristic.html:
     151        * web-platform-tests/fetch/http-cache/partial.html:
     152        * web-platform-tests/fetch/http-cache/vary-expected.txt:
     153        * web-platform-tests/fetch/http-cache/vary.html:
     154        * web-platform-tests/fetch/nosniff/importscripts.js:
     155        (string_appeared_here.forEach):
     156        * web-platform-tests/fetch/nosniff/resources/css.py:
     157        (main):
     158        * web-platform-tests/fetch/nosniff/script-expected.txt:
     159        * web-platform-tests/fetch/nosniff/script.html:
     160        * web-platform-tests/fetch/nosniff/stylesheet-expected.txt:
     161        * web-platform-tests/fetch/nosniff/stylesheet.html:
     162        * web-platform-tests/fetch/nosniff/worker-expected.txt:
     163        * web-platform-tests/fetch/nosniff/worker.html:
     164
    11652018-04-04  Brendan McLoughlin  <brendan@bocoup.com>
    2166
  • trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/common.sub.js

    r228003 r230330  
    6666function makeMakeHTMLImage(src) {
    6767    return function() {
    68         return new Promise(resolve => {
     68        return new Promise((resolve, reject) => {
    6969            var img = new Image();
    7070            img.onload = function() {
    7171                resolve(img);
    7272            };
     73            img.onerror = reject;
    7374            img.src = src;
    7475        });
  • trunk/LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html

    r228003 r230330  
    7272
    7373  {
     74    name: "redirected to same-origin HTMLVideoElement",
     75    factory: () => {
     76      return new Promise((resolve, reject) => {
     77        const video = document.createElement("video");
     78        video.oncanplaythrough = () => resolve(video);
     79        video.onerror = reject;
     80        video.src = "http://{{domains[www1]}}:{{ports[http][0]}}/common/redirect.py?location=" + getVideoURI("http://{{domains[]}}:{{ports[http][0]}}/media/movie_300");
     81      });
     82    },
     83  },
     84
     85  {
    7486    name: "unclean HTMLCanvasElement",
    7587    factory: () => {
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/w3c-import.log

    r216975 r230330  
    1616List of files:
    1717/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable.html
     18/LayoutTests/imported/w3c/web-platform-tests/FileAPI/FileReader/workers.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor-expected.txt

    r219061 r230330  
    77PASS Passing non-objects, Dates and RegExps for blobParts should throw a TypeError.
    88PASS A plain object with @@iterator should be treated as a sequence for the blobParts argument.
     9PASS A plain object with custom @@iterator should be treated as a sequence for the blobParts argument.
    910PASS A plain object with @@iterator and a length property should be treated as a sequence for the blobParts argument.
    1011PASS A String object should be treated as a sequence for the blobParts argument.
    … …  
    2829PASS Array with two bufferviews
    2930PASS Array with mixed types
    30 FAIL The 'endings' property should be ignored. Type error
    3131PASS options properties should be accessed in lexicographic order.
    3232PASS Arguments should be evaluated from left to right.
    … …  
    4343PASS Passing function "function () {}" (index 5) for options should use the defaults.
    4444PASS Passing function "function () {}" (index 5) for options should use the defaults (with newlines).
    45 PASS Newlines should not change when endings is 'transparent'.
    46 FAIL Newlines should not change when endings is 'native'. assert_equals: expected 9 but got 8
     45PASS Passing 123 for options should throw
     46PASS Passing 123.4 for options should throw
     47PASS Passing true for options should throw
     48PASS Passing "abc" for options should throw
    4749PASS Blob with type ""
    4850PASS Blob with type "a"
    … …  
    5052PASS Blob with type "text/html"
    5153PASS Blob with type "TEXT/HTML"
     54PASS Blob with type "text/plain;charset=utf-8"
    5255PASS Blob with type "å"
    5356PASS Blob with type "𐑾"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.html

    r216975 r230330  
    7575  desc: "A plain object with @@iterator should be treated as a sequence for the blobParts argument."
    7676});
     77test(t => {
     78  const blob = new Blob({
     79    [Symbol.iterator]() {
     80      var i = 0;
     81      return {next: () => [
     82        {done:false, value:'ab'},
     83        {done:false, value:'cde'},
     84        {done:true}
     85      ][i++]
     86      };
     87    }
     88  });
     89  assert_equals(blob.size, 5, 'Custom @@iterator should be treated as a sequence');
     90}, "A plain object with custom @@iterator should be treated as a sequence for the blobParts argument.");
    7791test_blob(function() {
    7892  return new Blob({
    … …  
    393407});
    394408
    395 // options argument
    396 test(function() {
    397   new Blob([], { endings: "invalidEnumValue" });
    398   new Blob([], { endings: null });
    399   new Blob([], { endings: undefined });
    400   new Blob([], { endings: 0 });
    401   new Blob([], { get endings() { assert_unreached("Should not call getter"); } });
    402 }, "The 'endings' property should be ignored.");
    403 
    404 test(function() {
    405   assert_throws(test_error, function() {
    406     new Blob([], {
    407       get type() { throw test_error; }
    408     });
    409   });
    410   assert_throws(test_error, function() {
    411     new Blob([], {
    412       type: { toString: function() { throw test_error; } }
    413     });
    414   });
     409test(function() {
     410  const accessed = [];
     411  const stringified = [];
     412
     413  new Blob([], {
     414    get type() { accessed.push('type'); },
     415    get endings() { accessed.push('endings'); }
     416  });
     417  new Blob([], {
     418    type: { toString: () => { stringified.push('type'); return ''; } },
     419    endings: { toString: () => { stringified.push('endings'); return 'transparent'; } }
     420  });
     421  assert_array_equals(accessed, ['endings', 'type']);
     422  assert_array_equals(stringified, ['endings', 'type']);
    415423}, "options properties should be accessed in lexicographic order.");
    416424
    … …  
    450458});
    451459
    452 test_blob(function() {
    453   return new Blob(["\na\r\nb\n\rc\r"], { endings: "transparent" });
    454 }, {
    455   expected: "\na\r\nb\n\rc\r",
    456   type: "",
    457   desc: "Newlines should not change when endings is 'transparent'."
    458 });
    459 test_blob(function() {
    460   return new Blob(["\na\r\nb\n\rc\r"], { endings: "native" });
    461 }, {
    462   expected: "\na\r\nb\n\rc\r",
    463   type: "",
    464   desc: "Newlines should not change when endings is 'native'."
     460[
     461  123,
     462  123.4,
     463  true,
     464  'abc'
     465].forEach(arg => {
     466  test(t => {
     467    assert_throws(new TypeError(), () => new Blob([], arg),
     468                  'Blob constructor should throw with invalid property bag');
     469  }, `Passing ${JSON.stringify(arg)} for options should throw`);
    465470});
    466471
    … …  
    472477  [[], 'text/html', 'text/html'],
    473478  [[], 'TEXT/HTML', 'text/html'],
     479  [[], 'text/plain;charset=utf-8', 'text/plain;charset=utf-8'],
    474480  [[], '\u00E5', ''],
    475481  [[], '\uD801\uDC7E', ''], // U+1047E
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-slice-overflow.html

    r216975 r230330  
    1717test(function() {
    1818  var blob = new Blob([text]);
    19   var sliceBlob = blob.slice(-1, 2000);
    20   assert_equals(sliceBlob.size, 2000-(2000-1), "Bolb slice size");
     19  var sliceBlob = blob.slice(-1, blob.size);
     20  assert_equals(sliceBlob.size, 1, "Blob slice size");
    2121}, "slice start is negative, relativeStart will be max((size + start), 0)");
    2222
    2323test(function() {
    2424  var blob = new Blob([text]);
    25   var sliceBlob = blob.slice(2001, 2000);
    26   assert_equals(sliceBlob.size, 0, "Bolb slice size");
     25  var sliceBlob = blob.slice(blob.size + 1, blob.size);
     26  assert_equals(sliceBlob.size, 0, "Blob slice size");
    2727}, "slice start is greater than blob size, relativeStart will be min(start, size)");
    2828
    2929test(function() {
    3030  var blob = new Blob([text]);
    31   var sliceBlob = blob.slice(1998, -1);
    32   assert_equals(sliceBlob.size, (2000-1)-1998, "Bolb slice size");
     31  var sliceBlob = blob.slice(blob.size - 2, -1);
     32  assert_equals(sliceBlob.size, 1, "Blob slice size");
    3333}, "slice end is negative, relativeEnd will be max((size + end), 0)");
    3434
    3535test(function() {
    3636  var blob = new Blob([text]);
    37   var sliceBlob = blob.slice(1998, 2999);
    38   assert_equals(sliceBlob.size, 2000-1998, "Bolb slice size");
     37  var sliceBlob = blob.slice(blob.size - 2, blob.size + 999);
     38  assert_equals(sliceBlob.size, 2, "Blob slice size");
    3939}, "slice end is greater than blob size, relativeEnd will be min(end, size)");
    4040
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/w3c-import.log

    r216975 r230330  
    1515------------------------------------------------------------------------
    1616List of files:
    17 /LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-XHR-revoke.html
    1817/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-constructor.html
    1918/LayoutTests/imported/w3c/web-platform-tests/FileAPI/blob/Blob-in-worker.worker.js
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor-expected.txt

    r216975 r230330  
    11
    22PASS File interface object exists
     3PASS Required arguments
     4PASS empty fileBits
    35PASS DOMString fileBits
    46PASS Unicode DOMString fileBits
     7PASS String object fileBits
    58PASS Empty Blob fileBits
    69PASS Blob fileBits
     10PASS Empty File fileBits
     11PASS File fileBits
    712PASS ArrayBuffer fileBits
    813PASS Typed array fileBits
    914PASS Various fileBits
     15PASS Number in fileBits
     16PASS Array in fileBits
     17PASS Object in fileBits
     18PASS HTMLBodyElement in fileBits
     19PASS Object with toString in fileBits
     20PASS Custom @@iterator
     21PASS Invalid bits argument: "hello"
     22PASS Invalid bits argument: 0
     23PASS Invalid bits argument: null
     24PASS Bits argument: object that throws
    1025PASS Using fileName
    1126FAIL Using special character in fileName assert_equals: expected "dummy:foo" but got "dummy/foo"
    12 PASS Using type on the File constructor
    13 PASS Using uppercase characters in type
    14 PASS Using illegal character for type
     27PASS Using null fileName
     28PASS Using number fileName
     29PASS Using empty string fileName
     30PASS Using object fileName
     31PASS Using type in File constructor: text/plain
     32PASS Using type in File constructor: text/plain;charset=UTF-8
     33PASS Using type in File constructor: TEXT/PLAIN
     34PASS Using type in File constructor: 𝓽𝓮𝔁𝓽/𝔭𝔩𝔞𝔦𝔫
     35PASS Using type in File constructor: ascii/nonprintable
     36PASS Using type in File constructor: ascii/nonprintable
     37PASS Using type in File constructor: nonasciiî
     38PASS Using type in File constructor: nonasciiሴ
     39PASS Using type in File constructor: nonparsable
    1540PASS Using lastModified
    1641PASS Misusing name
     42PASS Unknown properties are ignored
     43PASS Invalid property bag: 123
     44PASS Invalid property bag: 123.4
     45PASS Invalid property bag: true
     46PASS Invalid property bag: "abc"
     47PASS Unusual but valid property bag: null
     48PASS Unusual but valid property bag: undefined
     49PASS Unusual but valid property bag: 1,2,3
     50PASS Unusual but valid property bag: /regex/
     51PASS Unusual but valid property bag: function () {}
     52PASS Property bag propagates exceptions
    1753
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.html

    r216975 r230330  
    77<div id="log"></div>
    88<script>
     9const to_string_obj = { toString: () => 'a string' };
     10const to_string_throws = { toString: () => { throw new Error('expected'); } };
     11
    912test(function() {
    1013  assert_true("File" in window, "window should have a File property.");
    1114}, "File interface object exists");
     15
     16test(t => {
     17  assert_throws(new TypeError(), () => new File(),
     18                'Bits argument is required');
     19  assert_throws(new TypeError(), () => new File([]),
     20                'Name argument is required');
     21}, 'Required arguments');
    1222
    1323function test_first_argument(arg1, expectedSize, testName) {
    … …  
    2333}
    2434
     35test_first_argument([], 0, "empty fileBits");
    2536test_first_argument(["bits"], 4, "DOMString fileBits");
    2637test_first_argument(["𝓽𝓮𝔁𝓽"], 16, "Unicode DOMString fileBits");
     38test_first_argument([new String('string object')], 13, "String object fileBits");
    2739test_first_argument([new Blob()], 0, "Empty Blob fileBits");
    2840test_first_argument([new Blob(["bits"])], 4, "Blob fileBits");
     41test_first_argument([new File([], 'world.txt')], 0, "Empty File fileBits");
     42test_first_argument([new File(["bits"], 'world.txt')], 4, "File fileBits");
    2943test_first_argument([new ArrayBuffer(8)], 8, "ArrayBuffer fileBits");
    3044test_first_argument([new Uint8Array([0x50, 0x41, 0x53, 0x53])], 4, "Typed array fileBits");
    3145test_first_argument(["bits", new Blob(["bits"]), new Blob(), new Uint8Array([0x50, 0x41]),
    3246                     new Uint16Array([0x5353]), new Uint32Array([0x53534150])], 16, "Various fileBits");
     47test_first_argument([12], 2, "Number in fileBits");
     48test_first_argument([[1,2,3]], 5, "Array in fileBits");
     49test_first_argument([{}], 15, "Object in fileBits"); // "[object Object]"
     50test_first_argument([document.body], 24, "HTMLBodyElement in fileBits"); // "[object HTMLBodyElement]"
     51test_first_argument([to_string_obj], 8, "Object with toString in fileBits");
     52test_first_argument({[Symbol.iterator]() {
     53  let i = 0;
     54  return {next: () => [
     55    {done:false, value:'ab'},
     56    {done:false, value:'cde'},
     57    {done:true}
     58  ][i++]};
     59}}, 5, 'Custom @@iterator');
     60
     61[
     62  'hello',
     63  0,
     64  null
     65].forEach(arg => {
     66  test(t => {
     67    assert_throws(new TypeError(), () => new File(arg, 'world.html'),
     68                  'Constructor should throw for invalid bits argument');
     69  }, `Invalid bits argument: ${JSON.stringify(arg)}`);
     70});
     71
     72test(t => {
     73  assert_throws(new Error(), () => new File([to_string_throws], 'name.txt'),
     74                'Constructor should propagate exceptions');
     75}, 'Bits argument: object that throws');
     76
    3377
    3478function test_second_argument(arg2, expectedFileName, testName) {
    … …  
    4286test_second_argument("dummy", "dummy", "Using fileName");
    4387test_second_argument("dummy/foo", "dummy:foo", "Using special character in fileName");
     88test_second_argument(null, "null", "Using null fileName");
     89test_second_argument(1, "1", "Using number fileName");
     90test_second_argument('', '', "Using empty string fileName");
     91test_second_argument(document.body, '[object HTMLBodyElement]', "Using object fileName");
    4492
    4593// testing the third argument
    46 test(function() {
    47   var file = new File(["bits"], "dummy", { type: "text/plain"});
    48   assert_true(file instanceof File);
    49   assert_equals(file.type, "text/plain");
    50 }, "Using type on the File constructor");
    51 test(function() {
    52   var file = new File(["bits"], "dummy", { type: "TEXT/PLAIN"});
    53   assert_true(file instanceof File);
    54   assert_equals(file.type, "text/plain");
    55 }, "Using uppercase characters in type");
    56 test(function() {
    57   var file = new File(["bits"], "dummy", { type: "𝓽𝓮𝔁𝓽/𝔭𝔩𝔞𝔦𝔫"});
    58   assert_true(file instanceof File);
    59   assert_equals(file.type, "");
    60 }, "Using illegal character for type");
     94[
     95  {type: 'text/plain', expected: 'text/plain'},
     96  {type: 'text/plain;charset=UTF-8', expected: 'text/plain;charset=utf-8'},
     97  {type: 'TEXT/PLAIN', expected: 'text/plain'},
     98  {type: '𝓽𝓮𝔁𝓽/𝔭𝔩𝔞𝔦𝔫', expected: ''},
     99  {type: 'ascii/nonprintable\u001F', expected: ''},
     100  {type: 'ascii/nonprintable\u007F', expected: ''},
     101  {type: 'nonascii\u00EE', expected: ''},
     102  {type: 'nonascii\u1234', expected: ''},
     103  {type: 'nonparsable', expected: 'nonparsable'}
     104].forEach(testCase => {
     105  test(t => {
     106    var file = new File(["bits"], "dummy", { type: testCase.type});
     107    assert_true(file instanceof File);
     108    assert_equals(file.type, testCase.expected);
     109  }, `Using type in File constructor: ${testCase.type}`);
     110});
    61111test(function() {
    62112  var file = new File(["bits"], "dummy", { lastModified: 42 });
    … …  
    69119  assert_equals(file.name, "dummy");
    70120}, "Misusing name");
     121test(function() {
     122  var file = new File(["bits"], "dummy", { unknownKey: "value" });
     123  assert_true(file instanceof File);
     124  assert_equals(file.name, "dummy");
     125}, "Unknown properties are ignored");
     126
     127[
     128  123,
     129  123.4,
     130  true,
     131  'abc'
     132].forEach(arg => {
     133  test(t => {
     134    assert_throws(new TypeError(), () => new File(['bits'], 'name.txt', arg),
     135                  'Constructor should throw for invalid property bag type');
     136  }, `Invalid property bag: ${JSON.stringify(arg)}`);
     137});
     138
     139[
     140  null,
     141  undefined,
     142  [1,2,3],
     143  /regex/,
     144  function() {}
     145].forEach(arg => {
     146  test(t => {
     147    assert_equals(new File(['bits'], 'name.txt', arg).size, 4,
     148                  'Constructor should accept object-ish property bag type');
     149  }, `Unusual but valid property bag: ${arg}`);
     150});
     151
     152test(t => {
     153  assert_throws(new Error(),
     154                () => new File(['bits'], 'name.txt', {type: to_string_throws}),
     155                'Constructor should propagate exceptions');
     156}, 'Property bag propagates exceptions');
    71157
    72158</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/w3c-import.log

    r216975 r230330  
    1515------------------------------------------------------------------------
    1616List of files:
     17/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor-endings.html
    1718/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/File-constructor.html
    1819/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/Worker-read-file-constructor.worker.js
     20/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-iso-2022-jp.tentative.html
     21/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-utf-8.html
     22/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-windows-1252.tentative.html
     23/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form-x-user-defined.tentative.html
     24/LayoutTests/imported/w3c/web-platform-tests/FileAPI/file/send-file-form.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/unicode-origin.sub-expected.txt

    r230329 r230330  
    44Harness Error (TIMEOUT), message = null
    55
    6 PASS Verify origin of Blob URI matches our origin
    76TIMEOUT Verify serialization of non-ascii origin in Blob URLs Test timed out
    87
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/unicode-origin.sub.html

    r230329 r230330  
    66<body>
    77<script>
    8 test(t => {
    9   const blob = new Blob(["Test Blob"]);
    10   const url = URL.createObjectURL(blob);
    11   assert_equals(new URL(url).origin, location.origin);
    12   assert_true(url.includes(location.origin));
    13   assert_true(url.startsWith('blob:{{location[scheme]}}://'));
    14 }, 'Verify origin of Blob URI matches our origin');
    15 
    168async_test(t => {
    179  const frame = document.createElement('iframe');
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url_xmlhttprequest_img.html

    r216975 r230330  
    2121    var fileDisplay = document.querySelector("#fileDisplay");
    2222    fileDisplay.src = window.URL.createObjectURL(http.response);
    23     takeScreenshot();
     23    fileDisplay.onload = takeScreenshot;
    2424  };
    2525  http.send();
    2626</script>
    2727</html>
    28 
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/w3c-import.log

    r216975 r230330  
    1515------------------------------------------------------------------------
    1616List of files:
    17 /LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/blob-url-in-sandboxed-iframe.html
     17/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/cross-global-revoke.sub.html
    1818/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/multi-global-origin-serialization.sub.html
    19 /LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/origin.sub.html
    20 /LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url_createobjecturl_blob.html
    21 /LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url_xmlhttprequest.html
     19/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/sandboxed-iframe.html
     20/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/unicode-origin.sub.html
     21/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-format.any.js
     22/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-in-tags-revoke.window.js
     23/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-in-tags.window.js
     24/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-lifetime.html
     25/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any.js
     26/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-with-xhr.any.js
    2227/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url_xmlhttprequest_img-expected.html
    2328/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url_xmlhttprequest_img.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/w3c-import.log

    r216975 r230330  
    2020/LayoutTests/imported/w3c/web-platform-tests/FileAPI/historical.https.html
    2121/LayoutTests/imported/w3c/web-platform-tests/FileAPI/idlharness.html
    22 /LayoutTests/imported/w3c/web-platform-tests/FileAPI/idlharness.idl
    2322/LayoutTests/imported/w3c/web-platform-tests/FileAPI/idlharness.worker.js
  • trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/README.md

    r206999 r230330  
    11This directory contains the Indexed Database API test suite.
    22
    3 To run the tests in this test suite within a browser, go to: <http://w3c-test.org/IndexedDB/>.
     3To run the tests in this test suite within a browser, go to: <https://w3c-test.org/IndexedDB/>.
    44
    5 The latest Editor's Draft of Indexed Database API is: <http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html>.
     5The latest Editor's Draft of Indexed Database API is: <https://w3c.github.io/IndexedDB/>.
    66
    7 The latest W3C Technical Report of Indexed Database API is: <http://www.w3.org/TR/IndexedDB/>.
     7The latest W3C Technical Report of Indexed Database API is: <https://www.w3.org/TR/IndexedDB/>.
    88
  • trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/w3c-import.log

    r224156 r230330  
    316316/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbworker.js
    317317/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/index_sort_order.htm
    318 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/interfaces.html
    319 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/interfaces.idl
    320 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/interfaces.worker.js
    321 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/interleaved-cursors.html
     318/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/interfaces.any.js
    322319/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/key-conversion-exceptions.htm
    323320/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/key_invalid.htm
  • trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/mixed-content-and-allowed-schemes.https.window.js

    r222307 r230330  
    2727}, 'loopback IPv6 http: fetch should register ok');
    2828
    29 // http://localhost is not tested here since the correct behavior from
    30 // https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy
    31 // depends on whether the UA conforms to the name resolution rules in
    32 // https://tools.ietf.org/html/draft-west-let-localhost-be-localhost
     29backgroundFetchTest((t, bgFetch) => {
     30  return bgFetch.fetch(uniqueTag(), 'http://localhost');
     31}, 'localhost http: fetch should register ok');
    3332
    3433backgroundFetchTest((t, bgFetch) => {
  • trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/w3c-import.log

    r222307 r230330  
    2121/LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces-worker.https.html
    2222/LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces.html
    23 /LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces.idl
    2423/LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces.worker.js
    2524/LayoutTests/imported/w3c/web-platform-tests/background-fetch/mixed-content-and-allowed-schemes.https.window.js
  • trunk/LayoutTests/imported/w3c/web-platform-tests/credential-management/credentialscontainer-create-basics.https-expected.txt

    r228523 r230330  
    88FAIL navigator.credentials.create() with bogus federated data assert_throws: function "function () { throw e }" threw object "NotSupportedError: Only PublicKeyCredential is supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
    99PASS navigator.credentials.create() with bogus publicKey data
    10 FAIL navigator.credentials.create() returns PublicKeyCredential promise_test: Unhandled rejection with value: object "TypeError: Member PublicKeyCredentialCreationOptions.pubKeyCredParams is required and must be an instance of sequence"
    1110PASS navigator.credentials.create() with both PasswordCredentialData and FederatedCredentialData
    1211FAIL navigator.credentials.create() with bogus password and federated data assert_throws: function "function () { throw e }" threw object "NotSupportedError: Only PublicKeyCredential is supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
  • trunk/LayoutTests/imported/w3c/web-platform-tests/credential-management/credentialscontainer-create-basics.https.html

    r226001 r230330  
    7979
    8080promise_test(function(t) {
    81     var publicKey = {
    82         challenge: new TextEncoder().encode("climb a mountain"),
    83         rp: {
    84             id: "1098237235409872",
    85             name: "Acme"
    86         },
    87 
    88         user: {
    89             id: "1098237235409872",
    90             name: "avery.a.jones@example.com",
    91             displayName: "Avery A. Jones",
    92             icon: "https://pics.acme.com/00/p/aBjjjpqPb.png"
    93         },
    94 
    95         parameters: [{
    96             type: "public-key",
    97             algorithm: "ES256",
    98         },],
    99 
    100         timeout: 60000,  // 1 minute
    101         excludeList: [], // No excludeList
    102     };
    103 
    104     return navigator.credentials.create({publicKey}).then(r => {
    105     assert_true(r instanceof PublicKeyCredential);
    106     });
    107 }, "navigator.credentials.create() returns PublicKeyCredential");
    108 
    109 promise_test(function(t) {
    11081    var credential_data = {
    11182        id: 'id',
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-expected.txt

    r223327 r230330  
    11
    22PASS document.createElement must create an instance of custom elements
     3PASS document.createElement must create an instance of autonomous custom elements when it has is attribute
     4FAIL document.createElement()'s second argument is to be ignored when it's a string assert_true: expected true got false
    35PASS document.createElement must report a TypeError when the result of Construct is not a DOM node
    46PASS document.createElement must report a TypeError when the result of Construct is a TextNode
    … …  
    3537PASS document.createElement must report a NotSupportedError when the local name of the element does not match that of the custom element
    3638PASS document.createElement must report an exception thrown by a custom element constructor
     39FAIL document.createElement with unknown "is" value should create "undefined" state element assert_true: Undefined element is upgraded on connecting to a document expected true got false
    3740
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement.html

    r223327 r230330  
    2929
    3030}, 'document.createElement must create an instance of custom elements');
     31
     32test(function () {
     33    class AutonomousCustomElement extends HTMLElement {};
     34    class IsCustomElement extends HTMLElement {};
     35
     36    customElements.define('autonomous-custom-element', AutonomousCustomElement);
     37    customElements.define('is-custom-element', IsCustomElement);
     38
     39    var instance = document.createElement('autonomous-custom-element', { is: 'is-custom-element'});
     40
     41    assert_true(instance instanceof AutonomousCustomElement);
     42    assert_equals(instance.localName, 'autonomous-custom-element');
     43    assert_equals(instance.namespaceURI, 'http://www.w3.org/1999/xhtml', 'A custom element HTML must use HTML namespace');
     44
     45    var instance2 = document.createElement('undefined-element', { is: 'is-custom-element'});
     46    assert_false(instance2.matches(':defined'));
     47    class DefinedLater extends HTMLElement {}
     48    customElements.define('undefined-element', DefinedLater);
     49    document.body.appendChild(instance2);
     50    assert_true(instance2 instanceof DefinedLater);
     51}, 'document.createElement must create an instance of autonomous custom elements when it has is attribute');
     52
     53test(() => {
     54    class SuperP extends HTMLParagraphElement {}
     55    customElements.define("super-p", SuperP, { extends: "p" });
     56
     57    const superP = document.createElement("p", { is: "super-p" });
     58    assert_true(superP instanceof HTMLParagraphElement);
     59    assert_true(superP instanceof SuperP);
     60    assert_equals(superP.localName, "p");
     61
     62    const notSuperP = document.createElement("p", "super-p");
     63    assert_true(notSuperP instanceof HTMLParagraphElement);
     64    assert_false(notSuperP instanceof SuperP);
     65    assert_equals(notSuperP.localName, "p");
     66}, "document.createElement()'s second argument is to be ignored when it's a string");
    3167
    3268function assert_reports(expected, testFunction, message) {
    … …  
    328364}, 'document.createElement must report an exception thrown by a custom element constructor');
    329365
     366test(() => {
     367  class MyElement extends HTMLDivElement {}
     368
     369  // createElement with unknown 'is' should not throw.
     370  // https://github.com/w3c/webcomponents/issues/608
     371  let div = document.createElement('div', { is: 'my-div' });
     372  assert_false(div instanceof MyElement);
     373  assert_false(div.hasAttribute('is'));
     374
     375  customElements.define('my-div', MyElement, { extends: 'div' });
     376  document.body.appendChild(div);
     377  assert_true(div instanceof MyElement, 'Undefined element is upgraded on connecting to a document');
     378}, 'document.createElement with unknown "is" value should create "undefined" state element');
    330379</script>
    331380</body>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/OWNERS

    r206838 r230330  
     1@snuggs
    12@alsemenov
    23@deepak-sa
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/attribute-changed-callback-expected.txt

    r208176 r230330  
    1010PASS attributedChangedCallback must be enqueued for style attribute change by mutating inline style declaration
    1111PASS attributedChangedCallback must not be enqueued when mutating inline style declaration if the style attribute is not observed
     12PASS Upgrading a parser created element must enqueue and invoke attributeChangedCallback for an HTML attribute
     13PASS Upgrading a cloned element must enqueue and invoke attributeChangedCallback for an HTML attribute
    1214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/attribute-changed-callback.html

    r206999 r230330  
    1212<body>
    1313<div id="log"></div>
     14<parser-created-element title></parser-created-element>
    1415<script>
    1516
    … …  
    219220}, 'attributedChangedCallback must not be enqueued when mutating inline style declaration if the style attribute is not observed');
    220221
     222test(function () {
     223    var calls = [];
     224    class CustomElement extends HTMLElement { }
     225    CustomElement.prototype.attributeChangedCallback = function (...args) {
     226        calls.push(create_attribute_changed_callback_log(this, ...args));
     227    }
     228    CustomElement.observedAttributes = ['title'];
     229    customElements.define('parser-created-element', CustomElement);
     230    assert_attribute_log_entry(calls[0], {name: 'title', oldValue: null, newValue: '', namespace: null});
     231}, 'Upgrading a parser created element must enqueue and invoke attributeChangedCallback for an HTML attribute');
     232
     233test(function () {
     234    var calls = [];
     235    class CustomElement extends HTMLElement { }
     236    CustomElement.prototype.attributeChangedCallback = function (...args) {
     237        calls.push(create_attribute_changed_callback_log(this, ...args));
     238    }
     239    CustomElement.observedAttributes = ['title'];
     240    customElements.define('cloned-element-with-attribute', CustomElement);
     241
     242    var instance = document.createElement('cloned-element-with-attribute');
     243    assert_equals(calls.length, 0);
     244    instance.title = '';
     245    assert_attribute_log_entry(calls[0], {name: 'title', oldValue: null, newValue: '', namespace: null});
     246
     247    calls = [];
     248    var clone = instance.cloneNode(false);
     249    assert_attribute_log_entry(calls[0], {name: 'title', oldValue: null, newValue: '', namespace: null});
     250}, 'Upgrading a cloned element must enqueue and invoke attributeChangedCallback for an HTML attribute');
     251
    221252</script>
    222253</body>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/w3c-import.log

    r217225 r230330  
    1717/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/define.html
    1818/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/per-global.html
     19/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-registry/upgrade.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children-expected.txt

    r207703 r230330  
    33PASS HTML parser must append child nodes
    44PASS HTML parser must set the attributes or append children before calling constructor
     5FAIL HTML parser should call connectedCallback before appending child nodes. assert_equals: expected 0 but got 2
     6FAIL HTML parser must enqueue attributeChanged reactions assert_equals: attributeChangedCallback should be called before appending a child expected 0 but got 2
    57hello world
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children.html

    r207703 r230330  
    66<meta name="assert" content="HTML parser must set the attributes and append the children on a custom element">
    77<link rel="help" href="https://html.spec.whatwg.org/#create-an-element-for-the-token">
     8<link rel="help" href="https://html.spec.whatwg.org/multipage/parsing.html#insert-a-foreign-element">
    89<link rel="help" href="https://dom.spec.whatwg.org/#concept-create-element">
    910<script src="/resources/testharness.js"></script>
    1011<script src="/resources/testharnessreport.js"></script>
     12<script src="../resources/custom-elements-helpers.js"></script>
    1113</head>
    1214<body>
    … …  
    1416<script>
    1517
    16 var numberOfAttributesInConstructor;
    17 var numberOfChildNodesInConstructor;
     18var numberOfAttributesInConstructor = 0;
     19var numberOfChildNodesInConstructor = 0;
     20var numberOfChildNodesInAttributeChangedCallback = 0;
     21var numberOfChildNodesInConnectedCallback = 0;
     22var attributesChangedCalls = [];
    1823
    1924class MyCustomElement extends HTMLElement {
    … …  
    2227        numberOfAttributesInConstructor = this.attributes.length;
    2328        numberOfChildNodesInConstructor = this.childNodes.length;
     29    }
     30
     31    attributeChangedCallback(...args) {
     32        attributesChangedCalls.push(create_attribute_changed_callback_log(this, ...args));
     33        numberOfChildNodesInAttributeChangedCallback = this.childNodes.length;
     34    }
     35
     36    static get observedAttributes() {
     37        return ['id', 'class'];
     38    }
     39
     40    connectedCallback() {
     41        numberOfChildNodesInConnectedCallback = this.childNodes.length;
    2442    }
    2543};
    … …  
    5573}, 'HTML parser must set the attributes or append children before calling constructor');
    5674
     75test(function () {
     76    // https://html.spec.whatwg.org/multipage/parsing.html#insert-a-foreign-element
     77    // 3.3. Pop the element queue from the custom element reactions
     78    // stack, and invoke custom element reactions in that queue.
     79    assert_equals(numberOfChildNodesInConnectedCallback, 0);
     80}, 'HTML parser should call connectedCallback before appending child nodes.');
     81
     82test(function () {
     83    assert_equals(attributesChangedCalls.length, 2);
     84    assert_attribute_log_entry(attributesChangedCalls[0], {name: 'id', oldValue: null, newValue: 'custom-element-id', namespace: null});
     85    assert_attribute_log_entry(attributesChangedCalls[1], {name: 'class', oldValue: null, newValue: 'class1 class2', namespace: null});
     86    // https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token
     87    // 9.2. Invoke custom element reactions in queue.
     88    assert_equals(numberOfChildNodesInAttributeChangedCallback, 0,
     89                  'attributeChangedCallback should be called ' +
     90                      'before appending a child');
     91}, 'HTML parser must enqueue attributeChanged reactions');
     92
    5793</script>
    5894</body>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document-expected.txt

    r207703 r230330  
    44PASS HTML parser must use the registry of the content document inside an iframe
    55PASS HTML parser must not instantiate a custom element defined inside an frame in frame element's owner document
    6 PASS HTML parser must use the registry of window.document in a document created by document.implementation.createHTMLDocument()
     6PASS HTML parser must use the registry of window.document in a document created by DOMParser
    77PASS HTML parser must use the registry of window.document in a document created by document.implementation.createXHTMLDocument()
    88PASS HTML parser must use the registry of window.document in a document created by new Document
    9 PASS HTML parser must use the registry of window.document in a document created by XMLHttpRequest
     9FAIL HTML parser must use the registry of window.document in a document created by XMLHttpRequest promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'doc.querySelector')"
     10FAIL document.write() must not instantiate a custom element without a defined insertion point assert_false: expected false got true
     11FAIL document.writeln() must not instantiate a custom element without a defined insertion point assert_false: expected false got true
    1012
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document.html

    r207703 r230330  
    99<script src="/resources/testharness.js"></script>
    1010<script src="/resources/testharnessreport.js"></script>
     11<script src="../resources/custom-elements-helpers.js"></script>
    1112</head>
    1213<body>
    … …  
    7273
    7374test(function () {
    74     var windowlessDocument = document.implementation.createHTMLDocument();
    75     windowlessDocument.open();
    76     windowlessDocument.write('<my-custom-element></my-custom-element>');
    77     windowlessDocument.close();
     75    var windowlessDocument = (new DOMParser()).parseFromString('<my-custom-element></my-custom-element>', "text/html");
    7876
    7977    var instance = windowlessDocument.querySelector('my-custom-element');
    … …  
    8280    assert_false(instance instanceof MyCustomElement);
    8381
    84 }, 'HTML parser must use the registry of window.document in a document created by document.implementation.createHTMLDocument()');
     82}, 'HTML parser must use the registry of window.document in a document created by DOMParser');
    8583
    8684test(function () {
    … …  
    109107    return new Promise(function (resolve, reject) {
    110108        var xhr = new XMLHttpRequest();
    111         xhr.open('GET', '../resources/empty-html-document.html');
     109        xhr.open('GET', '../resources/my-custom-element-html-document.html');
    112110        xhr.overrideMimeType('text/xml');
    113111        xhr.onload = function () { resolve(xhr.responseXML); }
    … …  
    115113        xhr.send();
    116114    }).then(function (doc) {
    117         doc.documentElement.innerHTML = '<my-custom-element></my-custom-element>';
    118115        var instance = doc.querySelector('my-custom-element');
    119116        assert_true(instance instanceof Element);
    120         assert_false(instance instanceof MyCustomElement);       
     117        assert_false(instance instanceof MyCustomElement);
     118
     119        doc.documentElement.innerHTML = '<my-custom-element></my-custom-element>';
     120        var instance2 = doc.querySelector('my-custom-element');
     121        assert_true(instance2 instanceof Element);
     122        assert_false(instance2 instanceof MyCustomElement);
    121123    });
    122124}, 'HTML parser must use the registry of window.document in a document created by XMLHttpRequest');
     125
     126test_with_window(function (contentWindow, contentDocument) {
     127    const element = define_custom_element_in_window(contentWindow, 'my-custom-element', []);
     128    // document-open-steps spec doesn't match most browsers; see https://github.com/whatwg/html/issues/1698.
     129    // However, as explained in https://github.com/whatwg/html/issues/1698#issuecomment-298748641
     130    // the custom element registry will be replaced after document-open-steps.
     131    contentDocument.write('<my-custom-element></my-custom-element>');
     132
     133    var instance = contentDocument.querySelector('my-custom-element');
     134
     135    assert_true(instance instanceof contentWindow.HTMLElement);
     136    assert_false(instance instanceof element.class);
     137
     138}, 'document.write() must not instantiate a custom element without a defined insertion point');
     139
     140test_with_window(function (contentWindow, contentDocument) {
     141    const element = define_custom_element_in_window(contentWindow, 'my-custom-element', []);
     142    // document-open-steps spec doesn't match most browsers; see https://github.com/whatwg/html/issues/1698.
     143    // However, as explained in https://github.com/whatwg/html/issues/1698#issuecomment-298748641
     144    // the custom element registry will be replaced after document-open-steps.
     145    contentDocument.writeln('<my-custom-element></my-custom-element>');
     146
     147    var instance = contentDocument.querySelector('my-custom-element');
     148
     149    assert_true(instance instanceof contentWindow.HTMLElement);
     150    assert_false(instance instanceof element.class);
     151
     152}, 'document.writeln() must not instantiate a custom element without a defined insertion point');
    123153
    124154</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/w3c-import.log

    r216354 r230330  
    1717/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-constructs-custom-element-in-document-write.html
    1818/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-constructs-custom-element-synchronously.html
     19/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-constructs-custom-elements-with-is.html
    1920/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-constructs-custom-elements.html
    2021/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-fallsback-to-unknown-element.html
    2122/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children.html
    2223/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-uses-constructed-element.html
     24/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-uses-create-an-element-for-a-token-svg.svg
    2325/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document.html
     26/LayoutTests/imported/w3c/web-platform-tests/custom-elements/parser/serializing-html-fragments.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/CSSStyleDeclaration-expected.txt

    r208360 r230330  
    1010PASS setProperty on CSSStyleDeclaration must enqueue an attributeChanged reaction when it makes a property important and the style attribute is observed
    1111PASS setProperty on CSSStyleDeclaration must enqueue an attributeChanged reaction when it makes a property important but the style attribute is not observed
    12 FAIL setPropertyValue on CSSStyleDeclaration must enqueue an attributeChanged reaction when it adds the observed style attribute instance.style.setPropertyValue is not a function. (In 'instance.style.setPropertyValue(propertyName, value)', 'instance.style.setPropertyValue' is undefined)
    13 FAIL setPropertyValue on CSSStyleDeclaration must not enqueue an attributeChanged reaction when it adds the style attribute but the style attribute is not observed instance.style.setPropertyValue is not a function. (In 'instance.style.setPropertyValue(propertyName, value)', 'instance.style.setPropertyValue' is undefined)
    14 FAIL setPropertyValue on CSSStyleDeclaration must enqueue an attributeChanged reaction when it mutates the observed style attribute instance.style.setPropertyValue is not a function. (In 'instance.style.setPropertyValue(propertyName, value)', 'instance.style.setPropertyValue' is undefined)
    15 FAIL setPropertyValue on CSSStyleDeclaration must not enqueue an attributeChanged reaction when it mutates the style attribute but the style attribute is not observed instance.style.setPropertyValue is not a function. (In 'instance.style.setPropertyValue(propertyName, value)', 'instance.style.setPropertyValue' is undefined)
    16 FAIL setPropertyPriority on CSSStyleDeclaration must enqueue an attributeChanged reaction when it makes a property important and the style attribute is observed instance.style.setPropertyPriority is not a function. (In 'instance.style.setPropertyPriority(propertyName, isImportant ? 'important': '')', 'instance.style.setPropertyPriority' is undefined)
    17 FAIL setPropertyPriority on CSSStyleDeclaration must enqueue an attributeChanged reaction when it makes a property important but the style attribute is not observed instance.style.setPropertyPriority is not a function. (In 'instance.style.setPropertyPriority(propertyName, isImportant ? 'important': '')', 'instance.style.setPropertyPriority' is undefined)
    1812PASS removeProperty on CSSStyleDeclaration must enqueue an attributeChanged reaction when it removes a property from the observed style attribute
    1913PASS removeProperty on CSSStyleDeclaration must not enqueue an attributeChanged reaction when it removes a property from the style attribute but the style attribute is not observed
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/CSSStyleDeclaration.html

    r208360 r230330  
    2727}, 'setProperty on CSSStyleDeclaration');
    2828
    29 test_mutating_style_property_value(function (instance, propertyName, idlName, value) {
    30     instance.style.setPropertyValue(propertyName, value);
    31 }, 'setPropertyValue on CSSStyleDeclaration');
     29if (CSSStyleDeclaration.prototype.setPropertyValue) {
     30    test_mutating_style_property_value(function (instance, propertyName, idlName, value) {
     31        instance.style.setPropertyValue(propertyName, value);
     32    }, 'setPropertyValue on CSSStyleDeclaration');
     33}
    3234
    33 test_mutating_style_property_priority(function (instance, propertyName, idlName, isImportant) {
    34     instance.style.setPropertyPriority(propertyName, isImportant ? 'important': '');
    35 }, 'setPropertyPriority on CSSStyleDeclaration');
     35if (CSSStyleDeclaration.prototype.setPropertyPriority) {
     36    test_mutating_style_property_priority(function (instance, propertyName, idlName, isImportant) {
     37        instance.style.setPropertyPriority(propertyName, isImportant ? 'important': '');
     38    }, 'setPropertyPriority on CSSStyleDeclaration');
     39}
    3640
    3741test_removing_style_property_value(function (instance, propertyName, idlName) {
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document.html

    r208360 r230330  
    130130
    131131test_with_window(function (contentWindow, contentDocument) {
     132    contentWindow.document.open();
     133    // document.open()'s spec doesn't match most browsers; see https://github.com/whatwg/html/issues/1698.
     134    // However, as explained in https://github.com/whatwg/html/issues/1698#issuecomment-298748641
     135    // the custom element registry will be replaced after document.open() call,
     136    // So call customElements.define() after that in order to register defintion
     137    // to correct custom elements registry.
    132138    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
    133139    contentWindow.document.write('<custom-element></custom-element>');
    … …  
    145151
    146152test_with_window(function (contentWindow) {
     153    contentWindow.document.open();
     154    // document.open()'s spec doesn't match most browsers; see https://github.com/whatwg/html/issues/1698.
     155    // However, as explained in https://github.com/whatwg/html/issues/1698#issuecomment-298748641
     156    // the custom element registry will be replaced after document.open() call,
     157    // So call customElements.define() after that in order to register defintion
     158    // to correct custom elements registry.
    147159    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
    148160    contentWindow.document.writeln('<custom-element></custom-element>');
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement-expected.txt

    r207571 r230330  
    1616PASS draggable on HTMLElement must enqueue an attributeChanged reaction when adding draggable content attribute
    1717PASS draggable on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute
    18 FAIL dropzone on HTMLElement must enqueue an attributeChanged reaction when adding dropzone content attribute assert_array_equals: lengths differ, expected 1 got 0
    19 FAIL dropzone on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
    20 FAIL contextMenu on HTMLElement must enqueue an attributeChanged reaction when adding contextmenu content attribute assert_array_equals: lengths differ, expected 1 got 0
    21 FAIL contextMenu on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
    2218PASS spellcheck on HTMLElement must enqueue an attributeChanged reaction when adding spellcheck content attribute
    2319PASS spellcheck on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement.html

    r207520 r230330  
    2323testReflectAttribute('accessKey', 'accesskey', 'a', 'b', 'accessKey on HTMLElement');
    2424testReflectAttributeWithContentValues('draggable', 'draggable', true, 'true', false, 'false', 'draggable on HTMLElement');
    25 testReflectAttribute('dropzone', 'dropzone', 'copy', 'move', 'dropzone on HTMLElement');
    26 testReflectAttribute('contextMenu', 'contextmenu', 'menu1', 'menu2', 'contextMenu on HTMLElement');
    2725testReflectAttributeWithContentValues('spellcheck', 'spellcheck', true, 'true', false, 'false', 'spellcheck on HTMLElement');
    2826
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/w3c-import.log

    r216354 r230330  
    2525/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLAnchorElement.html
    2626/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement.html
     27/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLInputElement.html
    2728/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptionElement.html
    2829/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLOptionsCollection.html
    … …  
    3940/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Selection.html
    4041/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ShadowRoot.html
     42/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/with-exceptions.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js

    r208360 r230330  
    144144define_new_custom_element._element_number = 1;
    145145
     146function define_build_in_custom_element(observedAttributes, extendedElement, extendsOption) {
     147    let log = [];
     148    let name = 'custom-element-' + define_build_in_custom_element._element_number++;
     149
     150    class CustomElement extends extendedElement {
     151        constructor() {
     152            super();
     153            log.push({type: 'constructed', element: this});
     154        }
     155        attributeChangedCallback(...args) {
     156            log.push(create_attribute_changed_callback_log(this, ...args));
     157        }
     158        connectedCallback() { log.push({type: 'connected', element: this}); }
     159        disconnectedCallback() { log.push({type: 'disconnected', element: this}); }
     160        adoptedCallback(oldDocument, newDocument) { log.push({type: 'adopted', element: this, oldDocument: oldDocument, newDocument: newDocument}); }
     161    }
     162    CustomElement.observedAttributes = observedAttributes;
     163    customElements.define(name, CustomElement, { extends: extendsOption});
     164
     165    return {
     166        name: name,
     167        class: CustomElement,
     168        takeLog: function () {
     169            let currentLog = log; log = [];
     170            currentLog.types = () => currentLog.map((entry) => entry.type);
     171            currentLog.last = () => currentLog[currentLog.length - 1];
     172            return currentLog;
     173        }
     174    };
     175}
     176define_build_in_custom_element._element_number = 1;
     177
    146178function document_types() {
    147179    return [
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/resources/w3c-import.log

    r216354 r230330  
    1717/LayoutTests/imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js
    1818/LayoutTests/imported/w3c/web-platform-tests/custom-elements/resources/empty-html-document.html
     19/LayoutTests/imported/w3c/web-platform-tests/custom-elements/resources/my-custom-element-html-document.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt

    r207703 r230330  
    11
    22PASS Node.prototype.cloneNode(false) must be able to clone a custom element
     3PASS Node.prototype.cloneNode(false) must be able to clone as a autonomous custom element when it contains is attribute
     4FAIL Node.prototype.cloneNode(false) must be able to clone as a customized built-in element when it has an inconsistent "is" attribute assert_true: expected true got false
    35PASS Node.prototype.cloneNode(false) must be able to clone a custom element inside an iframe
    46PASS Node.prototype.cloneNode(true) must be able to clone a descendent custom element
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html

    r222307 r230330  
    3131}, 'Node.prototype.cloneNode(false) must be able to clone a custom element');
    3232
     33test(function () {
     34    class AutonomousCustomElement extends HTMLElement {};
     35    class IsCustomElement extends HTMLElement {};
     36
     37    customElements.define('autonomous-custom-element', AutonomousCustomElement);
     38    customElements.define('is-custom-element', IsCustomElement);
     39
     40    var instance = document.createElement('autonomous-custom-element', { is: "is-custom-element"});
     41    assert_true(instance instanceof HTMLElement);
     42    assert_true(instance instanceof AutonomousCustomElement);
     43
     44    var clone = instance.cloneNode(false);
     45    assert_not_equals(instance, clone);
     46    assert_true(clone instanceof HTMLElement,
     47        'A cloned custom element must be an instance of HTMLElement');
     48    assert_true(clone instanceof AutonomousCustomElement,
     49        'A cloned custom element must be an instance of the custom element');
     50}, 'Node.prototype.cloneNode(false) must be able to clone as a autonomous custom element when it contains is attribute');
     51
     52test(function () {
     53    class MyDiv1 extends HTMLDivElement {};
     54    class MyDiv2 extends HTMLDivElement {};
     55    class MyDiv3 extends HTMLDivElement {};
     56    customElements.define('my-div1', MyDiv1, { extends: 'div' });
     57    customElements.define('my-div2', MyDiv2, { extends: 'div' });
     58
     59    let instance = document.createElement('div', { is: 'my-div1'});
     60    assert_true(instance instanceof MyDiv1);
     61    instance.setAttribute('is', 'my-div2');
     62    let clone = instance.cloneNode(false);
     63    assert_not_equals(instance, clone);
     64    assert_true(clone instanceof MyDiv1,
     65        'A cloned custom element must be an instance of the custom element even with an inconsistent "is" attribute');
     66
     67    let instance3 = document.createElement('div', { is: 'my-div3'});
     68    assert_false(instance3 instanceof MyDiv3);
     69    instance3.setAttribute('is', 'my-div2');
     70    let clone3 = instance3.cloneNode(false);
     71    assert_not_equals(instance3, clone);
     72    customElements.define('my-div3', MyDiv3, { extends: 'div' });
     73    document.body.appendChild(instance3);
     74    document.body.appendChild(clone3);
     75    assert_true(instance3 instanceof MyDiv3,
     76        'An undefined element must be upgraded even with an inconsistent "is" attribute');
     77    assert_true(clone3 instanceof MyDiv3,
     78        'A cloned undefined element must be upgraded even with an inconsistent "is" attribute');
     79}, 'Node.prototype.cloneNode(false) must be able to clone as a customized built-in element when it has an inconsistent "is" attribute');
     80
    3381test_with_window(function (contentWindow) {
    3482    var contentDocument = contentWindow.document;
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/w3c-import.log

    r216354 r230330  
    1515------------------------------------------------------------------------
    1616List of files:
     17/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Document-importNode.html
    1718/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html
    1819/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-enqueue-reactions.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/w3c-import.log

    r223327 r230330  
    1616List of files:
    1717/LayoutTests/imported/w3c/web-platform-tests/custom-elements/CustomElementRegistry.html
     18/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement-svg.svg
    1819/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElement.html
     20/LayoutTests/imported/w3c/web-platform-tests/custom-elements/Document-createElementNS.html
    1921/LayoutTests/imported/w3c/web-platform-tests/custom-elements/HTMLElement-constructor.html
    2022/LayoutTests/imported/w3c/web-platform-tests/custom-elements/OWNERS
    2123/LayoutTests/imported/w3c/web-platform-tests/custom-elements/adopted-callback.html
    2224/LayoutTests/imported/w3c/web-platform-tests/custom-elements/attribute-changed-callback.html
     25/LayoutTests/imported/w3c/web-platform-tests/custom-elements/builtin-coverage.html
    2326/LayoutTests/imported/w3c/web-platform-tests/custom-elements/connected-callbacks.html
    2427/LayoutTests/imported/w3c/web-platform-tests/custom-elements/custom-element-reaction-queue.html
    … …  
    2629/LayoutTests/imported/w3c/web-platform-tests/custom-elements/historical.html
    2730/LayoutTests/imported/w3c/web-platform-tests/custom-elements/microtasks-and-constructors.html
     31/LayoutTests/imported/w3c/web-platform-tests/custom-elements/pseudo-class-defined.html
    2832/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reaction-timing.html
    2933/LayoutTests/imported/w3c/web-platform-tests/custom-elements/upgrading.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-classlist.html

    r229544 r230330  
    3232    setClass(e, before);
    3333
     34    var obs;
     35    // If we have MutationObservers available,  do some checks to make
     36    // sure attribute sets are happening at sane times.
     37    if (self.MutationObserver) {
     38      obs = new MutationObserver(() => {});
     39      obs.observe(e, { attributes: true });
     40    }
    3441    if (shouldThrow) {
    3542      assert_throws(expectedException, function() {
    … …  
    4047      var list = e.classList;
    4148      var res = list[funcName].apply(list, args);
     49    }
     50    if (obs) {
     51      var mutationRecords = obs.takeRecords();
     52      obs.disconnect();
     53      if (shouldThrow) {
     54        assert_equals(mutationRecords.length, 0,
     55                      "There should have been no mutation");
     56      } else if (funcName == "replace") {
     57        assert_equals(mutationRecords.length == 1,
     58                      expectedRes,
     59                      "Should have a mutation exactly when replace() returns true");
     60      } else {
     61        // For other functions, would need to check when exactly
     62        // mutations are supposed to happen.
     63      }
    4264    }
    4365    if (!shouldThrow) {
  • trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/w3c-import.log

    r229544 r230330  
    6767/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DocumentType-literal.html
    6868/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DocumentType-remove.html
    69 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElement-null-svg.svg
    7069/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElement-null-xhtml.xhtml
    7170/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElement-null.html
    72 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElementCount-dynamic-add-svg.svg
    7371/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElementCount-dynamic-add-xhtml.xhtml
    7472/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElementCount-dynamic-add.html
    75 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove-svg.svg
    7673/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove-xhtml.xhtml
    7774/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove.html
    78 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElementCount-nochild-svg.svg
    7975/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElementCount-nochild-xhtml.xhtml
    8076/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElementCount-nochild.html
    81 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElementCount-svg.svg
    8277/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElementCount-xhtml.xhtml
    8378/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-childElementCount.html
    … …  
    8681/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-closest.html
    8782/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-firstElementChild-entity-xhtml.xhtml
    88 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-firstElementChild-entity.svg
    89 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-firstElementChild-namespace-svg.svg
    9083/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-firstElementChild-namespace-xhtml.xhtml
    9184/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-firstElementChild-namespace.html
    92 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-firstElementChild-svg.svg
    9385/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-firstElementChild-xhtml.xhtml
    9486/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-firstElementChild.html
    … …  
    10193/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-insertAdjacentElement.html
    10294/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-insertAdjacentText.html
    103 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-lastElementChild-svg.svg
    10495/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-lastElementChild-xhtml.xhtml
    10596/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-lastElementChild.html
    … …  
    10798/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-matches.html
    10899/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-matches.js
    109 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-nextElementSibling-svg.svg
    110100/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-nextElementSibling-xhtml.xhtml
    111101/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-nextElementSibling.html
    112 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-previousElementSibling-svg.svg
    113102/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-previousElementSibling-xhtml.xhtml
    114103/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-previousElementSibling.html
    115104/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-remove.html
    116105/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-removeAttributeNS.html
    117 /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-siblingElement-null-svg.svg
    118106/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-siblingElement-null-xhtml.xhtml
    119107/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-siblingElement-null.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/encoding/big5-encoder-expected.txt

    r207570 r230330  
    11
    22PASS big5 encoder: very basic
    3 PASS big5 encoder: Highest-pointer BMP character excluded from encoder
    4 PASS big5 encoder: Highest-pointer character excluded from encoder
     3FAIL big5 encoder: Highest-pointer BMP character excluded from encoder assert_equals: expected "X&%2340614;X" but got "X%26%2340614%3BX"
     4FAIL big5 encoder: Highest-pointer character excluded from encoder assert_equals: expected "X&%23156267;X" but got "X%26%23156267%3BX"
    55PASS big5 encoder: Lowest-pointer character included in encoder
    66PASS big5 encoder: Euro; the highest-pointer character before a range of 30 unmapped pointers
    … …  
    99FAIL big5 encoder: The lowest-pointer character after the range of 41 unmapped pointers assert_equals: expected "X%C8%CDX" but got "X%26%2365506%3BX"
    1010FAIL big5 encoder: The last character in the index assert_equals: expected "X%FE%FEX" but got "X%26%2331188%3BX"
    11 PASS big5 encoder: The canonical BMP test character that is not in the index
    12 PASS big5 encoder: The canonical astral test character that is not in the index
     11FAIL big5 encoder: The canonical BMP test character that is not in the index assert_equals: expected "X&%239731;X" but got "X%26%239731%3BX"
     12FAIL big5 encoder: The canonical astral test character that is not in the index assert_equals: expected "X&%23128169;X" but got "X%26%23128169%3BX"
    1313FAIL big5 encoder: A Plane 2 character whose low 16 bits match a BMP character that has a lower pointer assert_equals: expected "X%FDjX" but got "X%26%23132021%3BX"
    1414PASS big5 encoder: A duplicate-mapped code point that prefers the highest pointer in the encoder
  • trunk/LayoutTests/imported/w3c/web-platform-tests/encoding/big5-encoder.html

    r207570 r230330  
    1616 encode("ab", "ab", "very basic")
    1717 // edge cases
    18  encode("\u9EA6", "%26%2340614%3B", "Highest-pointer BMP character excluded from encoder");
    19  encode("\uD858\uDE6B", "%26%23156267%3B", "Highest-pointer character excluded from encoder");
     18 encode("\u9EA6", "&%2340614;", "Highest-pointer BMP character excluded from encoder");
     19 encode("\uD858\uDE6B", "&%23156267;", "Highest-pointer character excluded from encoder");
    2020 encode("\u3000", "%A1@", "Lowest-pointer character included in encoder");
    2121 encode("\u20AC", "%A3%E1", "Euro; the highest-pointer character before a range of 30 unmapped pointers");
    … …  
    2525 encode("\u79D4", "%FE%FE", "The last character in the index");
    2626 // not in index
    27  encode("\u2603", "%26%239731%3B", "The canonical BMP test character that is not in the index");
    28  encode("\uD83D\uDCA9", "%26%23128169%3B", "The canonical astral test character that is not in the index");
     27 encode("\u2603", "&%239731;", "The canonical BMP test character that is not in the index");
     28 encode("\uD83D\uDCA9", "&%23128169;", "The canonical astral test character that is not in the index");
    2929 // duplicate low bits
    3030 encode("\uD840\uDFB5", "%FDj", "A Plane 2 character whose low 16 bits match a BMP character that has a lower pointer");
  • trunk/LayoutTests/imported/w3c/web-platform-tests/encoding/gbk-encoder-expected.txt

    r207570 r230330  
    55PASS gbk encoder: PUA
    66PASS gbk encoder: PUA #2
    7 PASS gbk encoder: poo
     7FAIL gbk encoder: poo assert_equals: expected "&%23128169;" but got "%26%23128169%3B"
    88
  • trunk/LayoutTests/imported/w3c/web-platform-tests/encoding/gbk-encoder.html

    r207570 r230330  
    1818 encode("\uE4C6", "%A1@", "PUA")
    1919 encode("\uE4C5", "%FE%FE", "PUA #2")
    20  encode("\ud83d\udca9", "%26%23128169%3B", "poo")
     20 encode("\ud83d\udca9", "&%23128169;", "poo")
    2121</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/README.md

    r213882 r230330  
    44
    55* /cors
    6 * /XMLHttpRequest
     6* /xhr
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/abort/general.any.js

    r222307 r230330  
    7979  assert_equals(request.signal.constructor, AbortSignal);
    8080  assert_not_equals(request.signal, signal, 'Request has a new signal, not a reference');
     81  assert_true(request.signal.aborted, `Request's signal has aborted`);
    8182
    8283  const fetchPromise = fetch(request);
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/integrity.js

    r223327 r230330  
    2828}
    2929
    30 var topSha256 = "sha256-KHIDZcXnR2oBHk9DrAA+5fFiR6JjudYjqoXtMR1zvzk=";
    31 var topSha384 = "sha384-MgZYnnAzPM/MjhqfOIMfQK5qcFvGZsGLzx4Phd7/A8fHTqqLqXqKo8cNzY3xEPTL";
    32 var topSha512 = "sha512-D6yns0qxG0E7+TwkevZ4Jt5t7Iy3ugmAajG/dlf6Pado1JqTyneKXICDiqFIkLMRExgtvg8PlxbKTkYfRejSOg==";
    33 var invalidSha256 = "sha256-dKUcPOn/AlUjWIwcHeHNqYXPlvyGiq+2dWOdFcE+24I=";
    34 var invalidSha512 = "sha512-oUceBRNxPxnY60g/VtPCj2syT4wo4EZh2CgYdWy9veW8+OsReTXoh7dizMGZafvx9+QhMS39L/gIkxnPIn41Zg==";
     30const topSha256 = "sha256-KHIDZcXnR2oBHk9DrAA+5fFiR6JjudYjqoXtMR1zvzk=";
     31const topSha384 = "sha384-MgZYnnAzPM/MjhqfOIMfQK5qcFvGZsGLzx4Phd7/A8fHTqqLqXqKo8cNzY3xEPTL";
     32const topSha512 = "sha512-D6yns0qxG0E7+TwkevZ4Jt5t7Iy3ugmAajG/dlf6Pado1JqTyneKXICDiqFIkLMRExgtvg8PlxbKTkYfRejSOg==";
     33const invalidSha256 = "sha256-dKUcPOn/AlUjWIwcHeHNqYXPlvyGiq+2dWOdFcE+24I=";
     34const invalidSha512 = "sha512-oUceBRNxPxnY60g/VtPCj2syT4wo4EZh2CgYdWy9veW8+OsReTXoh7dizMGZafvx9+QhMS39L/gIkxnPIn41Zg==";
    3535
    36 var url = "../resources/top.txt";
    37 var corsUrl = "http://{{host}}:{{ports[http][1]}}" + dirname(location.pathname) + RESOURCES_DIR + "top.txt";
    38 /* Enable CORS*/
    39 corsUrl += "?pipe=header(Access-Control-Allow-Origin,*)";
    40 var corsUrl2 = "https://{{host}}:{{ports[https][0]}}/fetch/api/resource/top.txt";
     36const path = dirname(location.pathname) + RESOURCES_DIR + "top.txt";
     37const url = path;
     38const corsUrl =
     39  `http://{{host}}:{{ports[http][1]}}${path}?pipe=header(Access-Control-Allow-Origin,*)`;
     40const corsUrl2 = `https://{{host}}:{{ports[https][0]}}${path}`
    4141
    4242integrity("Empty string integrity", url, "", /* initRequestMode */ undefined,
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-expose-star.js

    r222307 r230330  
    3232
    3333promise_test(() => {
    34   const headers =  "header(Access-Control-Allow-Origin,*)|header(Access-Control-Expose-Headers,set-cookie)"
     34  const headers =  "header(Access-Control-Allow-Origin,*)|header(Access-Control-Expose-Headers,set-cookie\\,*)"
    3535  return fetch(url + sharedHeaders + headers).then(resp => {
    3636    assert_equals(resp.status, 200)
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-filtering.js

    r215164 r230330  
    5757corsFilter(url, "Server", "wptServe" , true);
    5858corsFilter(url, "Warning", "Mind the gap" , true);
    59 corsFilter(url, "Content-Length", "0" , true);
     59corsFilter(url, "Content-Length", "3" , true); // top.txt contains "top"
    6060corsFilter(url, "Set-Cookie", "name=value" , true);
    6161corsFilter(url, "Set-Cookie2", "name=value" , true);
    … …  
    6464corsExposeFilter(url, "Server", "wptServe" , false);
    6565corsExposeFilter(url, "Warning", "Mind the gap" , false);
    66 corsExposeFilter(url, "Content-Length", "0" , false);
     66corsExposeFilter(url, "Content-Length", "3" , false);
    6767
    6868corsExposeFilter(url, "Set-Cookie", "name=value" , true);
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-star.any-expected.txt

    r222307 r230330  
    33CONSOLE MESSAGE: Fetch API cannot load http://127.0.0.1:8800/fetch/api/resources/preflight.py?origin=http://localhost:8800&credentials&allow_methods=*&allow_headers=*&. Method OK is not allowed by Access-Control-Allow-Methods.
    44CONSOLE MESSAGE: Fetch API cannot load http://127.0.0.1:8800/fetch/api/resources/preflight.py?origin=http://localhost:8800&credentials&allow_methods=*&allow_headers=&. Method PUT is not allowed by Access-Control-Allow-Methods.
    5 CONSOLE MESSAGE: Fetch API cannot load http://127.0.0.1:8800/fetch/api/resources/preflight.py?origin=http://localhost:8800&credentials&allow_methods=put&allow_headers=*&. Method PUT is not allowed by Access-Control-Allow-Methods.
    65CONSOLE MESSAGE: Fetch API cannot load http://127.0.0.1:8800/fetch/api/resources/preflight.py?origin=http://localhost:8800&credentials&allow_methods=get&allow_headers=*&. Request header field X-Test is not allowed by Access-Control-Allow-Headers.
    76CONSOLE MESSAGE: Fetch API cannot load http://127.0.0.1:8800/fetch/api/resources/preflight.py?origin=http://localhost:8800&credentials&allow_methods=*&allow_headers=*&. Request header field X-Test is not allowed by Access-Control-Allow-Headers.
     7CONSOLE MESSAGE: Fetch API cannot load http://127.0.0.1:8800/fetch/api/resources/preflight.py?origin=http://localhost:8800&credentials&allow_methods=put&allow_headers=*&. Method PUT is not allowed by Access-Control-Allow-Methods.
    88
    99PASS CORS that succeeds with credentials: false; method: GET (allowed: get); header: X-Test,1 (allowed: x-test)
    … …  
    1313PASS CORS that fails with credentials: true; method: PUT (allowed: *); header:  (allowed: )
    1414PASS CORS that succeeds with credentials: true; method: PUT (allowed: PUT); header:  (allowed: *)
    15 PASS CORS that fails with credentials: true; method: PUT (allowed: put); header:  (allowed: *)
    1615PASS CORS that fails with credentials: true; method: GET (allowed: get); header: X-Test,1 (allowed: *)
    1716PASS CORS that fails with credentials: true; method: GET (allowed: *); header: X-Test,1 (allowed: *)
    1817PASS CORS that succeeds with credentials: true; method: * (allowed: *); header: *,1 (allowed: *)
     18PASS CORS that fails with credentials: true; method: PUT (allowed: put); header:  (allowed: *)
    1919
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-star.any.js

    r222307 r230330  
    3333}
    3434
     35// "GET" does not pass the case-sensitive method check, but in the safe list.
    3536preflightTest(true, false, "get", "x-test", "GET", ["X-Test", "1"])
     37// Headers check is case-insensitive, and "*" works as any for method.
    3638preflightTest(true, false, "*", "x-test", "SUPER", ["X-Test", "1"])
     39// "*" works as any only without credentials.
    3740preflightTest(true, false, "*", "*", "OK", ["X-Test", "1"])
    3841preflightTest(false, true, "*", "*", "OK", ["X-Test", "1"])
    3942preflightTest(false, true, "*", "", "PUT", [])
    4043preflightTest(true, true, "PUT", "*", "PUT", [])
    41 preflightTest(false, true, "put", "*", "PUT", [])
    4244preflightTest(false, true, "get", "*", "GET", ["X-Test", "1"])
    4345preflightTest(false, true, "*", "*", "GET", ["X-Test", "1"])
     46// Exact character match works even for "*" with credentials.
    4447preflightTest(true, true, "*", "*", "*", ["*", "1"])
     48// "PUT" does not pass the case-sensitive method check, and not in the safe list.
     49preflightTest(false, true, "put", "*", "PUT", [])
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker-expected.txt

    r222307 r230330  
    66PASS CORS that fails with credentials: true; method: PUT (allowed: *); header:  (allowed: )
    77PASS CORS that succeeds with credentials: true; method: PUT (allowed: PUT); header:  (allowed: *)
    8 PASS CORS that fails with credentials: true; method: PUT (allowed: put); header:  (allowed: *)
    98PASS CORS that fails with credentials: true; method: GET (allowed: get); header: X-Test,1 (allowed: *)
    109PASS CORS that fails with credentials: true; method: GET (allowed: *); header: X-Test,1 (allowed: *)
    1110PASS CORS that succeeds with credentials: true; method: * (allowed: *); header: *,1 (allowed: *)
     11PASS CORS that fails with credentials: true; method: PUT (allowed: put); header:  (allowed: *)
    1212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.js

    r217225 r230330  
    3333var redirUrl = RESOURCES_DIR + "redirect.py";
    3434var locationUrl = "top.txt";
    35 var invalidLocationUrl = "#invalidurl:";
     35var invalidLocationUrl = "invalidurl:";
    3636var dataLocationUrl = "data:,data%20url";
    3737// FIXME: We may want to mix redirect-mode and cors-mode.
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method-expected.txt

    r201324 r230330  
    1111FAIL Redirect 303 with HEAD assert_equals: Request method after redirection is HEAD expected "HEAD" but got "GET"
    1212PASS Redirect 307 with GET
    13 PASS Redirect 307 with POST
     13PASS Redirect 307 with POST (string body)
     14PASS Redirect 307 with POST (blob body)
    1415PASS Redirect 307 with HEAD
    1516
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method-worker-expected.txt

    r203153 r230330  
    1111FAIL Redirect 303 with HEAD assert_equals: Request method after redirection is HEAD expected "HEAD" but got "GET"
    1212PASS Redirect 307 with GET
    13 PASS Redirect 307 with POST
     13PASS Redirect 307 with POST (string body)
     14PASS Redirect 307 with POST (blob body)
    1415PASS Redirect 307 with HEAD
    1516
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.js

    r202471 r230330  
    44}
    55
    6 function redirectMethod(desc, redirectUrl, redirectLocation, redirectStatus, method, expectedMethod) {
     6// Creates a promise_test that fetches a URL that returns a redirect response.
     7//
     8// |opts| has additional options:
     9// |opts.body|: the request body as a string or blob (default is empty body)
     10// |opts.expectedBodyAsString|: the expected response body as a string. The
     11// server is expected to echo the request body. The default is the empty string
     12// if the request after redirection isn't POST; otherwise it's |opts.body|.
     13function redirectMethod(desc, redirectUrl, redirectLocation, redirectStatus, method, expectedMethod, opts) {
    714  var url = redirectUrl;
    815  var urlParameters = "?redirect_status=" + redirectStatus;
    … …  
    1017
    1118  var requestInit = {"method": method, "redirect": "follow"};
    12   if (method != "GET" && method != "HEAD")
    13     requestInit.body = "this is my body";
     19  opts = opts || {};
     20  if (opts.body)
     21    requestInit.body = opts.body;
    1422
    1523  promise_test(function(test) {
    … …  
    2028      assert_true(resp.redirected);
    2129      return resp.text().then(function(text) {
    22         assert_equals(text, expectedMethod == "POST" ? requestInit.body : "");
     30        let expectedBody = "";
     31        if (expectedMethod == "POST")
     32          expectedBody = opts.expectedBodyAsString || requestInit.body;
     33        assert_equals(text, expectedBody, "request body");
    2334      });
    2435    });
    … …  
    3748var locationUrl = "method.py";
    3849
     50const stringBody = "this is my body";
     51const blobBody = new Blob(["it's me the blob!", " ", "and more blob!"]);
     52const blobBodyAsString = "it's me the blob! and more blob!";
     53
    3954redirectMethod("Redirect 301 with GET", redirUrl, locationUrl, 301, "GET", "GET");
    40 redirectMethod("Redirect 301 with POST", redirUrl, locationUrl, 301, "POST", "GET");
     55redirectMethod("Redirect 301 with POST", redirUrl, locationUrl, 301, "POST", "GET", { body: stringBody });
    4156redirectMethod("Redirect 301 with HEAD", redirUrl, locationUrl, 301, "HEAD", "HEAD");
    4257
    4358redirectMethod("Redirect 302 with GET", redirUrl, locationUrl, 302, "GET", "GET");
    44 redirectMethod("Redirect 302 with POST", redirUrl, locationUrl, 302, "POST", "GET");
     59redirectMethod("Redirect 302 with POST", redirUrl, locationUrl, 302, "POST", "GET", { body: stringBody });
    4560redirectMethod("Redirect 302 with HEAD", redirUrl, locationUrl, 302, "HEAD", "HEAD");
    4661
    4762redirectMethod("Redirect 303 with GET", redirUrl, locationUrl, 303, "GET", "GET");
    48 redirectMethod("Redirect 303 with POST", redirUrl, locationUrl, 303, "POST", "GET");
     63redirectMethod("Redirect 303 with POST", redirUrl, locationUrl, 303, "POST", "GET", { body: stringBody });
    4964redirectMethod("Redirect 303 with HEAD", redirUrl, locationUrl, 303, "HEAD", "HEAD");
    5065
    5166redirectMethod("Redirect 307 with GET", redirUrl, locationUrl, 307, "GET", "GET");
    52 redirectMethod("Redirect 307 with POST", redirUrl, locationUrl, 307, "POST", "POST");
     67redirectMethod("Redirect 307 with POST (string body)", redirUrl, locationUrl, 307, "POST", "POST", { body: stringBody });
     68redirectMethod("Redirect 307 with POST (blob body)", redirUrl, locationUrl, 307, "POST", "POST", { body: blobBody, expectedBodyAsString: blobBodyAsString });
    5369redirectMethod("Redirect 307 with HEAD", redirUrl, locationUrl, 307, "HEAD", "HEAD");
    5470
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode-expected.txt

    r227270 r230330  
    11
    2 PASS Redirect 301 in "error" redirect, cors mode
    3 PASS Redirect 301 in "follow" redirect, cors mode
    4 PASS Redirect 301 in "manual" redirect, cors mode
    5 PASS Redirect 302 in "error" redirect, cors mode
    6 PASS Redirect 302 in "follow" redirect, cors mode
    7 PASS Redirect 302 in "manual" redirect, cors mode
    8 PASS Redirect 303 in "error" redirect, cors mode
    9 PASS Redirect 303 in "follow" redirect, cors mode
    10 PASS Redirect 303 in "manual" redirect, cors mode
    11 PASS Redirect 307 in "error" redirect, cors mode
    12 PASS Redirect 307 in "follow" redirect, cors mode
    13 PASS Redirect 307 in "manual" redirect, cors mode
    14 PASS Redirect 308 in "error" redirect, cors mode
    15 PASS Redirect 308 in "follow" redirect, cors mode
    16 PASS Redirect 308 in "manual" redirect, cors mode
    17 PASS Redirect in "error" redirect, no cors mode
    18 PASS Redirect in "manual" redirect, no cors mode
     2PASS Redirect 301 in "error" mode 
     3PASS Redirect 301 in "follow" mode 
     4PASS Redirect 301 in "manual" mode 
     5PASS Redirect 302 in "error" mode 
     6PASS Redirect 302 in "follow" mode 
     7PASS Redirect 302 in "manual" mode 
     8PASS Redirect 303 in "error" mode 
     9PASS Redirect 303 in "follow" mode 
     10PASS Redirect 303 in "manual" mode 
     11PASS Redirect 307 in "error" mode 
     12PASS Redirect 307 in "follow" mode 
     13PASS Redirect 307 in "manual" mode 
     14PASS Redirect 308 in "error" mode 
     15PASS Redirect 308 in "follow" mode 
     16PASS Redirect 308 in "manual" mode 
    1917
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode-worker-expected.txt

    r227270 r230330  
    1 CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
    2 CONSOLE MESSAGE: No-Cors mode requires follow redirect mode
    31
    4 PASS Redirect 301 in "error" redirect, cors mode
    5 PASS Redirect 301 in "follow" redirect, cors mode
    6 PASS Redirect 301 in "manual" redirect, cors mode
    7 PASS Redirect 302 in "error" redirect, cors mode
    8 PASS Redirect 302 in "follow" redirect, cors mode
    9 PASS Redirect 302 in "manual" redirect, cors mode
    10 PASS Redirect 303 in "error" redirect, cors mode
    11 PASS Redirect 303 in "follow" redirect, cors mode
    12 PASS Redirect 303 in "manual" redirect, cors mode
    13 PASS Redirect 307 in "error" redirect, cors mode
    14 PASS Redirect 307 in "follow" redirect, cors mode
    15 PASS Redirect 307 in "manual" redirect, cors mode
    16 PASS Redirect 308 in "error" redirect, cors mode
    17 PASS Redirect 308 in "follow" redirect, cors mode
    18 PASS Redirect 308 in "manual" redirect, cors mode
    19 PASS Redirect in "error" redirect, no cors mode
    20 PASS Redirect in "manual" redirect, no cors mode
     2PASS Redirect 301 in "error" mode 
     3PASS Redirect 301 in "follow" mode 
     4PASS Redirect 301 in "manual" mode 
     5PASS Redirect 302 in "error" mode 
     6PASS Redirect 302 in "follow" mode 
     7PASS Redirect 302 in "manual" mode 
     8PASS Redirect 303 in "error" mode 
     9PASS Redirect 303 in "follow" mode 
     10PASS Redirect 303 in "manual" mode 
     11PASS Redirect 307 in "error" mode 
     12PASS Redirect 307 in "follow" mode 
     13PASS Redirect 307 in "manual" mode 
     14PASS Redirect 308 in "error" mode 
     15PASS Redirect 308 in "follow" mode 
     16PASS Redirect 308 in "manual" mode 
    2117
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.js

    r227270 r230330  
    44}
    55
    6 function redirectMode(desc, redirectUrl, redirectLocation, redirectStatus, redirectMode, corsMode) {
     6function redirectMode(desc, redirectUrl, redirectLocation, redirectStatus, redirectMode) {
    77  var url = redirectUrl;
    88  var urlParameters = "?redirect_status=" + redirectStatus;
    99  urlParameters += "&location=" + encodeURIComponent(redirectLocation);
    1010
    11   var requestInit = {"redirect": redirectMode, mode: corsMode};
     11  var requestInit = {"redirect": redirectMode};
    1212
    1313  promise_test(function(test) {
    14     if (redirectMode === "error" || (corsMode === "no-cors" && redirectMode !== "follow"))
     14    if (redirectMode === "error")
    1515      return promise_rejects(test, new TypeError(), fetch(url + urlParameters, requestInit));
    1616    if (redirectMode === "manual")
    … …  
    3434
    3535for (var statusCode of [301, 302, 303, 307, 308]) {
    36   redirectMode("Redirect " + statusCode + " in \"error\" redirect, cors mode", redirUrl, locationUrl, statusCode, "error", "cors");
    37   redirectMode("Redirect " + statusCode + " in \"follow\" redirect, cors mode", redirUrl, locationUrl, statusCode, "follow", "cors");
    38   redirectMode("Redirect " + statusCode + " in \"manual\" redirect, cors mode", redirUrl, locationUrl, statusCode, "manual", "cors");
     36  redirectMode("Redirect " + statusCode + " in \"error\" mode ", redirUrl, locationUrl, statusCode, "error");
     37  redirectMode("Redirect " + statusCode + " in \"follow\" mode ", redirUrl, locationUrl, statusCode, "follow");
     38  redirectMode("Redirect " + statusCode + " in \"manual\" mode ", redirUrl, locationUrl, statusCode, "manual");
    3939}
    40 redirectMode("Redirect in \"error\" redirect, no cors mode", redirUrl, locationUrl, 301, "error", "no-cors");
    41 redirectMode("Redirect in \"manual\" redirect, no cors mode", redirUrl, locationUrl, 301, "manual", "no-cors");
    4240
    4341done();
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-disturbed-expected.txt

    r221329 r230330  
    44PASS Check cloning a disturbed request
    55PASS Check creating a new request from a disturbed request
     6FAIL Check creating a new request with a new body from a disturbed request Request input is disturbed or locked.
    67FAIL Input request used for creating new request became disturbed assert_equals: body should not change expected object "[object ReadableStream]" but got object "[object ReadableStream]"
    78FAIL Input request used for creating new request became disturbed even if body is not used assert_true: bodyUsed is true when request is disturbed expected true got false
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-disturbed.html

    r212202 r230330  
    5050
    5151      promise_test(function() {
     52        assert_true(bodyConsumed.bodyUsed , "bodyUsed is true when request is disturbed");
     53        const originalBody = bodyConsumed.body;
     54        const bodyReplaced = new Request(bodyConsumed, { body: "Replaced body" });
     55        assert_not_equals(bodyReplaced.body, originalBody, "new request's body is new");
     56        assert_false(bodyReplaced.bodyUsed, "bodyUsed is false when request is not disturbed");
     57        return bodyReplaced.text().then(text => {
     58          assert_equals(text, "Replaced body");
     59        });
     60      }, "Check creating a new request with a new body from a disturbed request");
     61
     62      promise_test(function() {
    5263        var bodyRequest = new Request("", initValuesDict);
    5364        const originalBody = bodyRequest.body;
    … …  
    5970        assert_not_equals(originalBody, null, "body should not be null");
    6071        assert_not_equals(requestFromRequest.body, originalBody, "new request's body is new");
    61         return requestFromRequest.text(text => {
     72        return requestFromRequest.text().then(text => {
    6273          assert_equals(text, "Request's body");
    6374        });
    … …  
    7586        assert_not_equals(requestFromRequest.body, originalBody, "new request's body is new");
    7687
    77         return requestFromRequest.text(text => {
     88        return requestFromRequest.text().then(text => {
    7889          assert_equals(text, "init body");
    7990        });
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-keepalive-expected.txt

    r221342 r230330  
    11
    2 PASS Create Request with keep alive values
    3 PASS Clone Request with keep alive values
    4 PASS Request with keep alive and ReadableStream body
     2PASS keepalive flag
     3FAIL keepalive flag with stream body Test bug: unrecognized DOMException code "TypeError" passed to assert_throws()
    54
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-keepalive-quota-expected.txt

    r220751 r230330  
    1 CONSOLE MESSAGE: line 44: Fetch API cannot load http://localhost:8800/fetch/api/resources/trickle.py?count=1&ms=0. Reached maximum amount of queued data of 64Kb for keepalive requests
    2 CONSOLE MESSAGE: line 71: Fetch API cannot load http://localhost:8800/fetch/api/resources/trickle.py?count=1&ms=0. Reached maximum amount of queued data of 64Kb for keepalive requests
    3 CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Reached maximum amount of queued data of 64Kb for keepalive requests
    4 CONSOLE MESSAGE: line 88: Fetch API cannot load http://localhost:8800/fetch/api/resources/trickle.py?count=1&ms=0. Reached maximum amount of queued data of 64Kb for keepalive requests
    5 
    6 Harness Error (FAIL), message = Reached maximum amount of queued data of 64Kb for keepalive requests
     1CONSOLE MESSAGE: line 33: Fetch API cannot load http://localhost:8800/fetch/api/resources/trickle.py?count=1&ms=0. Reached maximum amount of queued data of 64Kb for keepalive requests
     2CONSOLE MESSAGE: line 33: Fetch API cannot load http://localhost:8800/fetch/api/resources/trickle.py?count=1&ms=0. Reached maximum amount of queued data of 64Kb for keepalive requests
     3CONSOLE MESSAGE: line 33: Fetch API cannot load http://localhost:8800/fetch/api/resources/trickle.py?count=1&ms=0. Reached maximum amount of queued data of 64Kb for keepalive requests
    74
    85PASS A Keep-Alive fetch() with a small body should succeed.
    96PASS A Keep-Alive fetch() with a body at the Quota Limit should succeed.
    107PASS A Keep-Alive fetch() with a body over the Quota Limit should reject.
    11 PASS A Keep-Alive fetch() should return it's allocated Quota upon promise resolution.
    12 PASS A Keep-Alive fetch() should return only it's allocated Quota upon promise resolution.
     8PASS A Keep-Alive fetch() should return its allocated Quota upon promise resolution.
     9PASS A Keep-Alive fetch() should return only its allocated Quota upon promise resolution.
    1310PASS A Keep-Alive fetch() should not be allowed if the Quota is used up.
    1411
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-keepalive-quota.html

    r213882 r230330  
    1313    <body>
    1414        <script>
    15             "use strict";
     15            'use strict';
    1616
    1717            // We want to ensure that our keepalive requests hang slightly before completing so we can validate
    1818            // the effects of a rolling quota. To do this we will utilize trickle.py with a 1s delay. This should
    1919            // prevent any of the Fetch's from finishing in this window.
    20             var trickleURL = "../resources/trickle.py?count=1&ms=";
    21             var standardDelay = 1000;
     20            const trickleURL = '../resources/trickle.py?count=1&ms=';
     21            const noDelay = 0;
     22            const standardDelay = 1000;
     23            function wait(ms) {
     24                return new Promise(resolve => step_timeout(resolve, ms));
     25            }
    2226
    2327            // We should expect 64KiB of rolling quota for any type of keep-alive request sent.
    24             var expectedQuota = 65536;
     28            const expectedQuota = 65536;
    2529
    26             function CreateKeepAliveRequest(delay, bodySize) {
     30            function fetchKeepAliveRequest(delay, bodySize) {
    2731                // Create a body of the specified size that's filled with *'s
    28                 var requestBody = "*".repeat(bodySize);
    29                 return new Request(trickleURL+delay, {keepalive: true, body: requestBody, method: "POST"});
     32                const body = '*'.repeat(bodySize);
     33                return fetch(trickleURL + delay, {keepalive: true, body, method: 'POST'}).then(res => {
     34                    return res.text();
     35                }).then(() => {
     36                    return wait(1);
     37                });
    3038            }
    3139
    3240            // Test 1 Byte
    3341            promise_test(function(test) {
    34                 return fetch(CreateKeepAliveRequest(0 /* delay */, 1 /* bodySize */));
    35             }, "A Keep-Alive fetch() with a small body should succeed.");
     42                return fetchKeepAliveRequest(noDelay, 1 /* bodySize */);
     43            }, 'A Keep-Alive fetch() with a small body should succeed.');
    3644
    3745            // Test Quota full limit
    3846            promise_test(function(test) {
    39                 return fetch(CreateKeepAliveRequest(0 /* delay */, expectedQuota));
    40             }, "A Keep-Alive fetch() with a body at the Quota Limit should succeed.");
     47                return fetchKeepAliveRequest(noDelay, expectedQuota /* bodySize */);
     48            }, 'A Keep-Alive fetch() with a body at the Quota Limit should succeed.');
    4149
    4250            // Test Quota + 1 Byte
    4351            promise_test(function(test) {
    44                 return promise_rejects(test, new TypeError(), fetch(CreateKeepAliveRequest(0 /* delay */, expectedQuota + 1)));
    45             }, "A Keep-Alive fetch() with a body over the Quota Limit should reject.");
     52                return promise_rejects(test, TypeError(), fetchKeepAliveRequest(noDelay, expectedQuota + 1));
     53            }, 'A Keep-Alive fetch() with a body over the Quota Limit should reject.');
    4654
    4755            // Test the Quota becomes available upon promise completion.
    4856            promise_test(function (test) {
    4957                // Fill our Quota then try to send a second fetch.
    50                 var firstFetch = fetch(CreateKeepAliveRequest(standardDelay, expectedQuota)).then(function(response) {
     58                return fetchKeepAliveRequest(standardDelay, expectedQuota).then(() => {
    5159                    // Now validate that we can send another Keep-Alive fetch for the full size of the quota.
    52                     return fetch(CreateKeepAliveRequest(0 /* delay */, expectedQuota));
     60                    return fetchKeepAliveRequest(noDelay, expectedQuota);
    5361                });
    54 
    55                 return firstFetch;
    56             }, "A Keep-Alive fetch() should return it's allocated Quota upon promise resolution.");
     62            }, 'A Keep-Alive fetch() should return its allocated Quota upon promise resolution.');
    5763
    5864            // Ensure only the correct amount of Quota becomes available when a fetch completes.
    5965            promise_test(function(test) {
    60                 var lastFetchSucceeded = false;
    6166                // Create a fetch that uses all but 1 Byte of the Quota and runs for 2x as long as the other requests.
    62                 var firstFetch = fetch(CreateKeepAliveRequest(standardDelay * 2, expectedQuota - 1)).then(function(response) {
    63                     // This should be our last completing fetch(). We need to validate that the last fetch we sent out actually
    64                     // completed.
    65                     assert_true(lastFetchSucceeded, "Out last fetch after gaining Quota back should have succeeded.");
     67                const first = fetchKeepAliveRequest(standardDelay * 2, expectedQuota - 1);
     68
     69                // Now create a single Byte request that will complete quicker.
     70                const second = fetchKeepAliveRequest(standardDelay, 1 /* bodySize */).then(() => {
     71                    // We shouldn't be able to create a 2 Byte request right now as only 1 Byte should have freed up.
     72                    return promise_rejects(test, TypeError(), fetchKeepAliveRequest(noDelay, 2 /* bodySize */));
     73                }).then(() => {
     74                    // Now validate that we can send another Keep-Alive fetch for just 1 Byte.
     75                    return fetchKeepAliveRequest(noDelay, 1 /* bodySize */);
    6676                });
    6777
    68                 // Now create a single Byte request that will complete quicker.
    69                 fetch(CreateKeepAliveRequest(standardDelay, 1 /* bodySize */)).then(function(response) {
    70                     // We shouldn't be able to create a 2 Byte request right now as only 1 Byte should have freed up.
    71                     assert_throws(new TypeError(), fetch(CreateKeepAliveRequest(0 /* delay */, 2 /* bodySize */)), "Only 1 Byte of Quota should be available right now.");
    72 
    73                     // Now validate that we can send another Keep-Alive fetch for just 1 Byte.
    74                     fetch(CreateKeepAliveRequest(0 /* delay */, 1 /* bodySize */)).then(function(response) {
    75                         // Flag we got a response from this request.
    76                         lastFetchSucceeded = true;
    77                     });
    78                 });
    79 
    80                 return firstFetch;
    81             }, "A Keep-Alive fetch() should return only it's allocated Quota upon promise resolution.");
     78                return Promise.all([first, second]);
     79            }, 'A Keep-Alive fetch() should return only its allocated Quota upon promise resolution.');
    8280
    8381            // Test rejecting a fetch() after the quota is used up.
    8482            promise_test(function (test) {
    8583                // Fill our Quota then try to send a second fetch.
    86                 fetch(CreateKeepAliveRequest(standardDelay, expectedQuota));
     84                const p = fetchKeepAliveRequest(standardDelay, expectedQuota);
    8785
    88                 return promise_rejects(test, new TypeError(), fetch(CreateKeepAliveRequest(0 /* delay */, 1 /* bodySize */)));
    89             }, "A Keep-Alive fetch() should not be allowed if the Quota is used up.");
     86                const q = promise_rejects(test, TypeError(), fetchKeepAliveRequest(noDelay, 1 /* bodySize */));
     87                return Promise.all([p, q]);
     88            }, 'A Keep-Alive fetch() should not be allowed if the Quota is used up.');
    9089
    9190        </script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-keepalive.html

    r220244 r230330  
    11<!doctype html>
    22<html>
    3   <head>
    4     <meta charset="utf-8">
    5     <title>Request init: keep alive</title>
    6     <script src="/resources/testharness.js"></script>
    7     <script src="/resources/testharnessreport.js"></script>
    8   </head>
    9   <body>
    10     <script>
    11       test(function() {
    12           var requestBody = "body";
    13           assert_true(new Request("", {keepalive: true, body: requestBody, method: "POST"}).keepalive, "set keep alive to true");
    14           assert_false(new Request("", {keepalive: false, body: requestBody, method: "POST"}).keepalive, "set keep alive to false");
    15           assert_false(new Request("", {body: requestBody, method: "POST"}).keepalive, "keep alive default value");
    16       }, "Create Request with keep alive values");
     3<head>
     4<meta charset="utf-8">
     5<title>Request keepalive</title>
     6<meta name="help" href="https://fetch.spec.whatwg.org/#request">
     7<script src="/resources/testharness.js"></script>
     8<script src="/resources/testharnessreport.js"></script>
     9<script src="/common/utils.js"></script>
     10<script src="/common/get-host-info.sub.js"></script>
     11</head>
     12<body>
     13<script>
     14test(() => {
     15  assert_false(new Request('/').keepalive, 'default');
     16  assert_true(new Request('/', {keepalive: true}).keepalive, 'true');
     17  assert_false(new Request('/', {keepalive: false}).keepalive, 'false');
     18  assert_true(new Request('/', {keepalive: 1}).keepalive, 'truish');
     19  assert_false(new Request('/', {keepalive: 0}).keepalive, 'falsy');
     20}, 'keepalive flag');
    1721
    18       test(function() {
    19           var requestBody = "body";
    20           assert_true(new Request("", {keepalive: true, body: requestBody, method: "POST"}).clone().keepalive, "set keep alive to true");
    21           assert_false(new Request("", {keepalive: false, body: requestBody, method: "POST"}).clone().keepalive, "set keep alive to false");
    22           assert_false(new Request("", {body: requestBody, method: "POST"}).clone().keepalive, "keep alive default value");
    23       }, "Clone Request with keep alive values");
    24 
    25       test(function() {
    26           assert_throws(new TypeError(), () => {
    27             new Request("", {keepalive: true, body: new ReadableStream(), method: "POST"});
    28           });
    29       }, "Request with keep alive and ReadableStream body");
    30     </script>
    31   </body>
     22test(() => {
     23  const init = {method: 'POST', keepalive: true, body: new ReadableStream()};
     24  assert_throws('TypeError', () => {new Request('/', init)});
     25}, 'keepalive flag with stream body');
     26</script>
     27</body>
    3228</html>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/redirect.py

    r229907 r230330  
    11from urllib import urlencode
    22from urlparse import urlparse
     3import time
    34
    45def main(request, response):
    … …  
    5354        headers.append(("Referrer-Policy", request.GET['redirect_referrerpolicy']))
    5455
     56    if "delay" in request.GET:
     57        time.sleep(float(request.GET.first("delay", 0)) / 1E3)
     58
    5559    if token:
    5660        request.server.stash.put(request.GET.first("token"), stashed_data)
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/resources/trickle.py

    r195954 r230330  
    44    delay = float(request.GET.first("ms", 500)) / 1E3
    55    count = int(request.GET.first("count", 50))
     6    # Read request body
     7    request.body
    68    time.sleep(delay)
    79    response.headers.set("Content-type", "text/plain")
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-consume.html

    r210823 r230330  
    3232    }
    3333
     34    function blobToTypeViaFetch(blob) {
     35      var url = URL.createObjectURL(blob);
     36      return fetch(url).then(function(response) {
     37        return response.headers.get('Content-Type');
     38      });
     39    }
     40
    3441    function responsePromise(body, responseInit) {
    3542      return new Promise(function(resolve, reject) {
    … …  
    7683        assert_equals(bodyAsBlob.type, expectedType || "text/plain", "Blob body type should be computed from the response Content-Type");
    7784
    78         var promise = new Promise( function (resolve, reject) {
    79           var reader = new FileReader();
    80           reader.onload = function(evt) {
    81             resolve(reader.result)
    82           };
    83           reader.onerror = function () {
    84             reject("Blob's reader failed");
    85           };
    86           reader.readAsText(bodyAsBlob);
     85        var promise = blobToTypeViaFetch(bodyAsBlob).then(function(type) {
     86          assert_equals(type, expectedType || "text/plain", 'Type via blob URL');
     87          return new Promise( function (resolve, reject) {
     88            var reader = new FileReader();
     89            reader.onload = function(evt) {
     90              resolve(reader.result)
     91            };
     92            reader.onerror = function () {
     93              reject("Blob's reader failed");
     94            };
     95            reader.readAsText(bodyAsBlob);
     96          });
    8797        });
    8898        return promise.then(function(body) {
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-init-002-expected.txt

    r224956 r230330  
    77PASS Read Response's body as readableStream
    88PASS Testing empty Response Content-Type header
     9PASS Testing null Response body
    910
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-init-002.html

    r205076 r230330  
    6666      }, "Testing empty Response Content-Type header");
    6767
     68      test(function() {
     69        var response = new Response(null, {status: 204});
     70        assert_equals(response.body, null);
     71      }, "Testing null Response body");
     72
    6873    </script>
    6974  </body>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-trailer-expected.txt

    r213882 r230330  
    11
    2 FAIL trailer() test promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'res.trailer.then')"
     2FAIL trailer() test assert_equals: expected (string) "X-Test-Me" but got (object) null
    33
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-trailer.html

    r223273 r230330  
    44<script src=/resources/testharnessreport.js></script>
    55<div id=log></div>
    6 <!-- based on /XMLHttpRequest/getresponseheader-chunked-trailer.htm -->
     6<!-- based on /xhr/getresponseheader-chunked-trailer.htm -->
    77<script>
    88promise_test(() => {
    9   return fetch("/XMLHttpRequest/resources/chunked.py").then(res => {
     9  return fetch("/xhr/resources/chunked.py").then(res => {
    1010    assert_equals(res.headers.get("Trailer"), "X-Test-Me")
    1111    assert_equals(res.headers.get("X-Test-Me"), null)
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.html

    r215164 r230330  
    202202              ["Cache-Control", "only-if-cached"]
    203203            ],
    204             expected_status: 504
     204            expected_status: 504,
     205            expected_response_text: ""
    205206          }
    206207        ]
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/heuristic.html

    r215164 r230330  
    2727          {
    2828            expected_type: "cached",
     29            response_status: [299, "Whatever"],
    2930          }
    3031        ]
    … …  
    3637            response_status: [299, "Whatever"],
    3738            response_headers: [
    38               ['Last-Modified', http_date(-3 * 100)],
    39               ['Cache-Control', 'public']
     39              ['Last-Modified', http_date(-3 * 100)]
    4040            ],
    4141          },
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/partial.html

    r215164 r230330  
    2525            response_headers: [
    2626              ['Cache-Control', 'max-age=3600'],
    27               ['Content-Range', 'bytes 0-4/10']
     27              ['Content-Range', 'bytes 4-9/10']
    2828            ],
    2929            response_body: "01234",
    … …  
    3737            ],
    3838            expected_type: "cached",
    39             expected_status: 206
     39            expected_status: 206,
     40            expected_response_text: "01234"
    4041          }
    4142        ]
    4243      },
    4344      {
    44         name: 'HTTP cache stores complete response and serves smaller ranges from it.',
     45        name: 'HTTP cache stores complete response and serves smaller ranges from it(byte-range-spec).',
    4546        requests: [
    4647          {
    … …  
    5253          {
    5354            request_headers: [
    54               ['Range', "bytes=-1"]
     55              ['Range', "bytes=0-1"]
    5556            ],
    5657            expected_type: "cached",
     58            expected_status: 206,
    5759            expected_response_text: "01"
     60          },
     61        ]
     62      },
     63      {
     64        name: 'HTTP cache stores complete response and serves smaller ranges from it(absent last-byte-pos).',
     65        requests: [
     66          {
     67            response_headers: [
     68              ['Cache-Control', 'max-age=3600'],
     69            ],
     70            response_body: "01234567890",
     71          },
     72          {
     73            request_headers: [
     74              ['Range', "bytes=1-"]
     75            ],
     76            expected_type: "cached",
     77            expected_status: 206,
     78            expected_response_text: "1234567890"
    5879          }
    5980        ]
    6081      },
    6182      {
    62         name: 'HTTP cache stores partial response and serves smaller ranges from it.',
     83        name: 'HTTP cache stores complete response and serves smaller ranges from it(suffix-byte-range-spec).',
     84        requests: [
     85          {
     86            response_headers: [
     87              ['Cache-Control', 'max-age=3600'],
     88            ],
     89            response_body: "0123456789A",
     90          },
     91          {
     92            request_headers: [
     93              ['Range', "bytes=-1"]
     94            ],
     95            expected_type: "cached",
     96            expected_status: 206,
     97            expected_response_text: "A"
     98          }
     99        ]
     100      },
     101      {
     102        name: 'HTTP cache stores partial response and serves smaller ranges from it(byte-range-spec).',
    63103        requests: [
    64104          {
    … …  
    69109            response_headers: [
    70110              ['Cache-Control', 'max-age=3600'],
    71               ['Content-Range', 'bytes 0-4/10']
     111              ['Content-Range', 'bytes 4-9/10']
     112            ],
     113            response_body: "01234",
     114          },
     115          {
     116            request_headers: [
     117              ['Range', "bytes=6-8"]
     118            ],
     119            expected_type: "cached",
     120            expected_status: 206,
     121            expected_response_text: "234"
     122          }
     123        ]
     124      },
     125      {
     126        name: 'HTTP cache stores partial response and serves smaller ranges from it(absent last-byte-pos).',
     127        requests: [
     128          {
     129            request_headers: [
     130              ['Range', "bytes=-5"]
     131            ],
     132            response_status: [206, "Partial Content"],
     133            response_headers: [
     134              ['Cache-Control', 'max-age=3600'],
     135              ['Content-Range', 'bytes 4-9/10']
     136            ],
     137            response_body: "01234",
     138          },
     139          {
     140            request_headers: [
     141              ['Range', "bytes=6-"]
     142            ],
     143            expected_type: "cached",
     144            expected_status: 206,
     145            expected_response_text: "234"
     146          }
     147        ]
     148      },
     149      {
     150        name: 'HTTP cache stores partial response and serves smaller ranges from it(suffix-byte-range-spec).',
     151        requests: [
     152          {
     153            request_headers: [
     154              ['Range', "bytes=-5"]
     155            ],
     156            response_status: [206, "Partial Content"],
     157            response_headers: [
     158              ['Cache-Control', 'max-age=3600'],
     159              ['Content-Range', 'bytes 4-9/10']
    72160            ],
    73161            response_body: "01234",
    … …  
    78166            ],
    79167            expected_type: "cached",
    80             expected_response_text: "01"
     168            expected_status: 206,
     169            expected_response_text: "4"
    81170          }
    82171        ]
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/vary-expected.txt

    r215164 r230330  
    1010PASS HTTP cache reuses three-way Vary response when request matches.
    1111PASS HTTP cache doesn't use three-way Vary response when request doesn't match.
    12 PASS HTTP cache doesn't use three-way Vary response when request omits variant header.
     12PASS HTTP cache doesn't use three-way Vary response when request doesn't match, regardless of header order.
     13PASS HTTP cache uses three-way Vary response when both request and the original request omited a variant header.
     14PASS HTTP cache doesn't use Vary response with a field value of '*'.
    1315
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/vary.html

    r215164 r230330  
    104104              ["Foo", "1"]
    105105            ],
     106            response_body: http_content('foo_1'),
    106107            expected_type: "cached"
    107108          }
    … …  
    246247      },
    247248      {
    248         name: "HTTP cache doesn't use three-way Vary response when request omits variant header.",
    249         requests: [
    250           {
    251             request_headers: [
    252               ["Foo", "1"],
     249        name: "HTTP cache doesn't use three-way Vary response when request doesn't match, regardless of header order.",
     250        requests: [
     251          {
     252            request_headers: [
     253              ["Foo", "1"],
     254              ["Bar", "abc4"],
    253255              ["Baz", "789"]
    254256            ],
    … …  
    260262          },
    261263          {
     264            request_headers: [
     265              ["Foo", "1"],
     266              ["Bar", "abc"],
     267              ["Baz", "789"]
     268            ],
     269            expected_type: "not_cached"
     270          }
     271        ]
     272      },
     273      {
     274        name: "HTTP cache uses three-way Vary response when both request and the original request omited a variant header.",
     275        requests: [
     276          {
     277            request_headers: [
     278              ["Foo", "1"],
     279              ["Baz", "789"]
     280            ],
     281            response_headers: [
     282              ["Expires", http_date(5000)],
     283              ["Last-Modified", http_date(-3000)],
     284              ["Vary", "Foo, Bar, Baz"]
     285            ]
     286          },
     287          {
     288            request_headers: [
     289              ["Foo", "1"],
     290              ["Baz", "789"]
     291            ],
     292            expected_type: "cached"
     293          }
     294        ]
     295      },
     296      {
     297        name: "HTTP cache doesn't use Vary response with a field value of '*'.",
     298        requests: [
     299          {
     300            request_headers: [
     301              ["Foo", "1"],
     302              ["Baz", "789"]
     303            ],
     304            response_headers: [
     305              ["Expires", http_date(5000)],
     306              ["Last-Modified", http_date(-3000)],
     307              ["Vary", "*"]
     308            ]
     309          },
     310          {
     311            request_headers: [
     312              ["*", "1"],
     313              ["Baz", "789"]
     314            ],
    262315            expected_type: "not_cached"
    263316          }
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/importscripts.js

    r222307 r230330  
    1515}
    1616
    17 [null, "", "x", "x/x"].forEach(function(mime) {
     17[null, "", "x", "x/x", "text/html", "text/json"].forEach(function(mime) {
    1818  try {
    1919    importScripts(get_url(mime))
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/resources/css.py

    r200195 r230330  
    11def main(request, response):
    2     outcome = request.GET.first("outcome", "f")
    32    type = request.GET.first("type", None)
     3    is_revalidation = request.headers.get("If-Modified-Since", None)
    44
    55    content = "/* nothing to see here */"
    66
    77    response.add_required_headers = False
    8     response.writer.write_status(200)
    9     response.writer.write_header("x-content-type-options", "nosniff")
    10     response.writer.write_header("content-length", len(content))
    11     if(type != None):
    12       response.writer.write_header("content-type", type)
    13     response.writer.end_headers()
    14 
    15     response.writer.write(content)
     8    if is_revalidation is not None:
     9      response.writer.write_status(304)
     10      response.writer.write_header("x-content-type-options", "nosniff")
     11      response.writer.write_header("content-length", 0)
     12      if(type != None):
     13        response.writer.write_header("content-type", type)
     14      response.writer.end_headers()
     15      response.writer.write("")
     16    else:
     17      response.writer.write_status(200)
     18      response.writer.write_header("x-content-type-options", "nosniff")
     19      response.writer.write_header("content-length", len(content))
     20      if(type != None):
     21        response.writer.write_header("content-type", type)
     22      response.writer.end_headers()
     23      response.writer.write(content)
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/script-expected.txt

    r222307 r230330  
    44PASS URL query: x
    55PASS URL query: x/x
     6PASS URL query: text/html
     7PASS URL query: text/json
    68PASS URL query: text/javascript
    79PASS URL query: text/ecmascript
    810PASS URL query: text/ecmascript;blah
     11PASS URL query: text/javascript1.0
    912
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/script.html

    r222307 r230330  
    55  var log = function() {}, // see comment below
    66      p = function() {}, // see comment below
    7       fails = [null, "", "x", "x/x"],
    8       passes = ["text/javascript", "text/ecmascript", "text/ecmascript;blah"]
     7      fails = [null, "", "x", "x/x", "text/html", "text/json"],
     8      passes = ["text/javascript", "text/ecmascript", "text/ecmascript;blah", "text/javascript1.0"]
    99
    1010  // Ideally we'd also check whether the scripts in fact execute, but that would involve
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/stylesheet-expected.txt

    r222307 r230330  
    44PASS URL query: x
    55PASS URL query: x/x
     6PASS URL query: text/html
     7PASS URL query: text/json
     8PASS Revalidated URL query: null
     9PASS Revalidated URL query: 
     10PASS Revalidated URL query: x
     11PASS Revalidated URL query: x/x
     12PASS Revalidated URL query: text/html
     13PASS Revalidated URL query: text/json
    614PASS URL query: text/css
    715PASS URL query: text/css;charset=utf-8
    816PASS URL query: text/css;blah
     17PASS Revalidated URL query: text/css
     18PASS Revalidated URL query: text/css;charset=utf-8
     19PASS Revalidated URL query: text/css;blah
    920
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/stylesheet.html

    r223273 r230330  
    44<div id=log></div>
    55<script>
    6   var fails = [null, "", "x", "x/x"],
     6  var fails = [null, "", "x", "x/x", "text/html", "text/json"],
    77      passes = ["text/css", "text/css;charset=utf-8", "text/css;blah"]
    88
    … …  
    1919      var link = document.createElement("link")
    2020      link.rel = "stylesheet"
    21       link.onerror = t.step_func_done(function(){})
     21      link.onerror = t.step_func_done()
    2222      link.onload = t.unreached_func("Unexpected load event")
     23      link.href = get_url(mime)
     24      document.body.appendChild(link)
     25    }, "URL query: " + mime)
     26  })
     27
     28  fails.forEach(function(mime) {
     29    async_test(function(t) {
     30      var link = document.createElement("link")
     31      link.rel = "stylesheet"
     32      link.onerror = t.step_func_done()
     33      link.onload = t.unreached_func("Unexpected load event")
     34      link.href = get_url(mime)
     35      document.body.appendChild(link)
     36    }, "Revalidated URL query: " + mime)
     37  })
     38
     39  passes.forEach(function(mime) {
     40    async_test(function(t) {
     41      var link = document.createElement("link")
     42      link.rel = "stylesheet"
     43      link.onerror = t.unreached_func("Unexpected error event")
     44      link.onload = t.step_func_done()
    2345      link.href = get_url(mime)
    2446      document.body.appendChild(link)
    … …  
    3153      link.rel = "stylesheet"
    3254      link.onerror = t.unreached_func("Unexpected error event")
    33       link.onload = t.step_func_done(function(){})
     55      link.onload = t.step_func_done()
    3456      link.href = get_url(mime)
    3557      document.body.appendChild(link)
    36     }, "URL query: " + mime)
     58    }, "Revalidated URL query: " + mime)
    3759  })
    3860</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/worker-expected.txt

    r216195 r230330  
    44PASS URL query: ?type=x
    55PASS URL query: ?type=x/x
     6PASS URL query: ?type=text/html
     7PASS URL query: ?type=text/json
    68PASS URL query: ?type=text/javascript
    79PASS URL query: ?type=text/ecmascript
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/nosniff/worker.html

    r200195 r230330  
    44<script>
    55  var workers = [],
    6       fails = ["", "?type=", "?type=x", "?type=x/x"],
     6      fails = ["", "?type=", "?type=x", "?type=x/x", "?type=text/html", "?type=text/json"],
    77      passes = ["?type=text/javascript", "?type=text/ecmascript", "?type=text/ecmascript;yay"]
    88
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r230253 r230330  
    33413341imported/w3c/web-platform-tests/css/css-color/t425-hsla-onscreen-multiple-boxes-c.xht [ Pass ]
    33423342
    3343 imported/w3c/web-platform-tests/2dcontext/transformations/canvas_transformations_reset_001.html [ Pass ]
    33443343imported/w3c/web-platform-tests/css/css-pseudo/first-letter-002.html [ Pass ]
    33453344imported/w3c/web-platform-tests/css/css-pseudo/first-letter-003.html [ Pass ]
  • trunk/LayoutTests/platform/ios-simulator/TestExpectations

    r229361 r230330  
    6767# This test requires Skia, which isn't available on iOS.
    6868webkit.org/b/174079 fast/text/variations/skia-postscript-name.html [ ImageOnlyFailure ]
     69
     70imported/w3c/web-platform-tests/2dcontext/transformations/canvas_transformations_reset_001.html [ ImageOnlyFailure ]
  • trunk/LayoutTests/platform/ios/TestExpectations

    r230289 r230330  
    30193019imported/w3c/web-platform-tests/css/mediaqueries/device-aspect-ratio-003.html [ ImageOnlyFailure ]
    30203020
    3021 webkit.org/b/170698 [ Release ] imported/w3c/web-platform-tests/IndexedDB/interleaved-cursors.html [ Pass Failure ]
    3022 
    30233021# This test tests a feature that only exists on iOS.
    30243022fast/text/accessibility-bold-system-font-2.html [ Pass ]
  • trunk/LayoutTests/platform/mac-wk1/TestExpectations

    r230290 r230330  
    395395webkit.org/b/165589 pointer-lock/lock-lost-on-esc-in-fullscreen.html [ Skip ]
    396396
    397 imported/w3c/web-platform-tests/IndexedDB/interleaved-cursors.html [ Failure ]
    398397imported/w3c/web-platform-tests/html/webappapis/timers/negative-settimeout.html [ Failure ]
    399398
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r230296 r230330  
    827827webkit.org/b/177214 [ ElCapitan Debug ] imported/w3c/web-platform-tests/FileAPI/historical.https.html [ Pass Failure ]
    828828
     829imported/w3c/web-platform-tests/FileAPI/url/sandboxed-iframe.html [ Pass ]
     830
    829831webkit.org/b/177687 http/tests/inspector/network/resource-sizes-memory-cache.html [ Pass Failure ]
    830832
  • trunk/LayoutTests/platform/mac/TestExpectations

    r230296 r230330  
    14711471webkit.org/b/175193 fast/images/async-image-body-background-image.html [ Pass Timeout ]
    14721472
    1473 webkit.org/b/170698 [ Release ] imported/w3c/web-platform-tests/IndexedDB/interleaved-cursors.html [ Pass Failure ]
    1474 
    14751473# This test is specific to Core Text.
    14761474fast/text/font-lookup-dot-prefix-case-sensitive.html [ Pass ]
    … …  
    17401738
    17411739webkit.org/b/177616 [ HighSierra+ ] http/tests/media/video-buffered-range-contains-currentTime.html [ Pass Timeout ]
     1740
     1741[ Debug ] imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method-worker.html [ Crash ]
     1742[ Debug ] imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.html [ Crash ]
  • trunk/LayoutTests/platform/wpe/TestExpectations

    r230253 r230330  
    205205imported/w3c/web-platform-tests/dom [ Pass ]
    206206imported/w3c/web-platform-tests/dom/nodes/Document-constructor-svg.svg [ Timeout ]
    207 
    208 
    209 # WPT: 2dcontext
    210 # ==============
    211 imported/w3c/web-platform-tests/2dcontext/transformations/canvas_transformations_reset_001.html [ Pass ]
    212207
    213208
Note: See TracChangeset for help on using the changeset viewer.