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

Side by Side Diff: content/common/mac/attributed_string_coder_unittest.mm

Issue 16408017: Use a direct include of utf_string_conversions.h in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <AppKit/AppKit.h> 5 #include <AppKit/AppKit.h>
6 6
7 #include "base/memory/scoped_nsobject.h" 7 #include "base/memory/scoped_nsobject.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #import "content/common/mac/attributed_string_coder.h" 10 #import "content/common/mac/attributed_string_coder.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/gtest_mac.h" 12 #include "testing/gtest_mac.h"
13 13
14 using mac::AttributedStringCoder; 14 using mac::AttributedStringCoder;
15 15
16 class AttributedStringCoderTest : public testing::Test { 16 class AttributedStringCoderTest : public testing::Test {
17 public: 17 public:
18 NSMutableAttributedString* NewAttrString() { 18 NSMutableAttributedString* NewAttrString() {
19 NSString* str = @"The quick brown fox jumped over the lazy dog."; 19 NSString* str = @"The quick brown fox jumped over the lazy dog.";
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 NSRange range; 126 NSRange range;
127 NSDictionary* attrs = [decoded attributesAtIndex:0 effectiveRange:&range]; 127 NSDictionary* attrs = [decoded attributesAtIndex:0 effectiveRange:&range];
128 EXPECT_NSEQ([NSFont systemFontOfSize:12], 128 EXPECT_NSEQ([NSFont systemFontOfSize:12],
129 [attrs objectForKey:NSFontAttributeName]); 129 [attrs objectForKey:NSFontAttributeName]);
130 EXPECT_TRUE(NSEqualRanges(range, NSMakeRange(0, 5))); 130 EXPECT_TRUE(NSEqualRanges(range, NSMakeRange(0, 5)));
131 131
132 attrs = [decoded attributesAtIndex:5 effectiveRange:&range]; 132 attrs = [decoded attributesAtIndex:5 effectiveRange:&range];
133 EXPECT_FALSE([attrs objectForKey:NSFontAttributeName]); 133 EXPECT_FALSE([attrs objectForKey:NSFontAttributeName]);
134 EXPECT_EQ(0U, [attrs count]); 134 EXPECT_EQ(0U, [attrs count]);
135 } 135 }
OLDNEW
« no previous file with comments | « content/common/mac/attributed_string_coder.mm ('k') | content/common/mac/font_descriptor_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698