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

Side by Side Diff: chrome/browser/ui/global_error/global_error_service_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/ui/global_error_service.h" 5 #include "chrome/browser/ui/global_error/global_error_service.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 "chrome/browser/ui/global_error.h" 9 #include "chrome/browser/ui/global_error/global_error.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace { 12 namespace {
13 13
14 // Error base class that keeps track of the number of errors that exist. 14 // Error base class that keeps track of the number of errors that exist.
15 class BaseError : public GlobalError { 15 class BaseError : public GlobalError {
16 public: 16 public:
17 BaseError() { ++count_; } 17 BaseError() { ++count_; }
18 virtual ~BaseError() { --count_; } 18 virtual ~BaseError() { --count_; }
19 19
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 EXPECT_EQ(2, service.GetFirstBadgeResourceID()); 186 EXPECT_EQ(2, service.GetFirstBadgeResourceID());
187 187
188 service.AddGlobalError(error3); 188 service.AddGlobalError(error3);
189 EXPECT_EQ(2, service.GetFirstBadgeResourceID()); 189 EXPECT_EQ(2, service.GetFirstBadgeResourceID());
190 190
191 // Remove the first error with a badge. 191 // Remove the first error with a badge.
192 service.RemoveGlobalError(&error2); 192 service.RemoveGlobalError(&error2);
193 // Now error3 should be the first error with a badge. 193 // Now error3 should be the first error with a badge.
194 EXPECT_EQ(3, service.GetFirstBadgeResourceID()); 194 EXPECT_EQ(3, service.GetFirstBadgeResourceID());
195 } 195 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/global_error/global_error_service_factory.cc ('k') | chrome/browser/ui/global_error_bubble_view_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698