Changeset 210017 in webkit


Ignore:
Timestamp:
Dec 20, 2016 2:24:39 AM (7 years ago)
Author:
nael.ouedraogo@crf.canon.fr
Message:

WebRTC: RTCPeerConnection constructor argument should be optional
https://bugs.webkit.org/show_bug.cgi?id=164057

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Update expectation of RTCPeerConnection constructor tests.

  • web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:

Source/WebCore:

Modify RTCPeerConnection JSBuiltin constructor to allow RTCPeerConfiguration
argument to be optional.

Update existing tests.

  • Modules/mediastream/RTCPeerConnection.js:

(initializeRTCPeerConnection):

LayoutTests:

Remove tests since they are duplicated with WPT tests.

  • fast/mediastream/RTCPeerConnection-expected.txt:
  • fast/mediastream/RTCPeerConnection.html:
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r210012 r210017  
     12016-12-20  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
     2
     3        WebRTC: RTCPeerConnection constructor argument should be optional
     4        https://bugs.webkit.org/show_bug.cgi?id=164057
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Remove tests since they are duplicated with WPT tests.
     9
     10        * fast/mediastream/RTCPeerConnection-expected.txt:
     11        * fast/mediastream/RTCPeerConnection.html:
     12
    1132016-12-19  Ryan Haddad  <ryanhaddad@apple.com>
    214
  • trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt

    r209752 r210017  
    55
    66PASS new RTCPeerConnection(null); threw exception TypeError: RTCPeerConnection argument must be a valid dictionary.
    7 PASS new RTCPeerConnection(undefined); threw exception TypeError: RTCPeerConnection argument must be a valid dictionary.
    8 PASS new RTCPeerConnection(); threw exception TypeError: Not enough arguments.
    97PASS new RTCPeerConnection(''); threw exception TypeError: RTCPeerConnection argument must be a valid dictionary.
    108PASS new RTCPeerConnection({}); did not throw exception.
  • trunk/LayoutTests/fast/mediastream/RTCPeerConnection.html

    r209695 r210017  
    99
    1010            shouldThrow("new RTCPeerConnection(null);");
    11             shouldThrow("new RTCPeerConnection(undefined);");
    12             shouldThrow("new RTCPeerConnection();");
    1311            shouldThrow("new RTCPeerConnection('');");
    1412            shouldNotThrow("new RTCPeerConnection({});");
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r209917 r210017  
     12016-12-20  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
     2
     3        WebRTC: RTCPeerConnection constructor argument should be optional
     4        https://bugs.webkit.org/show_bug.cgi?id=164057
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Update expectation of RTCPeerConnection constructor tests.
     9
     10        * web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:
     11
    1122016-12-16  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt

    r209861 r210017  
    11
    22PASS RTCPeerConnection.length
    3 FAIL new RTCPeerConnection() Not enough arguments
     3PASS new RTCPeerConnection()
    44FAIL new RTCPeerConnection(null) RTCPeerConnection argument must be a valid dictionary
    5 FAIL new RTCPeerConnection(undefined) RTCPeerConnection argument must be a valid dictionary
     5PASS new RTCPeerConnection(undefined)
    66PASS new RTCPeerConnection({})
    77PASS new RTCPeerConnection({ iceServers: null })
     
    9494FAIL new RTCPeerConnection({ certificates: [certificate] }) RTCPeerConnection.generateCertificate is not a function. (In 'RTCPeerConnection.generateCertificate({ name: "ECDSA", namedCurve: "P-256" })', 'RTCPeerConnection.generateCertificate' is undefined)
    9595FAIL new RTCPeerConnection({ certificates: [expiredCertificate] }) RTCPeerConnection.generateCertificate is not a function. (In 'RTCPeerConnection.generateCertificate({ name: "ECDSA", namedCurve: "P-256", expires: 0 })', 'RTCPeerConnection.generateCertificate' is undefined)
    96 FAIL localDescription initial value Not enough arguments
    97 FAIL currentLocalDescription initial value Not enough arguments
    98 FAIL pendingLocalDescription initial value Not enough arguments
    99 FAIL remoteDescription initial value Not enough arguments
    100 FAIL currentRemoteDescription initial value Not enough arguments
    101 FAIL pendingRemoteDescription initial value Not enough arguments
    102 FAIL signalingState initial value Not enough arguments
    103 FAIL iceGatheringState initial value Not enough arguments
    104 FAIL iceConnectionState initial value Not enough arguments
    105 FAIL connectionState initial value Not enough arguments
    106 FAIL canTrickleIceCandidates initial value Not enough arguments
     96PASS localDescription initial value
     97PASS currentLocalDescription initial value
     98PASS pendingLocalDescription initial value
     99PASS remoteDescription initial value
     100PASS currentRemoteDescription initial value
     101PASS pendingRemoteDescription initial value
     102PASS signalingState initial value
     103PASS iceGatheringState initial value
     104PASS iceConnectionState initial value
     105FAIL connectionState initial value assert_equals: expected (string) "new" but got (undefined) undefined
     106FAIL canTrickleIceCandidates initial value assert_equals: expected (object) null but got (undefined) undefined
    107107
  • trunk/Source/WebCore/ChangeLog

    r210016 r210017  
     12016-12-20  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
     2
     3        WebRTC: RTCPeerConnection constructor argument should be optional
     4        https://bugs.webkit.org/show_bug.cgi?id=164057
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Modify RTCPeerConnection JSBuiltin constructor to allow RTCPeerConfiguration
     9        argument to be optional.
     10
     11        Update existing tests.
     12
     13        * Modules/mediastream/RTCPeerConnection.js:
     14        (initializeRTCPeerConnection):
     15
    1162016-12-19  Yusuke Suzuki  <utatane.tea@gmail.com>
    217
  • trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js

    r209752 r210017  
    3535    "use strict";
    3636
    37     if (arguments.length < 1)
    38         @throwTypeError("Not enough arguments");
    39 
    40     if (!@isObject(configuration))
     37    if (configuration === @undefined)
     38        configuration = {};
     39    else if (!@isObject(configuration))
    4140        @throwTypeError("RTCPeerConnection argument must be a valid dictionary");
    4241
     
    4948        @throwTypeError(message);
    5049    }
    51 
    5250    this.@operations = [];
    5351    this.@localStreams = [];
Note: See TracChangeset for help on using the changeset viewer.