Commit 90940f0e authored by Robert Sesek's avatar Robert Sesek

Disable BoundedLabelTest.GetWrappedTextTest on macOS 10.10

There are slightly different font metrics between macOS versions, and
either macOS 10.10 or 10.11 will fail with a single hard-coded constant
value for pixel widths. Just disable this test on 10.10, which is the
oldest version that is supported, and let the test pass on 10.11+.

Bug: 739386
Change-Id: I82ea6a3276ebe5de4906c33a906ebf76cf2c85b9
Reviewed-on: https://chromium-review.googlesource.com/c/1344769Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609764}
parent 86d0abb7
......@@ -8,12 +8,17 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/text_utils.h"
#include "ui/views/controls/label.h"
#include "ui/views/test/views_test_base.h"
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
#endif
namespace message_center {
namespace test {
......@@ -101,6 +106,13 @@ class BoundedLabelTest : public views::ViewsTestBase {
/* Elision tests **************************************************************/
TEST_F(BoundedLabelTest, GetWrappedTextTest) {
#if defined(OS_MACOSX)
// Skip this test on macOS 10.10, which has slightly different font metrics
// than the other OSes we support.
if (base::mac::IsOS10_10())
return;
#endif
// One word per line: No ellision should be made when not necessary.
TEST_WRAP("123", "123", 301, 1);
TEST_WRAP("123", "123", 301, 2);
......
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