blob: a7f5fe0dfc5aca6584865691724dfd0a11cfd68a [file] [log] [blame]
[email protected]b4d3771d2012-11-14 14:44:101// 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
3// found in the LICENSE file.
4
hanxic7e55202014-08-28 14:13:215#include "extensions/browser/warning_service.h"
[email protected]b4d3771d2012-11-14 14:44:106
hanxic7e55202014-08-28 14:13:217#include "content/public/test/test_browser_context.h"
8#include "extensions/browser/extensions_test.h"
[email protected]b4d3771d2012-11-14 14:44:109#include "testing/gmock/include/gmock/gmock.h"
10#include "testing/gtest/include/gtest/gtest.h"
11
12namespace extensions {
13
14namespace {
15
hanxic7e55202014-08-28 14:13:2116class TestWarningService : public WarningService {
[email protected]b4d3771d2012-11-14 14:44:1017 public:
hanxic7e55202014-08-28 14:13:2118 explicit TestWarningService(content::BrowserContext* browser_context)
19 : WarningService(browser_context) {
[email protected]b4d3771d2012-11-14 14:44:1020 }
dcheng9168b2f2014-10-21 12:38:2421 ~TestWarningService() override {}
[email protected]b4d3771d2012-11-14 14:44:1022
hanxic7e55202014-08-28 14:13:2123 void AddWarning(const Warning& warning) {
24 WarningSet warnings;
[email protected]b4d3771d2012-11-14 14:44:1025 warnings.insert(warning);
26 AddWarnings(warnings);
27 }
28};
29
hanxic7e55202014-08-28 14:13:2130class MockObserver : public WarningService::Observer {
[email protected]b4d3771d2012-11-14 14:44:1031 public:
32 virtual ~MockObserver() {}
rdevlin.cronin7dd052902015-05-19 22:23:2233 MOCK_METHOD1(ExtensionWarningsChanged, void(const ExtensionIdSet&));
[email protected]b4d3771d2012-11-14 14:44:1034};
35
Lukasz Anforowicz58d0dac2018-03-23 15:48:10