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

Side by Side Diff: ui/gfx/render_text_unittest.cc

Issue 1003273004: [RenderText] Added chrome os exclusion from doesntClip test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/render_text.h" 5 #include "ui/gfx/render_text.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/i18n/break_iterator.h" 10 #include "base/i18n/break_iterator.h"
(...skipping 2708 matching lines...) Expand 10 before | Expand all | Expand 10 after
2719 kTestSize + string_size.height(), 2719 kTestSize + string_size.height(),
2720 kCanvasSize.width(), kTestSize); 2720 kCanvasSize.width(), kTestSize);
2721 } 2721 }
2722 { 2722 {
2723 SCOPED_TRACE("TextDoesntClip Left Side"); 2723 SCOPED_TRACE("TextDoesntClip Left Side");
2724 #if defined(OS_WIN) 2724 #if defined(OS_WIN)
2725 // TODO(dschuyler): On Windows XP the Unicode test draws to the left edge 2725 // TODO(dschuyler): On Windows XP the Unicode test draws to the left edge
2726 // as if it is ignoring the SetDisplayRect shift by kTestSize. This 2726 // as if it is ignoring the SetDisplayRect shift by kTestSize. This
2727 // appears to be a preexisting issue that wasn't revealed by the prior 2727 // appears to be a preexisting issue that wasn't revealed by the prior
2728 // unit tests. 2728 // unit tests.
2729 #elif defined(OS_MACOSX) 2729 #elif defined(OS_MACOSX) || defined(OS_CHROMEOS)
2730 // TODO(dschuyler): On Windows (non-XP) and Mac smoothing draws left of 2730 // TODO(dschuyler): On Windows (non-XP), Chrome OS and Mac smoothing draws
2731 // text. This appears to be a preexisting issue that wasn't revealed by 2731 // left of text. This appears to be a preexisting issue that wasn't
2732 // the prior unit tests. 2732 // revealed by the prior unit tests.
2733 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, kTestSize, kTestSize - 1, 2733 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, kTestSize, kTestSize - 1,
2734 string_size.height()); 2734 string_size.height());
2735 #else 2735 #else
2736 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, kTestSize, kTestSize, 2736 rect_buffer.EnsureSolidRect(SK_ColorWHITE, 0, kTestSize, kTestSize,
2737 string_size.height()); 2737 string_size.height());
2738 #endif 2738 #endif
2739 } 2739 }
2740 { 2740 {
2741 SCOPED_TRACE("TextDoesntClip Right Side"); 2741 SCOPED_TRACE("TextDoesntClip Right Side");
2742 #if !defined(OS_MACOSX) 2742 #if !defined(OS_MACOSX)
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
2822 string_size.set_width(string_size.width() / 2); 2822 string_size.set_width(string_size.width() / 2);
2823 render_text.SetDisplayRect(gfx::Rect(string_size)); 2823 render_text.SetDisplayRect(gfx::Rect(string_size));
2824 render_text.EnsureLayout(); 2824 render_text.EnsureLayout();
2825 CFIndex glyph_count = CTLineGetGlyphCount(render_text.line_); 2825 CFIndex glyph_count = CTLineGetGlyphCount(render_text.line_);
2826 EXPECT_GT(text.size(), static_cast<size_t>(glyph_count)); 2826 EXPECT_GT(text.size(), static_cast<size_t>(glyph_count));
2827 EXPECT_NE(0, glyph_count); 2827 EXPECT_NE(0, glyph_count);
2828 } 2828 }
2829 #endif 2829 #endif
2830 2830
2831 } // namespace gfx 2831 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698