Changeset 202565 in webkit
- Timestamp:
- Jun 28, 2016 8:10:50 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202564 r202565 1 2016-06-28 Adam Bergkvist <adam.bergkvist@ericsson.com> 2 3 WebRTC: Robustify 'this' type check in RTCPeerConnection JS built-ins 4 https://bugs.webkit.org/show_bug.cgi?id=158831 5 6 Reviewed by Youenn Fablet. 7 8 * fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt: 9 Flip some result lines from FAIL to PASS. Clean out unnecessary tests (third set). 10 1 11 2016-06-28 Frederic Wang <fwang@igalia.com> 2 12 -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt
r202130 r202565 10 10 PASS promise webkitRTCPeerConnection.prototype.addIceCandidate.call({}) rejected with TypeError: Function should be called on an RTCPeerConnection 11 11 PASS promise webkitRTCPeerConnection.prototype.getStats.call({}, null) rejected with TypeError: Function should be called on an RTCPeerConnection 12 FAIL promise objectWithPcPrototype.createOffer() rejected with TypeError: Can only call RTCPeerConnection.queuedCreateOffer on instances of RTCPeerConnection; expected reason TypeError: Function should be called on an RTCPeerConnection 13 FAIL promise objectWithPcPrototype.createAnswer() rejected with TypeError: Can only call RTCPeerConnection.queuedCreateAnswer on instances of RTCPeerConnection; expected reason TypeError: Function should be called on an RTCPeerConnection 14 FAIL promise objectWithPcPrototype.setLocalDescription() rejected with TypeError: Not enough arguments; expected reason TypeError: Function should be called on an RTCPeerConnection 15 FAIL promise objectWithPcPrototype.setRemoteDescription() rejected with TypeError: Not enough arguments; expected reason TypeError: Function should be called on an RTCPeerConnection 16 FAIL promise objectWithPcPrototype.addIceCandidate() rejected with TypeError: Not enough arguments; expected reason TypeError: Function should be called on an RTCPeerConnection 17 FAIL promise objectWithPcPrototype.getStats() rejected with TypeError: Can only call RTCPeerConnection.privateGetStats on instances of RTCPeerConnection; expected reason TypeError: Function should be called on an RTCPeerConnection 18 FAIL promise pcWithEmptyPrototype.createOffer() fulfilled unexpectedly. 19 FAIL promise pcWithEmptyPrototype.createAnswer() rejected with Error: InvalidStateError: DOM Exception 11; expected reason TypeError: Function should be called on an RTCPeerConnection 20 FAIL promise pcWithEmptyPrototype.setLocalDescription() rejected with TypeError: Not enough arguments; expected reason TypeError: Function should be called on an RTCPeerConnection 21 FAIL promise pcWithEmptyPrototype.setRemoteDescription() rejected with TypeError: Not enough arguments; expected reason TypeError: Function should be called on an RTCPeerConnection 22 FAIL promise pcWithEmptyPrototype.addIceCandidate() rejected with TypeError: Not enough arguments; expected reason TypeError: Function should be called on an RTCPeerConnection 23 FAIL promise pcWithEmptyPrototype.getStats() rejected with Error: NotSupportedError: DOM Exception 9; expected reason TypeError: Function should be called on an RTCPeerConnection 12 PASS promise objectWithPcPrototype.createOffer() rejected with TypeError: Function should be called on an RTCPeerConnection 13 PASS promise objectWithPcPrototype.createAnswer() rejected with TypeError: Function should be called on an RTCPeerConnection 14 PASS promise objectWithPcPrototype.setLocalDescription() rejected with TypeError: Function should be called on an RTCPeerConnection 15 PASS promise objectWithPcPrototype.setRemoteDescription() rejected with TypeError: Function should be called on an RTCPeerConnection 16 PASS promise objectWithPcPrototype.addIceCandidate() rejected with TypeError: Function should be called on an RTCPeerConnection 17 PASS promise objectWithPcPrototype.getStats() rejected with TypeError: Function should be called on an RTCPeerConnection 24 18 PASS End of test promise chain 25 19 PASS successfullyParsed is true -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html
r202130 r202565 15 15 let objectWithPcPrototype = new Foo(); 16 16 17 webkitRTCPeerConnection.prototype = {};18 let pcWithEmptyPrototype = new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});19 20 17 promiseShouldReject("webkitRTCPeerConnection.prototype.createOffer.call({})", "reason") 21 18 .then(() => promiseShouldReject("webkitRTCPeerConnection.prototype.createAnswer.call({})", "reason")) … … 25 22 .then(() => promiseShouldReject("webkitRTCPeerConnection.prototype.getStats.call({}, null)", "reason")) 26 23 27 // Tests are expected to fail below this point: http://webkit.org/b/15883128 24 .then(() => promiseShouldReject("objectWithPcPrototype.createOffer()", "reason")) 29 25 .then(() => promiseShouldReject("objectWithPcPrototype.createAnswer()", "reason")) … … 32 28 .then(() => promiseShouldReject("objectWithPcPrototype.addIceCandidate()", "reason")) 33 29 .then(() => promiseShouldReject("objectWithPcPrototype.getStats()", "reason")) 34 35 .then(() => promiseShouldReject("pcWithEmptyPrototype.createOffer()", "reason"))36 .then(() => promiseShouldReject("pcWithEmptyPrototype.createAnswer()", "reason"))37 .then(() => promiseShouldReject("pcWithEmptyPrototype.setLocalDescription()", "reason"))38 .then(() => promiseShouldReject("pcWithEmptyPrototype.setRemoteDescription()", "reason"))39 .then(() => promiseShouldReject("pcWithEmptyPrototype.addIceCandidate()", "reason"))40 .then(() => promiseShouldReject("pcWithEmptyPrototype.getStats()", "reason"))41 30 42 31 .then(() => { -
trunk/Source/WebCore/ChangeLog
r202562 r202565 1 2016-06-28 Adam Bergkvist <adam.bergkvist@ericsson.com> 2 3 WebRTC: Robustify 'this' type check in RTCPeerConnection JS built-ins 4 https://bugs.webkit.org/show_bug.cgi?id=158831 5 6 Reviewed by Youenn Fablet. 7 8 Use @operations slot in RTCPeerConnection type check. 9 10 Updated results of existing test. 11 12 * Modules/mediastream/RTCPeerConnection.js: 13 (initializeRTCPeerConnection): 14 Initialize @operations slot in constructor. 15 * Modules/mediastream/RTCPeerConnectionInternals.js: 16 (isRTCPeerConnection): 17 Use @operations slot in type check. 18 1 19 2016-06-28 Frederic Wang <fwang@igalia.com> 2 20 -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js
r202376 r202565 50 50 } 51 51 52 this.@operations = []; 52 53 this.@localStreams = []; 53 54 -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js
r202130 r202565 36 36 { 37 37 "use strict"; 38 39 if (!peerConnection.@operations)40 peerConnection.@operations = [];41 38 42 39 const operations = peerConnection.@operations; … … 134 131 "use strict"; 135 132 136 // FIXME: Robustify this check (http://webkit.org/b/158831) 137 return @isObject(connection) && !!connection.@queuedCreateOffer; 133 return @isObject(connection) && !!connection.@operations; 138 134 }
Note: See TracChangeset
for help on using the changeset viewer.