Changeset 159230 in webkit
- Timestamp:
- Nov 13, 2013 1:26:48 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r159219 r159230 1 2013-11-13 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> 2 3 Modifying RTCSessionDescription object construction to match the spec 4 https://bugs.webkit.org/show_bug.cgi?id=124212 5 6 Reviewed by Eric Carlson. 7 8 According to the spec the RTCSessionDescriptionInit parameter in RTCSessionDescription constructor is optional, 9 which must not be nullable. If the 'type' and/or 'sdp' keys are not present, the string object that stores 10 them in the RTCSessionDescription class, must be null in those cases. Also, if an object that is not a 11 Dictionary is passed as argument to the constructor, an exception must be raised. 12 13 * fast/mediastream/RTCSessionDescription-expected.txt: 14 * fast/mediastream/RTCSessionDescription.html: 15 1 16 2013-11-09 Martin Robinson <mrobinson@igalia.com> 2 17 -
trunk/LayoutTests/fast/mediastream/RTCSessionDescription-expected.txt
r134954 r159230 4 4 5 5 6 PASS sessionDescription = new RTCSessionDescription(); did not throw exception. 6 7 PASS sessionDescription = new RTCSessionDescription(initializer); did not throw exception. 7 8 PASS sessionDescription.type is "offer" … … 11 12 PASS sessionDescription.type is "offer" 12 13 PASS sessionDescription.sdp is "foobar" 13 PASS new RTCSessionDescription({}); threw exception Error: TypeMismatchError: DOM Exception 17. 14 PASS new RTCSessionDescription(5); threw exception TypeError: Not an object.. 15 PASS new RTCSessionDescription('foobar'); threw exception TypeError: Not an object.. 16 PASS new RTCSessionDescription({type:'foobar', sdp:'x'}); threw exception Error: TypeMismatchError: DOM Exception 17. 17 PASS new RTCSessionDescription({type:'offer', sdp:''}); threw exception Error: TypeMismatchError: DOM Exception 17. 14 PASS new RTCSessionDescription(null); threw exception TypeError: Optional description init argument of RTCSessionDescription must be a valid Dictionary. 15 PASS new RTCSessionDescription(5); threw exception TypeError: Optional description init argument of RTCSessionDescription must be a valid Dictionary. 16 PASS new RTCSessionDescription('foobar'); threw exception TypeError: Optional description init argument of RTCSessionDescription must be a valid Dictionary. 17 PASS new RTCSessionDescription({type:'foobar', sdp:'x'}); threw exception TypeError: Invalid RTCSessionDescription constructor arguments. 18 PASS new RTCSessionDescription({type:'offer', sdp:''}); threw exception TypeError: Invalid RTCSessionDescription constructor arguments. 19 PASS new RTCSessionDescription({}); did not throw exception. 18 20 PASS new RTCSessionDescription({type:'offer', sdp:'x'}); did not throw exception. 19 21 PASS new RTCSessionDescription({type:'answer', sdp:'x'}); did not throw exception. -
trunk/LayoutTests/fast/mediastream/RTCSessionDescription.html
r158987 r159230 12 12 var initializer = {type:"offer", sdp:"foobar"}; 13 13 var sessionDescription; 14 shouldNotThrow("sessionDescription = new RTCSessionDescription();"); 14 15 shouldNotThrow("sessionDescription = new RTCSessionDescription(initializer);"); 15 16 shouldBe('sessionDescription.type', '"offer"'); … … 22 23 shouldBe('sessionDescription.sdp', '"foobar"'); 23 24 24 shouldThrow("new RTCSessionDescription( {});");25 shouldThrow("new RTCSessionDescription(null);"); 25 26 shouldThrow("new RTCSessionDescription(5);"); 26 27 shouldThrow("new RTCSessionDescription('foobar');"); … … 28 29 shouldThrow("new RTCSessionDescription({type:'offer', sdp:''});"); 29 30 31 shouldNotThrow("new RTCSessionDescription({});"); 30 32 shouldNotThrow("new RTCSessionDescription({type:'offer', sdp:'x'});"); 31 33 shouldNotThrow("new RTCSessionDescription({type:'answer', sdp:'x'});"); -
trunk/Source/WebCore/ChangeLog
r159226 r159230 1 2013-11-13 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> 2 3 Modifying RTCSessionDescription object construction to match the spec 4 https://bugs.webkit.org/show_bug.cgi?id=124212 5 6 Reviewed by Eric Carlson. 7 8 According to the spec the RTCSessionDescriptionInit parameter in RTCSessionDescription constructor is optional, 9 which must not be nullable. If the 'type' and/or 'sdp' keys are not present, the string object that stores 10 them in the RTCSessionDescription class, must be null in those cases. Also, if an object that is not a 11 Dictionary is passed as argument to the constructor, an exception must be raised. 12 13 Existing test was updated. 14 15 * GNUmakefile.list.am: 16 * Modules/mediastream/RTCSessionDescription.cpp: 17 (WebCore::RTCSessionDescription::create): 18 * Modules/mediastream/RTCSessionDescription.idl: 19 * UseJSC.cmake: 20 * WebCore.vcxproj/WebCore.vcxproj: 21 * WebCore.vcxproj/WebCore.vcxproj.filters: 22 * WebCore.xcodeproj/project.pbxproj: 23 * bindings/js/JSRTCSessionDescriptionCustom.cpp: Added. 24 (WebCore::JSRTCSessionDescriptionConstructor::constructJSRTCSessionDescription): 25 1 26 2013-11-13 Tim Horton <timothy_horton@apple.com> 2 27 -
trunk/Source/WebCore/GNUmakefile.list.am
r159162 r159230 2390 2390 Source/WebCore/bindings/js/JSSQLTransactionSyncCustom.cpp \ 2391 2391 Source/WebCore/bindings/js/JSRTCPeerConnectionCustom.cpp \ 2392 Source/WebCore/bindings/js/JSRTCSessionDescriptionCustom.cpp \ 2392 2393 Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp \ 2393 2394 Source/WebCore/bindings/js/JSSharedWorkerCustom.cpp \ -
trunk/Source/WebCore/Modules/mediastream/RTCSessionDescription.cpp
r155057 r159230 1 1 /* 2 2 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 50 51 String type; 51 52 bool ok = dictionary.get("type", type); 52 if ( !ok ||!verifyType(type)) {53 if (ok && !verifyType(type)) { 53 54 ec = TYPE_MISMATCH_ERR; 54 55 return 0; … … 57 58 String sdp; 58 59 ok = dictionary.get("sdp", sdp); 59 if ( !ok ||sdp.isEmpty()) {60 if (ok && sdp.isEmpty()) { 60 61 ec = TYPE_MISMATCH_ERR; 61 62 return 0; -
trunk/Source/WebCore/Modules/mediastream/RTCSessionDescription.idl
r155057 r159230 1 1 /* 2 2 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies). 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 31 32 [ 32 33 Conditional=MEDIA_STREAM, 33 C onstructor(Dictionary dictionary),34 CustomConstructor(optional Dictionary dictionary), 34 35 ConstructorRaisesException 35 36 ] interface RTCSessionDescription { -
trunk/Source/WebCore/UseJSC.cmake
r158964 r159230 245 245 bindings/js/JSMediaStreamCapabilitiesCustom.cpp 246 246 bindings/js/JSRTCPeerConnectionCustom.cpp 247 bindings/js/JSRTCSessionDescriptionCustom.cpp 247 248 bindings/js/JSRTCStatsResponseCustom.cpp 248 249 ) -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r159162 r159230 16895 16895 </ClCompile> 16896 16896 <ClCompile Include="..\bindings\js\JSRTCPeerConnectionCustom.cpp"> 16897 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> 16898 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> 16899 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild> 16900 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild> 16901 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild> 16902 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild> 16903 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> 16904 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> 16905 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild> 16906 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild> 16907 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild> 16908 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild> 16909 </ClCompile> 16910 <ClCompile Include="..\bindings\js\JSRTCSessionDescriptionCustom.cpp"> 16897 16911 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> 16898 16912 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r159162 r159230 4477 4477 <Filter>bindings\js</Filter> 4478 4478 </ClCompile> 4479 <ClCompile Include="..\bindings\js\JSRTCSessionDescriptionCustom.cpp"> 4480 <Filter>bindings\js</Filter> 4481 </ClCompile> 4479 4482 <ClCompile Include="..\bindings\js\JSRTCStatsResponseCustom.cpp"> 4480 4483 <Filter>bindings\js</Filter> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r159180 r159230 322 322 07CA120E182D67D800D12197 /* JSRTCPeerConnectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07CA120D182D67D800D12197 /* JSRTCPeerConnectionCustom.cpp */; }; 323 323 07CE77D516712A6A00C55A47 /* InbandTextTrackPrivateClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 07CE77D416712A6A00C55A47 /* InbandTextTrackPrivateClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; 324 07D07B141834158800ABDD3C /* JSRTCSessionDescriptionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07D07B131834158800ABDD3C /* JSRTCSessionDescriptionCustom.cpp */; }; 324 325 07DC5FD417D3EEE90099F890 /* JSRTCStatsResponseCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DC5FD317D3EEE90099F890 /* JSRTCStatsResponseCustom.cpp */; }; 325 326 07E116B11489C9A100EC5ACE /* JSTextTrackCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07E116B01489C9A100EC5ACE /* JSTextTrackCustom.cpp */; }; … … 6863 6864 07CA120D182D67D800D12197 /* JSRTCPeerConnectionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCPeerConnectionCustom.cpp; sourceTree = "<group>"; }; 6864 6865 07CE77D416712A6A00C55A47 /* InbandTextTrackPrivateClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InbandTextTrackPrivateClient.h; sourceTree = "<group>"; }; 6866 07D07B131834158800ABDD3C /* JSRTCSessionDescriptionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCSessionDescriptionCustom.cpp; sourceTree = "<group>"; }; 6865 6867 07DC5FD317D3EEE90099F890 /* JSRTCStatsResponseCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCStatsResponseCustom.cpp; sourceTree = "<group>"; }; 6866 6868 07E116B01489C9A100EC5ACE /* JSTextTrackCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackCustom.cpp; sourceTree = "<group>"; }; … … 19613 19615 isa = PBXGroup; 19614 19616 children = ( 19617 07D07B131834158800ABDD3C /* JSRTCSessionDescriptionCustom.cpp */, 19615 19618 0705851617FB40E9005F2BCB /* JSMediaStreamCapabilitiesCustom.cpp */, 19616 19619 07C59B6D17F794F6000FBCBB /* JSMediaSourceStatesCustom.cpp */, … … 25704 25707 97627B8D14FB3CEE002CDCA1 /* ContextDestructionObserver.cpp in Sources */, 25705 25708 065AD4F60B0C2EDA005A2B1D /* ContextMenuController.cpp in Sources */, 25709 07D07B141834158800ABDD3C /* JSRTCSessionDescriptionCustom.cpp in Sources */, 25706 25710 06027CB30B1CC03D00884B2D /* ContextMenuItemMac.mm in Sources */, 25707 25711 93B6A0EA0B0BCA8400F5027A /* ContextMenuMac.mm in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.