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

Side by Side Diff: chrome/browser/extensions/extension_warning_set_unittest.cc

Issue 10700027: browser: Move global error to subdir. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
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 "chrome/browser/extensions/extension_warning_set.h" 5 #include "chrome/browser/extensions/extension_warning_set.h"
6 6
7 #include "chrome/browser/extensions/extension_global_error_badge.h" 7 #include "chrome/browser/extensions/extension_global_error_badge.h"
8 #include "chrome/browser/ui/global_error_service.h" 8 #include "chrome/browser/ui/global_error/global_error_service.h"
9 #include "chrome/browser/ui/global_error_service_factory.h" 9 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
10 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace { 14 namespace {
15 15
16 class MockExtensionWarningSet : public ExtensionWarningSet { 16 class MockExtensionWarningSet : public ExtensionWarningSet {
17 public: 17 public:
18 explicit MockExtensionWarningSet(Profile* profile) 18 explicit MockExtensionWarningSet(Profile* profile)
19 : ExtensionWarningSet(profile) { 19 : ExtensionWarningSet(profile) {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 warnings.SetWarning(warning_1, ext1_id); 127 warnings.SetWarning(warning_1, ext1_id);
128 testing::Mock::VerifyAndClearExpectations(&warnings); 128 testing::Mock::VerifyAndClearExpectations(&warnings);
129 EXPECT_FALSE(HasBadge(&profile)); 129 EXPECT_FALSE(HasBadge(&profile));
130 130
131 // Set second warning and verify that it shows a badge. 131 // Set second warning and verify that it shows a badge.
132 EXPECT_CALL(warnings, NotifyWarningsChanged()); 132 EXPECT_CALL(warnings, NotifyWarningsChanged());
133 warnings.SetWarning(warning_2, ext2_id); 133 warnings.SetWarning(warning_2, ext2_id);
134 testing::Mock::VerifyAndClearExpectations(&warnings); 134 testing::Mock::VerifyAndClearExpectations(&warnings);
135 EXPECT_TRUE(HasBadge(&profile)); 135 EXPECT_TRUE(HasBadge(&profile));
136 } 136 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_warning_set.cc ('k') | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698