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

Side by Side Diff: remoting/ios/bridge/host_proxy_unittest.mm

Issue 475333004: Remove old Chromoting iOS client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « remoting/ios/bridge/host_proxy.mm ('k') | remoting/ios/data_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #if !defined(__has_feature) || !__has_feature(objc_arc)
6 #error "This file requires ARC support."
7 #endif
8
9 #import "remoting/ios/bridge/host_proxy.h"
10
11 #import "base/compiler_specific.h"
12 #import "testing/gtest_mac.h"
13
14 namespace remoting {
15
16 class HostProxyTest : public ::testing::Test {
17 protected:
18 virtual void SetUp() OVERRIDE { hostProxy_ = [[HostProxy alloc] init]; }
19
20 void CallPassThroughFunctions() {
21 [hostProxy_ mouseAction:webrtc::DesktopVector(0, 0)
22 wheelDelta:webrtc::DesktopVector(0, 0)
23 whichButton:0
24 buttonDown:NO];
25 [hostProxy_ keyboardAction:0 keyDown:NO];
26 }
27
28 HostProxy* hostProxy_;
29 };
30
31 TEST_F(HostProxyTest, ConnectDisconnect) {
32 CallPassThroughFunctions();
33
34 ASSERT_FALSE([hostProxy_ isConnected]);
35 [hostProxy_ connectToHost:@""
36 authToken:@""
37 jabberId:@""
38 hostId:@""
39 publicKey:@""
40 delegate:nil];
41 ASSERT_TRUE([hostProxy_ isConnected]);
42
43 CallPassThroughFunctions();
44
45 [hostProxy_ disconnectFromHost];
46 ASSERT_FALSE([hostProxy_ isConnected]);
47
48 CallPassThroughFunctions();
49 }
50
51 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/ios/bridge/host_proxy.mm ('k') | remoting/ios/data_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698