Enforce minimum visibility only for normal and panel windows
[chromium-blink-merge.git] / remoting / ios / host_refresh_test_helper.h
blobaac365b31a2f13c3fb69928c5c8bf1fa33b1bb2f
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 #ifndef REMOTING_IOS_HOST_REFRESH_TEST_HELPER_H_
6 #define REMOTING_IOS_HOST_REFRESH_TEST_HELPER_H_
8 #import <Foundation/Foundation.h>
10 namespace remoting {
12 class HostRefreshTestHelper {
13 public:
14 constexpr static NSString* CloseTag = @"\",";
16 constexpr static NSString* CreatedTimeTag = @"\"createdTime\":\"";
17 constexpr static NSString* HostIdTag = @"\"hostId\":\"";
18 constexpr static NSString* HostNameTag = @"\"hostName\":\"";
19 constexpr static NSString* HostVersionTag = @"\"hostVersion\":\"";
20 constexpr static NSString* KindTag = @"\"kind\":\"";
21 constexpr static NSString* JabberIdTag = @"\"jabberId\":\"";
22 constexpr static NSString* PublicKeyTag = @"\"publicKey\":\"";
23 constexpr static NSString* StatusTag = @"\"status\":\"";
24 constexpr static NSString* UpdatedTimeTag = @"\"updatedTime\":\"";
26 constexpr static NSString* CreatedTimeTest = @"2000-01-01T00:00:01.000Z";
27 constexpr static NSString* HostIdTest = @"Host1";
28 constexpr static NSString* HostNameTest = @"HostName1";
29 constexpr static NSString* HostVersionTest = @"2.22.5.4";
30 constexpr static NSString* KindTest = @"chromoting#host";
31 constexpr static NSString* JabberIdTest = @"JabberingOn";
32 constexpr static NSString* PublicKeyTest = @"AAAAABBBBBZZZZZ";
33 constexpr static NSString* StatusTest = @"TESTING";
34 constexpr static NSString* UpdatedTimeTest = @"2004-01-01T00:00:01.000Z";
36 static NSMutableData* GetHostList(int numHosts) {
37 return [NSMutableData
38 dataWithData:[GetMultipleHosts(numHosts)
39 dataUsingEncoding:NSUTF8StringEncoding]];
42 static NSMutableData* GetHostList(NSString* hostList) {
43 return [NSMutableData
44 dataWithData:[hostList dataUsingEncoding:NSUTF8StringEncoding]];
47 static NSString* GetMultipleHosts(int numHosts) {
48 NSString* client = [NSString
49 stringWithFormat:
50 @"%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@%@",
51 @"{",
52 CreatedTimeTag,
53 CreatedTimeTest,
54 CloseTag,
55 HostIdTag,
56 HostIdTest,
57 CloseTag,
58 HostNameTag,
59 HostNameTest,
60 CloseTag,
61 HostNameTag,
62 HostNameTest,
63 CloseTag,
64 HostVersionTag,
65 HostVersionTest,
66 CloseTag,
67 KindTag,
68 KindTest,
69 CloseTag,
70 JabberIdTag,
71 JabberIdTest,
72 CloseTag,
73 PublicKeyTag,
74 PublicKeyTest,
75 CloseTag,
76 StatusTag,
77 StatusTest,
78 CloseTag,
79 UpdatedTimeTag,
80 UpdatedTimeTest,
81 @"\"}"];
83 NSMutableString* hostList = [NSMutableString
84 stringWithString:
85 @"{\"data\":{\"kind\":\"chromoting#hostList\",\"items\":["];
87 for (int i = 0; i < numHosts; i++) {
88 [hostList appendString:client];
89 if (i < numHosts - 1) {
90 [hostList appendString:@","]; // common separated
94 [hostList appendString:@"]}}"];
96 return [hostList copy];
100 } // namespace remoting
102 #endif // REMOTING_IOS_HOST_REFRESH_TEST_HELPER_H_