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

Unified Diff: remoting/jingle_glue/iq_request_unittest.cc

Issue 8432009: Refactor IqRequest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: remoting/jingle_glue/iq_request_unittest.cc
diff --git a/remoting/jingle_glue/iq_request_unittest.cc b/remoting/jingle_glue/iq_request_unittest.cc
deleted file mode 100644
index d7eeda60931feb2ec8a99ef1d652877cc49cb9c6..0000000000000000000000000000000000000000
--- a/remoting/jingle_glue/iq_request_unittest.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/ref_counted.h"
-#include "base/stringprintf.h"
-#include "remoting/jingle_glue/iq_request.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
-
-namespace remoting {
-
-TEST(IqRequestTest, MakeIqStanza) {
- const char* kMessageId = "0";
- const char* kNamespace = "chromium:testns";
- const char* kNamespacePrefix = "tes";
- const char* kBodyTag = "test";
- const char* kType = "get";
- const char* kTo = "user@domain.com";
-
- std::string expected_xml_string =
- base::StringPrintf(
- "<cli:iq type=\"%s\" to=\"%s\" id=\"%s\" "
- "xmlns:cli=\"jabber:client\">"
- "<%s:%s xmlns:%s=\"%s\"/>"
- "</cli:iq>",
- kType, kTo, kMessageId, kNamespacePrefix, kBodyTag,
- kNamespacePrefix, kNamespace);
-
- buzz::XmlElement* iq_body =
- new buzz::XmlElement(buzz::QName(kNamespace, kBodyTag));
- scoped_ptr<buzz::XmlElement> stanza(
- IqRequest::MakeIqStanza(kType, kTo, iq_body));
- stanza->AddAttr(buzz::QName("", "id"), kMessageId);
-
- EXPECT_EQ(expected_xml_string, stanza->Str());
-}
-
-} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698