OLD | NEW |
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 "extensions/browser/error_map.h" | 5 #include "extensions/browser/error_map.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <utility> | 9 #include <utility> |
8 | 10 |
9 #include "base/logging.h" | 11 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
11 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
12 #include "components/crx_file/id_util.h" | 14 #include "components/crx_file/id_util.h" |
13 #include "extensions/browser/extension_error.h" | 15 #include "extensions/browser/extension_error.h" |
14 #include "extensions/browser/extension_error_test_util.h" | 16 #include "extensions/browser/extension_error_test_util.h" |
15 #include "extensions/common/constants.h" | 17 #include "extensions/common/constants.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 const ErrorList& list = errors_.GetErrorsForExtension(kId); | 162 const ErrorList& list = errors_.GetErrorsForExtension(kId); |
161 ASSERT_EQ(kNumErrors, list.size()); | 163 ASSERT_EQ(kNumErrors, list.size()); |
162 | 164 |
163 // The duplicate error should be the last reported (pointer comparison)... | 165 // The duplicate error should be the last reported (pointer comparison)... |
164 ASSERT_EQ(weak_error, list.back()); | 166 ASSERT_EQ(weak_error, list.back()); |
165 // ... and should have two reported occurrences. | 167 // ... and should have two reported occurrences. |
166 ASSERT_EQ(2u, list.back()->occurrences()); | 168 ASSERT_EQ(2u, list.back()->occurrences()); |
167 } | 169 } |
168 | 170 |
169 } // namespace extensions | 171 } // namespace extensions |
OLD | NEW |