BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / remoting / signaling / server_log_entry_unittest.h
blobaa03681c55f45ea11e31be89e9044cab134ef09c
1 // Copyright 2014 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.
5 #include <map>
6 #include <set>
7 #include <string>
9 namespace buzz {
10 class XmlElement;
11 } // namespace buzz
13 namespace remoting {
15 extern const char kJabberClientNamespace[];
16 extern const char kChromotingNamespace[];
18 // Verifies that |stanza| contains a <log> element and returns it. Otherwise
19 // returns nullptr and records a test failure.
20 buzz::XmlElement* GetLogElementFromStanza(buzz::XmlElement* stanza);
22 // Verifies that |stanza| contains only 1 log entry, and returns the <entry>
23 // element. Otherwise returns nullptr and records a test failure.
24 buzz::XmlElement* GetSingleLogEntryFromStanza(buzz::XmlElement* stanza);
26 // Verifies a logging stanza.
27 // |keyValuePairs| lists the keys that must have specified values, and |keys|
28 // lists the keys that must be present, but may have arbitrary values.
29 // There must be no other keys.
30 bool VerifyStanza(
31 const std::map<std::string, std::string>& key_value_pairs,
32 const std::set<std::string> keys,
33 const buzz::XmlElement* elem,
34 std::string* error);
36 } // namespace remoting