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

Side by Side Diff: chrome/browser/mach_broker_mac_unittest.cc

Issue 501138: Mac: Create a pid->task_t mapping in the browser process. (Closed)
Patch Set: trunglify Created 11 years 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
OLDNEW
(Empty)
1 // Copyright (c) 2009 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 #include "chrome/browser/mach_broker_mac.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 class MachBrokerTest : public testing::Test {
10 public:
11 MachBroker broker_;
12 };
13
14 TEST_F(MachBrokerTest, Setter) {
15 broker_.RegisterPid(1u, MachBroker::MachInfo().SetTask(2u));
16 EXPECT_EQ(2u, broker_.TaskForPid(1));
17 EXPECT_EQ(0u, broker_.TaskForPid(2));
18 }
19
20 TEST_F(MachBrokerTest, Invalidate) {
21 broker_.RegisterPid(1u, MachBroker::MachInfo().SetTask(2));
22 broker_.Invalidate(1u);
23 EXPECT_EQ(0u, broker_.TaskForPid(1));
24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698