Commit ad3436a1 authored by Trent Apted's avatar Trent Apted Committed by Commit Bot

Disable LabelButtonTest.ButtonStyleIsDefaultStyle on Mac

This fails on 10.10 only because the system bold font doesn't change its
width enough to cause the test expecations to fail. But we don't care
about styled LabelButtons on Mac -- just MdTextButton, so just disable
on Mac.

TBR=ellyjones@chromium.org

Bug: 779937
Change-Id: I941c6b0ce9ee7bd6e4794519c7a6129e0dace7d5
Reviewed-on: https://chromium-review.googlesource.com/746064Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512763}
parent 6f3a2600
......@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/material_design/material_design_controller.h"
......@@ -384,7 +385,14 @@ TEST_F(LabelButtonTest, ChangeLabelImageSpacing) {
// Ensure the label gets the correct style for default buttons (e.g. bolding)
// and button size updates correctly. Regression test for crbug.com/578722.
TEST_F(LabelButtonTest, ButtonStyleIsDefaultStyle) {
// Disabled on Mac. The system bold font on 10.10 doesn't get wide enough to
// change the size, but we don't use styled buttons on Mac, just MdTextButton.
#if defined(OS_MACOSX)
#define MAYBE_ButtonStyleIsDefaultStyle DISABLED_ButtonStyleIsDefaultStyle
#else
#define MAYBE_ButtonStyleIsDefaultStyle ButtonStyleIsDefaultStyle
#endif
TEST_F(LabelButtonTest, MAYBE_ButtonStyleIsDefaultStyle) {
TestLabelButton* button = AddStyledButton("Save", false);
gfx::Size non_default_size = button->label()->size();
EXPECT_EQ(button->label()->GetPreferredSize().width(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment