Changeset 186024 in webkit


Ignore:
Timestamp:
Jun 27, 2015 1:04:19 AM (9 years ago)
Author:
youenn.fablet@crf.canon.fr
Message:

[Streams API] Implement ReadableStreamController.desiredSize property
https://bugs.webkit.org/show_bug.cgi?id=146311

Reviewed by Darin Adler.

Source/WebCore:

Covered by rebased tests.

  • Modules/streams/ReadableStreamController.h: Adding desiredSize getter.

(WebCore::ReadableStreamController::desiredSize): Ditto.

  • Modules/streams/ReadableStreamController.idl: Added desiredSize attribute.

LayoutTests:

  • streams/reference-implementation/count-queuing-strategy-expected.txt:
  • streams/reference-implementation/readable-stream-expected.txt:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r186021 r186024  
     12015-06-27  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
     2
     3        [Streams API] Implement ReadableStreamController.desiredSize property
     4        https://bugs.webkit.org/show_bug.cgi?id=146311
     5
     6        Reviewed by Darin Adler.
     7
     8        * streams/reference-implementation/count-queuing-strategy-expected.txt:
     9        * streams/reference-implementation/readable-stream-expected.txt:
     10
    1112015-06-26  Myles C. Maxfield  <mmaxfield@apple.com>
    212
  • trunk/LayoutTests/streams/reference-implementation/count-queuing-strategy-expected.txt

    r185586 r186024  
    44PASS CountQueuingStrategy instances have the correct properties
    55PASS Can construct a readable stream with a valid CountQueuingStrategy
    6 FAIL Correctly governs the return value of a ReadableStream's enqueue function (HWM = 0) assert_equals: 0 reads, 0 enqueues: desiredSize should be 0 expected (number) 0 but got (undefined) undefined
    7 FAIL Correctly governs a ReadableStreamController's desiredSize property (HWM = 1) assert_equals: 0 reads, 0 enqueues: desiredSize should be 1 expected (number) 1 but got (undefined) undefined
    8 FAIL Correctly governs a ReadableStreamController's desiredSize property (HWM = 4) assert_equals: 0 reads, 0 enqueues: desiredSize should be 4 expected (number) 4 but got (undefined) undefined
     6PASS Correctly governs the return value of a ReadableStream's enqueue function (HWM = 0)
     7PASS Correctly governs a ReadableStreamController's desiredSize property (HWM = 1)
     8PASS Correctly governs a ReadableStreamController's desiredSize property (HWM = 4)
    99
  • trunk/LayoutTests/streams/reference-implementation/readable-stream-expected.txt

    r185953 r186024  
    66PASS ReadableStream constructor can get initial garbage as cancel argument
    77PASS ReadableStream constructor can get initial garbage as pull argument
    8 FAIL ReadableStream start should be called with the proper parameters assert_array_equals: the controller should have the right properties lengths differ, expected 5 got 4
    9 FAIL ReadableStream start controller parameter should be extensible assert_array_equals: prototype should have the right properties lengths differ, expected 5 got 4
     8FAIL ReadableStream start should be called with the proper parameters assert_false: close should be non-enumerable expected false got true
     9PASS ReadableStream start controller parameter should be extensible
    1010PASS ReadableStream should be able to call start method within prototype chain of its source
    1111PASS ReadableStream start should be able to return a promise
     
    2727PASS ReadableStream: enqueue should throw the stored error when the stream is errored
    2828PASS ReadableStream: should call underlying source methods as methods
    29 FAIL ReadableStream strategies: the default strategy should give desiredSize of 1 to start, decreasing by 1 per enqueue assert_equals: expected (number) 1 but got (undefined) undefined
    30 FAIL ReadableStream strategies: the default strategy should continue giving desiredSize of 1 if the chunks are read immediately assert_equals: desiredSize should start at 1 expected (number) 1 but got (undefined) undefined
     29PASS ReadableStream strategies: the default strategy should give desiredSize of 1 to start, decreasing by 1 per enqueue
     30PASS ReadableStream strategies: the default strategy should continue giving desiredSize of 1 if the chunks are read immediately
    3131PASS ReadableStream integration test: adapting a random push source
    3232PASS ReadableStream integration test: adapting a sync pull source
  • trunk/Source/WebCore/ChangeLog

    r186023 r186024  
     12015-06-27  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
     2
     3        [Streams API] Implement ReadableStreamController.desiredSize property
     4        https://bugs.webkit.org/show_bug.cgi?id=146311
     5
     6        Reviewed by Darin Adler.
     7
     8        Covered by rebased tests.
     9
     10        * Modules/streams/ReadableStreamController.h: Adding desiredSize getter.
     11        (WebCore::ReadableStreamController::desiredSize): Ditto.
     12        * Modules/streams/ReadableStreamController.idl: Added desiredSize attribute.
     13
    1142015-06-27  Carlos Garcia Campos  <cgarcia@igalia.com>
    215
  • trunk/Source/WebCore/Modules/streams/ReadableStreamController.h

    r183866 r186024  
    5050    void deref() { m_stream.deref(); }
    5151
     52    double desiredSize() const { return m_stream.desiredSize(); }
     53
    5254private:
    5355    ReadableJSStream& m_stream;
  • trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl

    r185039 r186024  
    3737    [Custom, RaisesException] void close();
    3838    [Custom, RaisesException] void error(any error);
     39
     40    readonly attribute double desiredSize;
    3941};
Note: See TracChangeset for help on using the changeset viewer.