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

Side by Side Diff: sandbox/mac/xpc_message_server_unittest.cc

Issue 399643008: Run XPCMessageServerTest on 10.8+ rather than 10.7+. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "sandbox/mac/xpc_message_server.h" 5 #include "sandbox/mac/xpc_message_server.h"
6 6
7 #include <Block.h> 7 #include <Block.h>
8 #include <mach/mach.h> 8 #include <mach/mach.h>
9 #include <servers/bootstrap.h> 9 #include <servers/bootstrap.h>
10 10
(...skipping 11 matching lines...) Expand all
22 22
23 class XPCMessageServerTest : public testing::Test { 23 class XPCMessageServerTest : public testing::Test {
24 public: 24 public:
25 virtual void SetUp() OVERRIDE { 25 virtual void SetUp() OVERRIDE {
26 if (!RunXPCTest()) 26 if (!RunXPCTest())
27 return; 27 return;
28 ASSERT_TRUE(InitializeXPC()); 28 ASSERT_TRUE(InitializeXPC());
29 } 29 }
30 30
31 bool RunXPCTest() { 31 bool RunXPCTest() {
32 return base::mac::IsOSLionOrLater(); 32 return base::mac::IsOSMountainLionOrLater();
33 } 33 }
34 }; 34 };
35 35
36 // A MessageDemuxer that manages a test server and executes a block for every 36 // A MessageDemuxer that manages a test server and executes a block for every
37 // message. 37 // message.
38 class BlockDemuxer : public MessageDemuxer { 38 class BlockDemuxer : public MessageDemuxer {
39 public: 39 public:
40 BlockDemuxer() 40 BlockDemuxer()
41 : demux_block_(NULL), 41 : demux_block_(NULL),
42 server_(this, MACH_PORT_NULL), 42 server_(this, MACH_PORT_NULL),
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 ASSERT_EQ(0, xpc_pipe_routine(first.pipe(), request, &reply)); 210 ASSERT_EQ(0, xpc_pipe_routine(first.pipe(), request, &reply));
211 211
212 EXPECT_EQ(1, xpc_dictionary_get_int64(reply, "seen_by_first")); 212 EXPECT_EQ(1, xpc_dictionary_get_int64(reply, "seen_by_first"));
213 EXPECT_EQ(2, xpc_dictionary_get_int64(reply, "seen_by_second")); 213 EXPECT_EQ(2, xpc_dictionary_get_int64(reply, "seen_by_second"));
214 214
215 xpc_release(request); 215 xpc_release(request);
216 xpc_release(reply); 216 xpc_release(reply);
217 } 217 }
218 218
219 } // namespace sandbox 219 } // namespace sandbox
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698