Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: remoting/jingle_glue/iq_request_unittest.cc

Issue 2690003: Copy the (early prototype of) remoting in Chrome into the public tree.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/jingle_glue/iq_request.cc ('k') | remoting/jingle_glue/jingle_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/ref_counted.h"
6 #include "base/string_util.h"
7 #include "media/base/data_buffer.h"
8 #include "remoting/jingle_glue/iq_request.h"
9 #include "talk/xmllite/xmlelement.h"
10 #include "testing/gmock/include/gmock/gmock.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 namespace remoting {
14
15 TEST(IqRequestTest, MakeIqStanza) {
16 const char* kMessageId = "0";
17 const char* kNamespace = "chromium:testns";
18 const char* kNamespacePrefix = "tes";
19 const char* kBodyTag = "test";
20 const char* kType = "get";
21 const char* kTo = "user@domain.com";
22
23 std::string expected_xml_string =
24 StringPrintf(
25 "<cli:iq type=\"%s\" to=\"%s\" id=\"%s\" "
26 "xmlns:cli=\"jabber:client\">"
27 "<%s:%s xmlns:%s=\"%s\"/>"
28 "</cli:iq>",
29 kType, kTo, kMessageId, kNamespacePrefix, kBodyTag,
30 kNamespacePrefix, kNamespace);
31
32 buzz::XmlElement* iq_body =
33 new buzz::XmlElement(buzz::QName(kNamespace, kBodyTag));
34 scoped_ptr<buzz::XmlElement> stanza(
35 IqRequest::MakeIqStanza(kType, kTo, iq_body, kMessageId));
36
37 EXPECT_EQ(expected_xml_string, stanza->Str());
38 }
39
40 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/jingle_glue/iq_request.cc ('k') | remoting/jingle_glue/jingle_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698