Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(973)

Side by Side Diff: extensions/browser/error_map_unittest.cc

Issue 685503002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "components/crx_file/id_util.h" 10 #include "components/crx_file/id_util.h"
11 #include "extensions/browser/extension_error.h" 11 #include "extensions/browser/extension_error.h"
12 #include "extensions/browser/extension_error_test_util.h" 12 #include "extensions/browser/extension_error_test_util.h"
13 #include "extensions/common/constants.h" 13 #include "extensions/common/constants.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 using error_test_util::CreateNewRuntimeError; 18 using error_test_util::CreateNewRuntimeError;
19 19
20 class ErrorMapUnitTest : public testing::Test { 20 class ErrorMapUnitTest : public testing::Test {
21 public: 21 public:
22 ErrorMapUnitTest() { } 22 ErrorMapUnitTest() { }
23 virtual ~ErrorMapUnitTest() { } 23 ~ErrorMapUnitTest() override {}
24 24
25 virtual void SetUp() override { 25 void SetUp() override { testing::Test::SetUp(); }
26 testing::Test::SetUp();
27 }
28 26
29 protected: 27 protected:
30 ErrorMap errors_; 28 ErrorMap errors_;
31 }; 29 };
32 30
33 // Test adding errors, and removing them by reference, by incognito status, 31 // Test adding errors, and removing them by reference, by incognito status,
34 // and in bulk. 32 // and in bulk.
35 TEST_F(ErrorMapUnitTest, AddAndRemoveErrors) { 33 TEST_F(ErrorMapUnitTest, AddAndRemoveErrors) {
36 ASSERT_EQ(0u, errors_.size()); 34 ASSERT_EQ(0u, errors_.size());
37 35
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 const ErrorList& list = errors_.GetErrorsForExtension(kId); 136 const ErrorList& list = errors_.GetErrorsForExtension(kId);
139 ASSERT_EQ(kNumErrors, list.size()); 137 ASSERT_EQ(kNumErrors, list.size());
140 138
141 // The duplicate error should be the last reported (pointer comparison)... 139 // The duplicate error should be the last reported (pointer comparison)...
142 ASSERT_EQ(weak_error, list.back()); 140 ASSERT_EQ(weak_error, list.back());
143 // ... and should have two reported occurrences. 141 // ... and should have two reported occurrences.
144 ASSERT_EQ(2u, list.back()->occurrences()); 142 ASSERT_EQ(2u, list.back()->occurrences());
145 } 143 }
146 144
147 } // namespace extensions 145 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698