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

Side by Side Diff: chrome/browser/ui/global_error/global_error_service_browsertest.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/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/global_error/global_error.h" 9 #include "chrome/browser/ui/global_error/global_error.h"
10 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h" 10 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h"
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 virtual void ExecuteMenuItem(Browser* browser) OVERRIDE { ADD_FAILURE(); } 37 virtual void ExecuteMenuItem(Browser* browser) OVERRIDE { ADD_FAILURE(); }
38 38
39 virtual bool HasBubbleView() OVERRIDE { return true; } 39 virtual bool HasBubbleView() OVERRIDE { return true; }
40 virtual string16 GetBubbleViewTitle() OVERRIDE { 40 virtual string16 GetBubbleViewTitle() OVERRIDE {
41 return string16(); 41 return string16();
42 } 42 }
43 virtual string16 GetBubbleViewMessage() OVERRIDE { 43 virtual string16 GetBubbleViewMessage() OVERRIDE {
44 return string16(); 44 return string16();
45 } 45 }
46 virtual std::vector<string16> GetBubbleViewMessages() OVERRIDE {
47 return std::vector<string16>();
48 }
46 virtual string16 GetBubbleViewAcceptButtonLabel() OVERRIDE { 49 virtual string16 GetBubbleViewAcceptButtonLabel() OVERRIDE {
47 return string16(); 50 return string16();
48 } 51 }
49 virtual string16 GetBubbleViewCancelButtonLabel() OVERRIDE { 52 virtual string16 GetBubbleViewCancelButtonLabel() OVERRIDE {
50 return string16(); 53 return string16();
51 } 54 }
52 virtual void OnBubbleViewDidClose(Browser* browser) OVERRIDE { 55 virtual void OnBubbleViewDidClose(Browser* browser) OVERRIDE {
53 EXPECT_TRUE(browser); 56 EXPECT_TRUE(browser);
54 ++bubble_view_close_count_; 57 ++bubble_view_close_count_;
55 } 58 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 EXPECT_TRUE(error->HasShownBubbleView()); 138 EXPECT_TRUE(error->HasShownBubbleView());
136 EXPECT_EQ(0, error->bubble_view_close_count()); 139 EXPECT_EQ(0, error->bubble_view_close_count());
137 140
138 // Removing |error| from profile should dismiss the bubble view without 141 // Removing |error| from profile should dismiss the bubble view without
139 // calling |error->BubbleViewDidClose|. 142 // calling |error->BubbleViewDidClose|.
140 service->RemoveGlobalError(error.get()); 143 service->RemoveGlobalError(error.get());
141 content::RunAllPendingInMessageLoop(); 144 content::RunAllPendingInMessageLoop();
142 EXPECT_EQ(1, error->bubble_view_close_count()); 145 EXPECT_EQ(1, error->bubble_view_close_count());
143 // |error| is no longer owned by service and will be deleted. 146 // |error| is no longer owned by service and will be deleted.
144 } 147 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698