Bug 1264470 - a=identity is a long attribute, r=bwc
authorMartin Thomson <martin.thomson@gmail.com>
Tue, 19 Apr 2016 09:10:32 +1000
changeset 295700 d24ae84a5b493f7f542bb06f79f3e9de1d93e665
parent 295699 b7c287c6c05f0ed04b0998bd716f867d49e0d189
child 295701 18a2873bb694e50649eb258cfa957a81bd45841f
push id19015
push usercbook@mozilla.com
push dateMon, 02 May 2016 09:39:23 +0000
treeherderfx-team@2080375bc69d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersidentity, bwc
bugs1264470
milestone49.0a1
Bug 1264470 - a=identity is a long attribute, r=bwc
dom/media/PeerConnection.js
media/webrtc/signaling/src/sdp/SipccSdpAttributeList.cpp
media/webrtc/signaling/src/sdp/SipccSdpAttributeList.h
media/webrtc/signaling/src/sdp/sipcc/sdp.h
media/webrtc/signaling/src/sdp/sipcc/sdp_attr.c
media/webrtc/signaling/src/sdp/sipcc/sdp_attr_access.c
media/webrtc/signaling/src/sdp/sipcc/sdp_main.c
media/webrtc/signaling/src/sdp/sipcc/sdp_private.h
media/webrtc/signaling/test/sdp_unittests.cpp
--- a/dom/media/PeerConnection.js
+++ b/dom/media/PeerConnection.js
@@ -1167,17 +1167,16 @@ RTCPeerConnection.prototype = {
 
   get localDescription() {
     this._checkClosed();
     let sdp = this._impl.localDescription;
     if (sdp.length == 0) {
       return null;
     }
 
-    sdp = this._localIdp.addIdentityAttribute(sdp);
     return new this._win.RTCSessionDescription({ type: this._localType,
                                                     sdp: sdp });
   },
 
   get remoteDescription() {
     this._checkClosed();
     let sdp = this._impl.remoteDescription;
     if (sdp.length == 0) {
--- a/media/webrtc/signaling/src/sdp/SipccSdpAttributeList.cpp
+++ b/media/webrtc/signaling/src/sdp/SipccSdpAttributeList.cpp
@@ -101,18 +101,16 @@ SipccSdpAttributeList::LoadSimpleString(
 void
 SipccSdpAttributeList::LoadSimpleStrings(sdp_t* sdp, uint16_t level,
                                          SdpErrorHolder& errorHolder)
 {
   LoadSimpleString(sdp, level, SDP_ATTR_MID, SdpAttribute::kMidAttribute,
                    errorHolder);
   LoadSimpleString(sdp, level, SDP_ATTR_LABEL, SdpAttribute::kLabelAttribute,
                    errorHolder);
-  LoadSimpleString(sdp, level, SDP_ATTR_IDENTITY,
-                   SdpAttribute::kIdentityAttribute, errorHolder);
 }
 
 void
 SipccSdpAttributeList::LoadSimpleNumber(sdp_t* sdp, uint16_t level,
                                         sdp_attr_e attr,
                                         AttributeType targetType,
                                         SdpErrorHolder& errorHolder)
 {
@@ -643,16 +641,26 @@ SipccSdpAttributeList::LoadMsidSemantics
 
   if (!msidSemantics->mMsidSemantics.empty()) {
     SetAttribute(msidSemantics.release());
   }
   return true;
 }
 
 void
+SipccSdpAttributeList::LoadIdentity(sdp_t* sdp, uint16_t level)
+{
+  const char* val = sdp_attr_get_long_string(sdp, SDP_ATTR_IDENTITY, level, 0, 1);
+  if (val) {
+    SetAttribute(new SdpStringAttribute(SdpAttribute::kIdentityAttribute,
+                                        std::string(val)));
+  }
+}
+
+void
 SipccSdpAttributeList::LoadFmtp(sdp_t* sdp, uint16_t level)
 {
   auto fmtps = MakeUnique<SdpFmtpAttributeList>();
 
   for (uint16_t i = 1; i < UINT16_MAX; ++i) {
     sdp_attr_t* attr = sdp_find_attr(sdp, level, 0, SDP_ATTR_FMTP, i);
 
     if (!attr) {
@@ -991,16 +999,18 @@ SipccSdpAttributeList::Load(sdp_t* sdp, 
   if (AtSessionLevel()) {
     if (!LoadGroups(sdp, level, errorHolder)) {
       return false;
     }
 
     if (!LoadMsidSemantics(sdp, level, errorHolder)) {
       return false;
     }
+
+    LoadIdentity(sdp, level);
   } else {
     sdp_media_e mtype = sdp_get_media_type(sdp, level);
     if (mtype == SDP_MEDIA_APPLICATION) {
       if (!LoadSctpmap(sdp, level, errorHolder)) {
         return false;
       }
     } else {
       if (!LoadRtpmap(sdp, level, errorHolder)) {
--- a/media/webrtc/signaling/src/sdp/SipccSdpAttributeList.h
+++ b/media/webrtc/signaling/src/sdp/SipccSdpAttributeList.h
@@ -108,16 +108,17 @@ private:
   void LoadSetup(sdp_t* sdp, uint16_t level);
   void LoadSsrc(sdp_t* sdp, uint16_t level);
   bool LoadImageattr(sdp_t* sdp, uint16_t level, SdpErrorHolder& errorHolder);
   bool LoadSimulcast(sdp_t* sdp, uint16_t level, SdpErrorHolder& errorHolder);
   bool LoadGroups(sdp_t* sdp, uint16_t level, SdpErrorHolder& errorHolder);
   bool LoadMsidSemantics(sdp_t* sdp,
                          uint16_t level,
                          SdpErrorHolder& errorHolder);
+  void LoadIdentity(sdp_t* sdp, uint16_t level);
   void LoadFmtp(sdp_t* sdp, uint16_t level);
   void LoadMsids(sdp_t* sdp, uint16_t level, SdpErrorHolder& errorHolder);
   bool LoadRid(sdp_t* sdp, uint16_t level, SdpErrorHolder& errorHolder);
   void LoadExtmap(sdp_t* sdp, uint16_t level, SdpErrorHolder& errorHolder);
   void LoadRtcpFb(sdp_t* sdp, uint16_t level, SdpErrorHolder& errorHolder);
   void LoadRtcp(sdp_t* sdp, uint16_t level, SdpErrorHolder& errorHolder);
   static SdpRtpmapAttributeList::CodecType GetCodecType(rtp_ptype type);
 
--- a/media/webrtc/signaling/src/sdp/sipcc/sdp.h
+++ b/media/webrtc/signaling/src/sdp/sipcc/sdp.h
@@ -529,16 +529,17 @@ typedef enum sdp_srtp_crypto_suite_t_ {
 #define SDP_SRTP_AES_CM_128_HMAC_SHA1_32_SALT_BYTES	14
 #define SDP_SRTP_AES_CM_128_HMAC_SHA1_80_KEY_BYTES	16
 #define SDP_SRTP_AES_CM_128_HMAC_SHA1_80_SALT_BYTES	14
 #define SDP_SRTP_F8_128_HMAC_SHA1_80_KEY_BYTES		16
 #define SDP_SRTP_F8_128_HMAC_SHA1_80_SALT_BYTES	14
 
 /* SDP Defines */
 
+#define SDP_MAX_LONG_STRING_LEN 4096 /* Max len for long SDP strings */
 #define SDP_MAX_STRING_LEN      256  /* Max len for SDP string       */
 #define SDP_MAX_SHORT_STRING_LEN      12  /* Max len for a short SDP string  */
 #define SDP_MAX_PAYLOAD_TYPES   23  /* Max payload types in m= line */
 #define SDP_TOKEN_LEN           2   /* Len of <token>=              */
 #define SDP_CURRENT_VERSION     0   /* Current default SDP version  */
 #define SDP_MAX_PORT_PARAMS     4   /* Max m= port params - x/x/x/x */
 #define SDP_MIN_DYNAMIC_PAYLOAD 96  /* Min dynamic payload */
 #define SDP_MAX_DYNAMIC_PAYLOAD 127 /* Max dynamic payload */
@@ -995,16 +996,17 @@ typedef struct sdp_mca {
 /* generic a= line info */
 typedef struct sdp_attr {
     sdp_attr_e                type;
     uint32_t                       line_number;
     union {
         tinybool              boolean_val;
         uint32_t                   u32_val;
         char                  string_val[SDP_MAX_STRING_LEN+1];
+        char *stringp;
         char                  ice_attr[SDP_MAX_STRING_LEN+1];
         sdp_fmtp_t            fmtp;
         sdp_sctpmap_t         sctpmap;
         sdp_msid_t            msid;
         sdp_qos_t             qos;
         sdp_curr_t            curr;
         sdp_des_t             des;
         sdp_conf_t            conf;
@@ -1270,16 +1272,18 @@ extern sdp_result_e sdp_add_new_attr(sdp
 extern sdp_result_e sdp_attr_num_instances(sdp_t *sdp_p, uint16_t level,
                          uint8_t cap_num, sdp_attr_e attr_type, uint16_t *num_attr_inst);
 extern tinybool sdp_attr_valid(sdp_t *sdp_p, sdp_attr_e attr_type,
                                 uint16_t level, uint8_t cap_num, uint16_t inst_num);
 extern uint32_t sdp_attr_line_number(sdp_t *sdp_p, sdp_attr_e attr_type,
                                 uint16_t level, uint8_t cap_num, uint16_t inst_num);
 extern const char *sdp_attr_get_simple_string(sdp_t *sdp_p,
                    sdp_attr_e attr_type, uint16_t level, uint8_t cap_num, uint16_t inst_num);
+extern const char *sdp_attr_get_long_string(sdp_t *sdp_p,
+                   sdp_attr_e attr_type, uint16_t level, uint8_t cap_num, uint16_t inst_num);
 extern uint32_t sdp_attr_get_simple_u32(sdp_t *sdp_p, sdp_attr_e attr_type,
                                     uint16_t level, uint8_t cap_num, uint16_t inst_num);
 extern tinybool sdp_attr_get_simple_boolean(sdp_t *sdp_p,
                    sdp_attr_e attr_type, uint16_t level, uint8_t cap_num, uint16_t inst_num);
 extern tinybool sdp_attr_is_present (sdp_t *sdp_p, sdp_attr_e attr_type,
                                      uint16_t level, uint8_t cap_num);
 extern const char* sdp_attr_get_maxprate(sdp_t *sdp_p, uint16_t level,
                                          uint16_t inst_num);
--- a/media/webrtc/signaling/src/sdp/sipcc/sdp_attr.c
+++ b/media/webrtc/signaling/src/sdp/sipcc/sdp_attr.c
@@ -4894,40 +4894,68 @@ sdp_result_e sdp_parse_attr_simple_flag 
     if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
         SDP_PRINT("%s Parsed a=%s", sdp_p->debug_str,
                   sdp_get_attr_name(attr_p->type));
     }
 
     return (SDP_SUCCESS);
 }
 
-
-sdp_result_e sdp_parse_attr_complete_line (sdp_t *sdp_p, sdp_attr_t *attr_p,
-                                           const char *ptr)
-{
-    sdp_result_e  result;
-
-    ptr = sdp_getnextstrtok(ptr, attr_p->attr.string_val, sizeof(attr_p->attr.string_val), "\r\n", &result);
+static sdp_result_e sdp_parse_attr_line(sdp_t *sdp_p, sdp_attr_t *attr_p,
+                                        const char *ptr, char *buf, size_t buf_len) {
+    sdp_result_e result;
+
+    (void)sdp_getnextstrtok(ptr, buf, buf_len, "\r\n", &result);
 
     if (result != SDP_SUCCESS) {
         sdp_parse_error(sdp_p,
             "%s Warning: No string token found for %s attribute",
             sdp_p->debug_str, sdp_get_attr_name(attr_p->type));
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     } else {
         if (sdp_p->debug_flag[SDP_DEBUG_TRACE]) {
             SDP_PRINT("%s Parsed a=%s, %s", sdp_p->debug_str,
                       sdp_get_attr_name(attr_p->type),
-                      attr_p->attr.string_val);
+                      buf);
         }
         return (SDP_SUCCESS);
     }
 }
 
+sdp_result_e sdp_parse_attr_complete_line (sdp_t *sdp_p, sdp_attr_t *attr_p,
+                                           const char *ptr)
+{
+    return sdp_parse_attr_line(sdp_p, attr_p, ptr,
+                               attr_p->attr.string_val,
+                               sizeof(attr_p->attr.string_val));
+}
+
+sdp_result_e sdp_parse_attr_long_line (sdp_t *sdp_p, sdp_attr_t *attr_p,
+                                       const char *ptr)
+{
+    sdp_result_e result;
+    char buffer[SDP_MAX_LONG_STRING_LEN];
+
+    result = sdp_parse_attr_line(sdp_p, attr_p, ptr,
+                                 buffer, sizeof(buffer));
+    if (result == SDP_SUCCESS) {
+        attr_p->attr.stringp = cpr_strdup(buffer);
+    }
+    return result;
+}
+
+sdp_result_e sdp_build_attr_long_line (sdp_t *sdp_p, sdp_attr_t *attr_p,
+                                       flex_string *fs)
+{
+    flex_string_sprintf(fs, "a=%s:%s\r\n", sdp_attr[attr_p->type].name,
+                        attr_p->attr.stringp);
+    return SDP_SUCCESS;
+}
+
 sdp_result_e sdp_build_attr_rtcp_fb(sdp_t *sdp_p,
                                     sdp_attr_t *attr_p,
                                     flex_string *fs)
 {
     flex_string_sprintf(fs, "a=%s:", sdp_attr[attr_p->type].name);
 
     /* Payload Type */
     if (attr_p->attr.rtcp_fb.payload_num == SDP_ALL_PAYLOADS) {
@@ -5512,9 +5540,8 @@ sdp_result_e sdp_build_attr_ssrc(sdp_t *
                                  flex_string *fs)
 {
     flex_string_sprintf(fs, "a=ssrc:%s%s%s\r\n",
                         attr_p->attr.ssrc.ssrc,
                         attr_p->attr.ssrc.attribute[0] ? " " : "",
                         attr_p->attr.ssrc.attribute);
     return SDP_SUCCESS;
 }
-
--- a/media/webrtc/signaling/src/sdp/sipcc/sdp_attr_access.c
+++ b/media/webrtc/signaling/src/sdp/sipcc/sdp_attr_access.c
@@ -382,19 +382,20 @@ void sdp_free_attr (sdp_attr_t *attr_p)
                 next_cpar_p = cpar_p->next_p;
                 sdp_free_attr(cpar_p);
                 cpar_p = next_cpar_p;
             }
             SDP_FREE(cap_p);
         }
     } else if ((attr_p->type == SDP_ATTR_SDESCRIPTIONS) ||
               (attr_p->type == SDP_ATTR_SRTP_CONTEXT)) {
-              SDP_FREE(attr_p->attr.srtp_context.session_parameters);
-    }
-
+        SDP_FREE(attr_p->attr.srtp_context.session_parameters);
+    } else if (attr_p->type == SDP_ATTR_IDENTITY) {
+        SDP_FREE(attr_p->attr.stringp);
+    }
 
     if (attr_p->type == SDP_ATTR_GROUP) {
         for (i = 0; i < attr_p->attr.stream_data.num_group_id; i++) {
             SDP_FREE(attr_p->attr.stream_data.group_ids[i]);
         }
     } else if (attr_p->type == SDP_ATTR_MSID_SEMANTIC) {
         for (i = 0; i < SDP_MAX_MEDIA_STREAMS; ++i) {
             SDP_FREE(attr_p->attr.msid_semantic.msids[i]);
@@ -676,17 +677,16 @@ static boolean sdp_attr_is_simple_string
         (attr_type != SDP_ATTR_DIALED) &&
         (attr_type != SDP_ATTR_DIALING) &&
         (attr_type != SDP_ATTR_FRAMING) &&
         (attr_type != SDP_ATTR_MID) &&
         (attr_type != SDP_ATTR_X_SIDIN) &&
         (attr_type != SDP_ATTR_X_SIDOUT)&&
         (attr_type != SDP_ATTR_X_CONFID) &&
         (attr_type != SDP_ATTR_LABEL) &&
-        (attr_type != SDP_ATTR_IDENTITY) &&
         (attr_type != SDP_ATTR_ICE_OPTIONS) &&
         (attr_type != SDP_ATTR_IMAGEATTR) &&
         (attr_type != SDP_ATTR_SIMULCAST) &&
         (attr_type != SDP_ATTR_RID)) {
       return FALSE;
     }
     return TRUE;
 }
@@ -731,16 +731,49 @@ const char *sdp_attr_get_simple_string (
         }
         sdp_p->conf_p->num_invalid_param++;
         return (NULL);
     } else {
         return (attr_p->attr.string_val);
     }
 }
 
+static boolean sdp_attr_is_long_string(sdp_attr_e attr_type) {
+  return attr_type == SDP_ATTR_IDENTITY;
+}
+
+/* Identical in usage to sdp_attr_get_simple_string() */
+const char *sdp_attr_get_long_string (sdp_t *sdp_p, sdp_attr_e attr_type,
+                                      uint16_t level, uint8_t cap_num, uint16_t inst_num)
+{
+    sdp_attr_t  *attr_p;
+
+    if (!sdp_attr_is_long_string(attr_type)) {
+        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
+            CSFLogError(logTag, "%s Attribute type is not a long string (%s)",
+                      sdp_p->debug_str, sdp_get_attr_name(attr_type));
+        }
+        sdp_p->conf_p->num_invalid_param++;
+        return (NULL);
+    }
+
+    attr_p = sdp_find_attr(sdp_p, level, cap_num, attr_type, inst_num);
+    if (attr_p == NULL) {
+        if (sdp_p->debug_flag[SDP_DEBUG_ERRORS]) {
+            CSFLogError(logTag, "%s Attribute %s, level %u instance %u not found.",
+                      sdp_p->debug_str, sdp_get_attr_name(attr_type),
+                      (unsigned)level, (unsigned)inst_num);
+        }
+        sdp_p->conf_p->num_invalid_param++;
+        return (NULL);
+    } else {
+        return (attr_p->attr.stringp);
+    }
+}
+
 static boolean sdp_attr_is_simple_u32(sdp_attr_e attr_type) {
     if ((attr_type != SDP_ATTR_EECID) &&
         (attr_type != SDP_ATTR_PTIME) &&
         (attr_type != SDP_ATTR_MAXPTIME) &&
         (attr_type != SDP_ATTR_T38_VERSION) &&
         (attr_type != SDP_ATTR_T38_MAXBITRATE) &&
         (attr_type != SDP_ATTR_T38_MAXBUFFER) &&
         (attr_type != SDP_ATTR_T38_MAXDGRAM) &&
--- a/media/webrtc/signaling/src/sdp/sipcc/sdp_main.c
+++ b/media/webrtc/signaling/src/sdp/sipcc/sdp_main.c
@@ -176,17 +176,17 @@ const sdp_attrarray_t sdp_attr[SDP_MAX_A
       sdp_parse_attr_rtcp_fb, sdp_build_attr_rtcp_fb},
     {"setup", sizeof("setup"),
       sdp_parse_attr_setup, sdp_build_attr_setup},
     {"connection", sizeof("connection"),
       sdp_parse_attr_connection, sdp_build_attr_connection},
     {"extmap", sizeof("extmap"),
       sdp_parse_attr_extmap, sdp_build_attr_extmap},
     {"identity", sizeof("identity"),
-      sdp_parse_attr_simple_string, sdp_build_attr_simple_string},
+      sdp_parse_attr_long_line, sdp_build_attr_long_line},
     {"msid", sizeof("msid"),
       sdp_parse_attr_msid, sdp_build_attr_msid},
     {"msid-semantic", sizeof("msid-semantic"),
       sdp_parse_attr_msid_semantic, sdp_build_attr_msid_semantic},
     {"bundle-only", sizeof("bundle-only"),
       sdp_parse_attr_simple_flag, sdp_build_attr_simple_flag},
     {"end-of-candidates", sizeof("end-of-candidates"),
       sdp_parse_attr_simple_flag, sdp_build_attr_simple_flag},
--- a/media/webrtc/signaling/src/sdp/sipcc/sdp_private.h
+++ b/media/webrtc/signaling/src/sdp/sipcc/sdp_private.h
@@ -235,16 +235,20 @@ extern sdp_result_e sdp_parse_attr_ice_a
 
 extern sdp_result_e sdp_build_attr_simple_flag (
     sdp_t *sdp_p, sdp_attr_t *attr_p, flex_string *fs);
 extern sdp_result_e sdp_parse_attr_simple_flag (
     sdp_t *sdp_p, sdp_attr_t *attr_p, const char *ptr);
 
 extern sdp_result_e sdp_parse_attr_complete_line (
     sdp_t *sdp_p, sdp_attr_t *attr_p, const char *ptr);
+extern sdp_result_e sdp_parse_attr_long_line(sdp_t *sdp_p,
+                                     sdp_attr_t *attr_p, const char *ptr);
+extern sdp_result_e sdp_build_attr_long_line(sdp_t *sdp_p,
+                                     sdp_attr_t *attr_p, flex_string *fs);
 
 /* sdp_attr_access.c */
 extern void sdp_free_attr(sdp_attr_t *attr_p);
 extern sdp_result_e sdp_find_attr_list(sdp_t *sdp_p, uint16_t level, uint8_t cap_num,
                                        sdp_attr_t **attr_p, char *fname);
 extern sdp_attr_t *sdp_find_attr(sdp_t *sdp_p, uint16_t level, uint8_t cap_num,
                                  sdp_attr_e attr_type, uint16_t inst_num);
 extern sdp_attr_t *sdp_find_capability(sdp_t *sdp_p, uint16_t level, uint8_t cap_num);
--- a/media/webrtc/signaling/test/sdp_unittests.cpp
+++ b/media/webrtc/signaling/test/sdp_unittests.cpp
@@ -1121,32 +1121,38 @@ TEST_P(NewSdpTest, CheckMediaSectionGetB
            "t=0 0\r\n"
            "m=video 56436 RTP/SAVPF 120\r\n"
            "b=CT:1000\r\n"
            "a=rtpmap:120 VP8/90000\r\n");
   ASSERT_EQ(1000U, mSdp->GetMediaSection(0).GetBandwidth("CT"))
     << "Wrong bandwidth in media section";
 }
 
+// Define a string that is 258 characters long. We use a long string here so
+// that we can test that we are able to parse and handle a string longer than
+// the default maximum length of 256 in sipcc.
+#define ID_A "1234567890abcdef"
+#define ID_B ID_A ID_A ID_A ID_A
+#define LONG_IDENTITY ID_B ID_B ID_B ID_B "xx"
 
 // SDP from a basic A/V apprtc call FFX/FFX
 const std::string kBasicAudioVideoOffer =
 "v=0" CRLF
 "o=Mozilla-SIPUA-35.0a1 5184 0 IN IP4 0.0.0.0" CRLF
 "s=SIP Call" CRLF
 "c=IN IP4 224.0.0.1/100/12" CRLF
 "t=0 0" CRLF
 "a=ice-ufrag:4a799b2e" CRLF
 "a=ice-pwd:e4cc12a910f106a0a744719425510e17" CRLF
 "a=ice-lite" CRLF
 "a=ice-options:trickle foo" CRLF
 "a=msid-semantic:WMS stream streama" CRLF
 "a=msid-semantic:foo stream" CRLF
 "a=fingerprint:sha-256 DF:2E:AC:8A:FD:0A:8E:99:BF:5D:E8:3C:E7:FA:FB:08:3B:3C:54:1D:D7:D4:05:77:A0:72:9B:14:08:6D:0F:4C" CRLF
-"a=identity:blahblahblah foo;bar" CRLF
+"a=identity:" LONG_IDENTITY CRLF
 "a=group:BUNDLE first second" CRLF
 "a=group:BUNDLE third" CRLF
 "a=group:LS first third" CRLF
 "m=audio 9 RTP/SAVPF 109 9 0 8 101" CRLF
 "c=IN IP4 0.0.0.0" CRLF
 "a=mid:first" CRLF
 "a=rtpmap:109 opus/48000/2" CRLF
 "a=fmtp:109 maxplaybackrate=32000;stereo=1" CRLF
@@ -1331,17 +1337,17 @@ TEST_P(NewSdpTest, CheckFingerprint) {
 }
 
 TEST_P(NewSdpTest, CheckIdentity) {
   ParseSdp(kBasicAudioVideoOffer);
   ASSERT_TRUE(!!mSdp) << "Parse failed: " << GetParseErrors();
   ASSERT_TRUE(mSdp->GetAttributeList().HasAttribute(
         SdpAttribute::kIdentityAttribute));
   auto identity = mSdp->GetAttributeList().GetIdentity();
-  ASSERT_EQ("blahblahblah", identity) << "Wrong identity assertion";
+  ASSERT_EQ(LONG_IDENTITY, identity) << "Wrong identity assertion";
 }
 
 TEST_P(NewSdpTest, CheckNumberOfMediaSections) {
   ParseSdp(kBasicAudioVideoOffer);
   ASSERT_TRUE(!!mSdp) << "Parse failed: " << GetParseErrors();
   ASSERT_EQ(3U, mSdp->GetMediaSectionCount()) << "Wrong number of media sections";
 }