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

Side by Side Diff: chrome/browser/ui/global_error/global_error_service_unittest.cc

Issue 14262009: Add support for multi-line GlobalError messages to Views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/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/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"
(...skipping 25 matching lines...) Expand all
36 36
37 virtual bool HasBubbleView() OVERRIDE { return false; } 37 virtual bool HasBubbleView() OVERRIDE { return false; }
38 virtual int GetBubbleViewIconResourceID() OVERRIDE { 38 virtual int GetBubbleViewIconResourceID() OVERRIDE {
39 ADD_FAILURE(); 39 ADD_FAILURE();
40 return 0; 40 return 0;
41 } 41 }
42 virtual string16 GetBubbleViewTitle() OVERRIDE { 42 virtual string16 GetBubbleViewTitle() OVERRIDE {
43 ADD_FAILURE(); 43 ADD_FAILURE();
44 return string16(); 44 return string16();
45 } 45 }
46 virtual string16 GetBubbleViewMessage() OVERRIDE { 46 virtual std::vector<string16> GetBubbleViewMessages() OVERRIDE {
47 ADD_FAILURE(); 47 ADD_FAILURE();
48 return string16(); 48 return std::vector<string16>();
49 } 49 }
50 virtual string16 GetBubbleViewAcceptButtonLabel() OVERRIDE { 50 virtual string16 GetBubbleViewAcceptButtonLabel() OVERRIDE {
51 ADD_FAILURE(); 51 ADD_FAILURE();
52 return string16(); 52 return string16();
53 } 53 }
54 virtual string16 GetBubbleViewCancelButtonLabel() OVERRIDE { 54 virtual string16 GetBubbleViewCancelButtonLabel() OVERRIDE {
55 ADD_FAILURE(); 55 ADD_FAILURE();
56 return string16(); 56 return string16();
57 } 57 }
58 virtual void OnBubbleViewDidClose(Browser* browser) OVERRIDE { 58 virtual void OnBubbleViewDidClose(Browser* browser) OVERRIDE {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 service.AddGlobalError(error3); 175 service.AddGlobalError(error3);
176 EXPECT_EQ(error3, service.GetHighestSeverityGlobalErrorWithWrenchMenuItem()); 176 EXPECT_EQ(error3, service.GetHighestSeverityGlobalErrorWithWrenchMenuItem());
177 177
178 // Remove the highest-severity error. 178 // Remove the highest-severity error.
179 service.RemoveGlobalError(error3); 179 service.RemoveGlobalError(error3);
180 delete error3; 180 delete error3;
181 181
182 // Now error2 should be the next highest severity error. 182 // Now error2 should be the next highest severity error.
183 EXPECT_EQ(error2, service.GetHighestSeverityGlobalErrorWithWrenchMenuItem()); 183 EXPECT_EQ(error2, service.GetHighestSeverityGlobalErrorWithWrenchMenuItem());
184 } 184 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698