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

Unified Diff: ash/popup_message.cc

Issue 1026943002: Add the layout test case of ash/popup_message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: view by id Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/popup_message.h ('k') | ash/popup_message_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/popup_message.cc
diff --git a/ash/popup_message.cc b/ash/popup_message.cc
index 6256659163241563bcdd0ac4aaf6d05b8065abd3..bdde23b89046bd2fd435c8181de2aa8c3748f640 100644
--- a/ash/popup_message.cc
+++ b/ash/popup_message.cc
@@ -63,6 +63,10 @@ class PopupMessage::MessageBubble : public views::BubbleDelegateView {
DISALLOW_COPY_AND_ASSIGN(MessageBubble);
};
+// static
+const int PopupMessage::kCaptionLabelID = 1000;
+const int PopupMessage::kMessageLabelID = 1001;
+
PopupMessage::MessageBubble::MessageBubble(const base::string16& caption,
const base::string16& message,
IconType message_type,
@@ -128,6 +132,7 @@ PopupMessage::MessageBubble::MessageBubble(const base::string16& caption,
// The caption label.
if (!caption.empty()) {
views::Label* caption_label = new views::Label(caption);
+ caption_label->set_id(kCaptionLabelID);
caption_label->SetMultiLine(true);
caption_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
caption_label->SetFontList(
@@ -139,6 +144,7 @@ PopupMessage::MessageBubble::MessageBubble(const base::string16& caption,
// The message label.
if (!message.empty()) {
views::Label* message_label = new views::Label(message);
+ message_label->set_id(kMessageLabelID);
message_label->SetMultiLine(true);
message_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
message_label->SetEnabledColor(kMessageTextColor);
« no previous file with comments | « ash/popup_message.h ('k') | ash/popup_message_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698