| OLD | NEW |
| (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 } |
| OLD | NEW |