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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac_unittest.mm

Issue 23731010: Move text_elider to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update3 Created 7 years, 3 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 | Annotate | Revision Log
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 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h" 5 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 10 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
11 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" 11 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
12 #include "ui/base/text/text_elider.h" 12 #include "ui/gfx/text_elider.h"
13 13
14 namespace { 14 namespace {
15 15
16 const float kLargeWidth = 10000; 16 const float kLargeWidth = 10000;
17 17
18 // Returns the length of the run starting at |location| for which 18 // Returns the length of the run starting at |location| for which
19 // |attributeName| remains the same. 19 // |attributeName| remains the same.
20 NSUInteger RunLengthForAttribute(NSAttributedString* string, 20 NSUInteger RunLengthForAttribute(NSAttributedString* string,
21 NSUInteger location, 21 NSUInteger location,
22 NSString* attributeName) { 22 NSString* attributeName) {
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 EXPECT_GT(popup_view.GetTargetBounds().height(), old_height); 350 EXPECT_GT(popup_view.GetTargetBounds().height(), old_height);
351 EXPECT_EQ(5, [popup_view.matrix() numberOfRows]); 351 EXPECT_EQ(5, [popup_view.matrix() numberOfRows]);
352 352
353 popup_view.SetResultCount(0); 353 popup_view.SetResultCount(0);
354 popup_view.UpdatePopupAppearance(); 354 popup_view.UpdatePopupAppearance();
355 EXPECT_FALSE(popup_view.IsOpen()); 355 EXPECT_FALSE(popup_view.IsOpen());
356 EXPECT_EQ(0, [popup_view.matrix() numberOfRows]); 356 EXPECT_EQ(0, [popup_view.matrix() numberOfRows]);
357 } 357 }
358 358
359 } // namespace 359 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.mm ('k') | chrome/browser/ui/cocoa/status_bubble_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698