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 "jingle/notifier/listener/push_notifications_send_update_task.h" | 5 #include "jingle/notifier/listener/push_notifications_send_update_task.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "jingle/notifier/listener/xml_element_util.h" | 12 #include "jingle/notifier/listener/xml_element_util.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "webrtc/libjingle/xmpp/jid.h" | 14 #include "third_party/libjingle_xmpp/xmpp/jid.h" |
15 | 15 |
16 namespace buzz { | 16 namespace buzz { |
17 class XmlElement; | 17 class XmlElement; |
18 } | 18 } |
19 | 19 |
20 namespace notifier { | 20 namespace notifier { |
21 | 21 |
22 class PushNotificationsSendUpdateTaskTest : public testing::Test { | 22 class PushNotificationsSendUpdateTaskTest : public testing::Test { |
23 public: | 23 public: |
24 PushNotificationsSendUpdateTaskTest() : to_jid_bare_("to@jid.com") { | 24 PushNotificationsSendUpdateTaskTest() : to_jid_bare_("to@jid.com") { |
(...skipping 26 matching lines...) Expand all Loading... |
51 "<push xmlns=\"google:push\" channel=\"%s\">" | 51 "<push xmlns=\"google:push\" channel=\"%s\">" |
52 "<data xmlns=\"google:push\">%s</data>" | 52 "<data xmlns=\"google:push\">%s</data>" |
53 "</push>" | 53 "</push>" |
54 "</cli:message>", | 54 "</cli:message>", |
55 to_jid_bare_.Str().c_str(), notification.channel.c_str(), | 55 to_jid_bare_.Str().c_str(), notification.channel.c_str(), |
56 base64_data.c_str()); | 56 base64_data.c_str()); |
57 EXPECT_EQ(expected_xml_string, XmlElementToString(*message)); | 57 EXPECT_EQ(expected_xml_string, XmlElementToString(*message)); |
58 } | 58 } |
59 | 59 |
60 } // namespace notifier | 60 } // namespace notifier |
OLD | NEW |