| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "dbus/dbus_statistics.h" | 5 #include "dbus/dbus_statistics.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 namespace dbus { | 11 namespace dbus { |
| 12 | 12 |
| 13 class DBusStatisticsTest : public testing::Test { | 13 class DBusStatisticsTest : public testing::Test { |
| 14 public: | 14 public: |
| 15 DBusStatisticsTest() { | 15 DBusStatisticsTest() { |
| 16 } | 16 } |
| 17 | 17 |
| 18 virtual void SetUp() OVERRIDE { | 18 virtual void SetUp() override { |
| 19 statistics::Initialize(); | 19 statistics::Initialize(); |
| 20 } | 20 } |
| 21 | 21 |
| 22 virtual void TearDown() OVERRIDE { | 22 virtual void TearDown() override { |
| 23 statistics::Shutdown(); | 23 statistics::Shutdown(); |
| 24 } | 24 } |
| 25 | 25 |
| 26 protected: | 26 protected: |
| 27 void AddTestMethodCalls() { | 27 void AddTestMethodCalls() { |
| 28 statistics::AddSentMethodCall( | 28 statistics::AddSentMethodCall( |
| 29 "service1", "service1.interface1", "method1"); | 29 "service1", "service1.interface1", "method1"); |
| 30 statistics::AddReceivedSignal( | 30 statistics::AddReceivedSignal( |
| 31 "service1", "service1.interface1", "method1"); | 31 "service1", "service1.interface1", "method1"); |
| 32 statistics::AddBlockingSentMethodCall( | 32 statistics::AddBlockingSentMethodCall( |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 "service1.interface1.method2: Sent: 2 Received: 1\n" | 174 "service1.interface1.method2: Sent: 2 Received: 1\n" |
| 175 "service1.interface1.method3: Sent: 3\n" | 175 "service1.interface1.method3: Sent: 3\n" |
| 176 "service1.interface2.method1: Sent: 1\n" | 176 "service1.interface2.method1: Sent: 1\n" |
| 177 "service1.interface2.method2: Sent: 1\n" | 177 "service1.interface2.method2: Sent: 1\n" |
| 178 "service2.interface1.method1: Sent: 1\n"); | 178 "service2.interface1.method1: Sent: 1\n"); |
| 179 EXPECT_EQ(expected_output_method, output_method); | 179 EXPECT_EQ(expected_output_method, output_method); |
| 180 | 180 |
| 181 } | 181 } |
| 182 | 182 |
| 183 } // namespace dbus | 183 } // namespace dbus |
| OLD | NEW |