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

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

Issue 664933004: Standardize usage of virtual/override/final in extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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 (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 "extensions/browser/warning_service.h" 5 #include "extensions/browser/warning_service.h"
6 6
7 #include "content/public/test/test_browser_context.h" 7 #include "content/public/test/test_browser_context.h"
8 #include "extensions/browser/extensions_test.h" 8 #include "extensions/browser/extensions_test.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace extensions { 12 namespace extensions {
13 13
14 namespace { 14 namespace {
15 15
16 class TestWarningService : public WarningService { 16 class TestWarningService : public WarningService {
17 public: 17 public:
18 explicit TestWarningService(content::BrowserContext* browser_context) 18 explicit TestWarningService(content::BrowserContext* browser_context)
19 : WarningService(browser_context) { 19 : WarningService(browser_context) {
20 } 20 }
21 virtual ~TestWarningService() {} 21 ~TestWarningService() override {}
22 22
23 void AddWarning(const Warning& warning) { 23 void AddWarning(const Warning& warning) {
24 WarningSet warnings; 24 WarningSet warnings;
25 warnings.insert(warning); 25 warnings.insert(warning);
26 AddWarnings(warnings); 26 AddWarnings(warnings);
27 } 27 }
28 }; 28 };
29 29
30 class MockObserver : public WarningService::Observer { 30 class MockObserver : public WarningService::Observer {
31 public: 31 public:
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 warning_service.GetWarningTypesAffectingExtension(ext1_id); 108 warning_service.GetWarningTypesAffectingExtension(ext1_id);
109 EXPECT_EQ(0u, existing_warnings.size()); 109 EXPECT_EQ(0u, existing_warnings.size());
110 existing_warnings = 110 existing_warnings =
111 warning_service.GetWarningTypesAffectingExtension(ext2_id); 111 warning_service.GetWarningTypesAffectingExtension(ext2_id);
112 EXPECT_EQ(0u, existing_warnings.size()); 112 EXPECT_EQ(0u, existing_warnings.size());
113 113
114 warning_service.RemoveObserver(&observer); 114 warning_service.RemoveObserver(&observer);
115 } 115 }
116 116
117 } // namespace extensions 117 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/warning_service.h ('k') | extensions/common/api/bluetooth/bluetooth_manifest_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698