Changeset 220244 in webkit


Ignore:
Timestamp:
Aug 3, 2017 6:00:13 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[Fetch API] Add support for Request keepalive getter
https://bugs.webkit.org/show_bug.cgi?id=175151

Patch by Youenn Fablet <youenn@apple.com> on 2017-08-03
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/request/request-idl-expected.txt:
  • web-platform-tests/fetch/api/request/request-idl.html:
  • web-platform-tests/fetch/api/request/request-keepalive-expected.txt: Added.
  • web-platform-tests/fetch/api/request/request-keepalive.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/fetch/api/request/request-keepalive.html

Adding keepalive as a fetch option.
Adding initialization and getter of keepalive into FetchRequest.

  • Modules/fetch/FetchRequest.cpp:

(WebCore::buildOptions):

  • Modules/fetch/FetchRequest.h:
  • Modules/fetch/FetchRequest.idl:
  • loader/FetchOptions.h:
Location:
trunk
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r220223 r220244  
     12017-08-03  Youenn Fablet  <youenn@apple.com>
     2
     3        [Fetch API] Add support for Request keepalive getter
     4        https://bugs.webkit.org/show_bug.cgi?id=175151
     5
     6        Reviewed by Chris Dumez.
     7
     8        * web-platform-tests/fetch/api/request/request-idl-expected.txt:
     9        * web-platform-tests/fetch/api/request/request-idl.html:
     10        * web-platform-tests/fetch/api/request/request-keepalive-expected.txt: Added.
     11        * web-platform-tests/fetch/api/request/request-keepalive.html: Added.
     12
    1132017-08-03  Youenn Fablet  <youenn@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-idl-expected.txt

    r217047 r220244  
    1717PASS Request interface: attribute redirect
    1818PASS Request interface: attribute integrity
     19PASS Request interface: attribute keepalive
    1920PASS Request interface: operation clone()
    2021FAIL Request interface: attribute body assert_true: The prototype object must have a property "body" expected true got false
     
    3738PASS Request interface: new Request("") must inherit property "redirect" with the proper type (10)
    3839PASS Request interface: new Request("") must inherit property "integrity" with the proper type (11)
    39 PASS Request interface: new Request("") must inherit property "clone" with the proper type (12)
    40 FAIL Request interface: new Request("") must inherit property "body" with the proper type (13) assert_inherits: property "body" not found in prototype chain
    41 PASS Request interface: new Request("") must inherit property "bodyUsed" with the proper type (14)
    42 PASS Request interface: new Request("") must inherit property "arrayBuffer" with the proper type (15)
    43 PASS Request interface: new Request("") must inherit property "blob" with the proper type (16)
    44 FAIL Request interface: new Request("") must inherit property "formData" with the proper type (17) assert_inherits: property "formData" not found in prototype chain
    45 PASS Request interface: new Request("") must inherit property "json" with the proper type (18)
    46 PASS Request interface: new Request("") must inherit property "text" with the proper type (19)
     40PASS Request interface: new Request("") must inherit property "keepalive" with the proper type (12)
     41PASS Request interface: new Request("") must inherit property "clone" with the proper type (13)
     42FAIL Request interface: new Request("") must inherit property "body" with the proper type (14) assert_inherits: property "body" not found in prototype chain
     43PASS Request interface: new Request("") must inherit property "bodyUsed" with the proper type (15)
     44PASS Request interface: new Request("") must inherit property "arrayBuffer" with the proper type (16)
     45PASS Request interface: new Request("") must inherit property "blob" with the proper type (17)
     46FAIL Request interface: new Request("") must inherit property "formData" with the proper type (18) assert_inherits: property "formData" not found in prototype chain
     47PASS Request interface: new Request("") must inherit property "json" with the proper type (19)
     48PASS Request interface: new Request("") must inherit property "text" with the proper type (20)
    4749
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-idl.html

    r212202 r220244  
    4747        readonly attribute RequestRedirect redirect;
    4848        readonly attribute DOMString integrity;
     49        readonly attribute boolean keepalive;
    4950
    5051        [NewObject] Request clone();
  • trunk/Source/WebCore/ChangeLog

    r220243 r220244  
     12017-08-03  Youenn Fablet  <youenn@apple.com>
     2
     3        [Fetch API] Add support for Request keepalive getter
     4        https://bugs.webkit.org/show_bug.cgi?id=175151
     5
     6        Reviewed by Chris Dumez.
     7
     8        Test: imported/w3c/web-platform-tests/fetch/api/request/request-keepalive.html
     9
     10        Adding keepalive as a fetch option.
     11        Adding initialization and getter of keepalive into FetchRequest.
     12
     13        * Modules/fetch/FetchRequest.cpp:
     14        (WebCore::buildOptions):
     15        * Modules/fetch/FetchRequest.h:
     16        * Modules/fetch/FetchRequest.idl:
     17        * loader/FetchOptions.h:
     18
    1192017-08-03  Yoshiaki Jitsukawa  <jitsu@rd.scei.sony.co.jp>
    220
  • trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp

    r220241 r220244  
    105105        request.options.integrity = init.integrity;
    106106
     107    if (init.keepalive && init.keepalive.value())
     108        request.options.keepAlive = true;
     109
    107110    if (!init.method.isNull()) {
    108111        if (auto exception = setMethod(request.request, init.method))
  • trunk/Source/WebCore/Modules/fetch/FetchRequest.h

    r220241 r220244  
    6868    Cache cache() const;
    6969    Redirect redirect() const;
     70    bool keepalive() const { return m_internalRequest.options.keepAlive; };
    7071
    7172    const String& integrity() const { return m_internalRequest.options.integrity; }
  • trunk/Source/WebCore/Modules/fetch/FetchRequest.idl

    r220241 r220244  
    5757    readonly attribute FetchRequestRedirect redirect;
    5858    readonly attribute DOMString integrity;
    59     // FIXME: Add support for keepalive.
    60     // readonly attribute boolean keepalive;
     59    readonly attribute boolean keepalive;
    6160
    6261    [CallWith=ScriptExecutionContext, MayThrowException, NewObject] FetchRequest clone();
  • trunk/Source/WebCore/loader/FetchOptions.h

    r220208 r220244  
    5656
    5757    String integrity;
     58
     59    bool keepAlive { false };
    5860};
    5961
Note: See TracChangeset for help on using the changeset viewer.