| 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 a8d3d8d79c222a876312009c96f65ee9328bfbb9..26ef3e303aa8042c0f19363f5e91fb020fb8a08b 100644
|
| --- a/ui/views/window/dialog_client_view_unittest.cc
|
| +++ b/ui/views/window/dialog_client_view_unittest.cc
|
| @@ -9,6 +9,7 @@
|
| #include "build/build_config.h"
|
| #include "ui/base/test/material_design_controller_test_api.h"
|
| #include "ui/base/ui_base_types.h"
|
| +#include "ui/views/controls/button/checkbox.h"
|
| #include "ui/views/controls/button/label_button.h"
|
| #include "ui/views/style/platform_style.h"
|
| #include "ui/views/test/test_views.h"
|
| @@ -389,7 +390,7 @@ TEST_F(DialogClientViewTest, LinkedWidths) {
|
| EXPECT_EQ(ok_button_only_width, client_view()->ok_button()->width());
|
| md_test_api.SetSecondaryUiMaterial(true);
|
|
|
| - // The extra view should also match, if it's a button.
|
| + // The extra view should also match, if it's a matching button type.
|
| LabelButton* extra_button = new LabelButton(nullptr, base::string16());
|
| SetExtraView(extra_button);
|
| CheckContentsIsSetToPreferredSize();
|
| @@ -398,6 +399,15 @@ TEST_F(DialogClientViewTest, LinkedWidths) {
|
| // Remove |extra_button| from the View hierarchy so that it can be replaced.
|
| delete extra_button;
|
|
|
| + // Checkbox extends LabelButton, but it should not participate in linking.
|
| + extra_button = new Checkbox(base::string16());
|
| + SetExtraView(extra_button);
|
| + CheckContentsIsSetToPreferredSize();
|
| + EXPECT_NE(cancel_button_width, extra_button->width());
|
| +
|
| + // Remove |extra_button| from the View hierarchy so that it can be replaced.
|
| + delete extra_button;
|
| +
|
| // Non-buttons should always be sized to their preferred size.
|
| View* boring_view = new StaticSizedView(gfx::Size(20, 20));
|
| SetExtraView(boring_view);
|
|
|