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

Unified Diff: ui/views/window/dialog_client_view_unittest.cc

Issue 2151933002: DialogDelegate: allow platforms to prevent Cancel being default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test for mac Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/style/platform_style_mac.mm ('k') | ui/views/window/dialog_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/dialog_client_view_unittest.cc
diff --git a/ui/views/window/dialog_client_view_unittest.cc b/ui/views/window/dialog_client_view_unittest.cc
index c483d254af32ed419283c1ab4ff5fa0f00d075c0..dfe45b562370dae7cf8f7a9d8dd89f83857c7647 100644
--- a/ui/views/window/dialog_client_view_unittest.cc
+++ b/ui/views/window/dialog_client_view_unittest.cc
@@ -7,6 +7,7 @@
#include "build/build_config.h"
#include "ui/base/ui_base_types.h"
#include "ui/views/controls/button/label_button.h"
+#include "ui/views/style/platform_style.h"
#include "ui/views/test/test_views.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/widget/widget.h"
@@ -148,7 +149,8 @@ TEST_F(DialogClientViewTest, UpdateButtons) {
// Reset with just a cancel button.
SetDialogButtons(ui::DIALOG_BUTTON_CANCEL);
EXPECT_EQ(NULL, client_view()->ok_button());
- EXPECT_TRUE(client_view()->cancel_button()->is_default());
+ EXPECT_EQ(client_view()->cancel_button()->is_default(),
+ PlatformStyle::kDialogDefaultButtonCanBeCancel);
EXPECT_EQ(GetUpdatedClientBounds().height(), height_with_buttons);
}
« no previous file with comments | « ui/views/style/platform_style_mac.mm ('k') | ui/views/window/dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698