| 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 <errno.h> | 5 #include <errno.h> |
| 6 #include <sys/file.h> | 6 #include <sys/file.h> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "chrome/browser/chromeos/external_metrics.h" | 11 #include "chrome/browser/chromeos/external_metrics.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 namespace chromeos { // Need this because of the FRIEND_TEST | 14 namespace chromeos { // Need this because of the FRIEND_TEST |
| 15 | 15 |
| 16 class ExternalMetricsTest : public testing::Test { | 16 class ExternalMetricsTest : public testing::Test { |
| 17 }; | 17 }; |
| 18 | 18 |
| 19 // Because the metrics service is not essential, errors will not cause the | 19 // Because the metrics service is not essential, errors will not cause the |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 external_metrics->CollectEvents(); | 127 external_metrics->CollectEvents(); |
| 128 EXPECT_EQ(expect_count, received_count); | 128 EXPECT_EQ(expect_count, received_count); |
| 129 | 129 |
| 130 // Checks that we survive when file doesn't exist. | 130 // Checks that we survive when file doesn't exist. |
| 131 EXPECT_EQ(0, unlink(path)); | 131 EXPECT_EQ(0, unlink(path)); |
| 132 external_metrics->CollectEvents(); | 132 external_metrics->CollectEvents(); |
| 133 EXPECT_EQ(expect_count, received_count); | 133 EXPECT_EQ(expect_count, received_count); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace chromeos | 136 } // namespace chromeos |
| OLD | NEW |