OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/extensions/error_console/error_console.h" | 5 #include "chrome/browser/extensions/error_console/error_console.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "chrome/common/extensions/feature_switch.h" | |
16 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
17 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
18 #include "content/public/common/url_constants.h" | 17 #include "content/public/common/url_constants.h" |
19 #include "extensions/browser/extension_error.h" | 18 #include "extensions/browser/extension_error.h" |
20 #include "extensions/common/constants.h" | 19 #include "extensions/common/constants.h" |
| 20 #include "extensions/common/feature_switch.h" |
21 #include "extensions/common/id_util.h" | 21 #include "extensions/common/id_util.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
24 | 24 |
25 using base::string16; | 25 using base::string16; |
26 | 26 |
27 namespace extensions { | 27 namespace extensions { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 error_console_->GetErrorsForExtension(kId); | 199 error_console_->GetErrorsForExtension(kId); |
200 ASSERT_EQ(kNumErrors, errors.size()); | 200 ASSERT_EQ(kNumErrors, errors.size()); |
201 | 201 |
202 // The duplicate error should be the last reported (pointer comparison)... | 202 // The duplicate error should be the last reported (pointer comparison)... |
203 ASSERT_EQ(weak_error, errors.back()); | 203 ASSERT_EQ(weak_error, errors.back()); |
204 // ... and should have two reported occurrences. | 204 // ... and should have two reported occurrences. |
205 ASSERT_EQ(2u, errors.back()->occurrences()); | 205 ASSERT_EQ(2u, errors.back()->occurrences()); |
206 } | 206 } |
207 | 207 |
208 } // namespace extensions | 208 } // namespace extensions |
OLD | NEW |