OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
6 #include "base/stringprintf.h" | 6 #include "base/stringprintf.h" |
7 #include "remoting/jingle_glue/iq_request.h" | 7 #include "remoting/jingle_glue/iq_request.h" |
8 #include "testing/gmock/include/gmock/gmock.h" | 8 #include "testing/gmock/include/gmock/gmock.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" | 10 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 "<cli:iq type=\"%s\" to=\"%s\" id=\"%s\" " | 24 "<cli:iq type=\"%s\" to=\"%s\" id=\"%s\" " |
25 "xmlns:cli=\"jabber:client\">" | 25 "xmlns:cli=\"jabber:client\">" |
26 "<%s:%s xmlns:%s=\"%s\"/>" | 26 "<%s:%s xmlns:%s=\"%s\"/>" |
27 "</cli:iq>", | 27 "</cli:iq>", |
28 kType, kTo, kMessageId, kNamespacePrefix, kBodyTag, | 28 kType, kTo, kMessageId, kNamespacePrefix, kBodyTag, |
29 kNamespacePrefix, kNamespace); | 29 kNamespacePrefix, kNamespace); |
30 | 30 |
31 buzz::XmlElement* iq_body = | 31 buzz::XmlElement* iq_body = |
32 new buzz::XmlElement(buzz::QName(kNamespace, kBodyTag)); | 32 new buzz::XmlElement(buzz::QName(kNamespace, kBodyTag)); |
33 scoped_ptr<buzz::XmlElement> stanza( | 33 scoped_ptr<buzz::XmlElement> stanza( |
34 IqRequest::MakeIqStanza(kType, kTo, iq_body, kMessageId)); | 34 IqRequest::MakeIqStanza(kType, kTo, iq_body)); |
| 35 stanza->AddAttr(buzz::QName("", "id"), kMessageId); |
35 | 36 |
36 EXPECT_EQ(expected_xml_string, stanza->Str()); | 37 EXPECT_EQ(expected_xml_string, stanza->Str()); |
37 } | 38 } |
38 | 39 |
39 } // namespace remoting | 40 } // namespace remoting |
OLD | NEW |