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

Side by Side Diff: remoting/host/host_change_notification_listener_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/host/heartbeat_sender_unittest.cc ('k') | remoting/host/host_port_allocator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "remoting/host/host_change_notification_listener.h" 5 #include "remoting/host/host_change_notification_listener.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 virtual void TearDown() OVERRIDE { 63 virtual void TearDown() OVERRIDE {
64 host_change_notification_listener_.reset(); 64 host_change_notification_listener_.reset();
65 EXPECT_TRUE(signal_strategy_listeners_.empty()); 65 EXPECT_TRUE(signal_strategy_listeners_.empty());
66 } 66 }
67 67
68 scoped_ptr<XmlElement> GetNotificationStanza(std::string operation, 68 scoped_ptr<XmlElement> GetNotificationStanza(std::string operation,
69 std::string hostId, 69 std::string hostId,
70 std::string botJid) { 70 std::string botJid) {
71 scoped_ptr<XmlElement> stanza(new XmlElement(buzz::QN_IQ)); 71 scoped_ptr<XmlElement> stanza(new XmlElement(buzz::QN_IQ));
72 stanza->AddAttr(QName("", "type"), "set"); 72 stanza->AddAttr(QName(std::string(), "type"), "set");
73 XmlElement* host_changed = new XmlElement( 73 XmlElement* host_changed =
74 QName(kChromotingXmlNamespace, "host-changed")); 74 new XmlElement(QName(kChromotingXmlNamespace, "host-changed"));
75 host_changed->AddAttr(QName(kChromotingXmlNamespace, "operation"), 75 host_changed->AddAttr(QName(kChromotingXmlNamespace, "operation"),
76 operation); 76 operation);
77 host_changed->AddAttr(QName(kChromotingXmlNamespace, "hostid"), hostId); 77 host_changed->AddAttr(QName(kChromotingXmlNamespace, "hostid"), hostId);
78 stanza->AddElement(host_changed); 78 stanza->AddElement(host_changed);
79 stanza->AddAttr(buzz::QN_FROM, botJid); 79 stanza->AddAttr(buzz::QN_FROM, botJid);
80 stanza->AddAttr(buzz::QN_TO, kTestJid); 80 stanza->AddAttr(buzz::QN_TO, kTestJid);
81 return stanza.Pass(); 81 return stanza.Pass();
82 } 82 }
83 83
84 MockListener mock_listener_; 84 MockListener mock_listener_;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 .Times(0); 139 .Times(0);
140 scoped_ptr<XmlElement> stanza = GetNotificationStanza( 140 scoped_ptr<XmlElement> stanza = GetNotificationStanza(
141 "update", kHostId, kTestBotJid); 141 "update", kHostId, kTestBotJid);
142 host_change_notification_listener_->OnSignalStrategyIncomingStanza( 142 host_change_notification_listener_->OnSignalStrategyIncomingStanza(
143 stanza.get()); 143 stanza.get());
144 message_loop_.PostTask(FROM_HERE, base::Bind(MessageLoop::QuitClosure())); 144 message_loop_.PostTask(FROM_HERE, base::Bind(MessageLoop::QuitClosure()));
145 message_loop_.Run(); 145 message_loop_.Run();
146 } 146 }
147 147
148 } // namespace remoting 148 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/heartbeat_sender_unittest.cc ('k') | remoting/host/host_port_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698