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

Unified Diff: ui/gfx/platform_font_mac_unittest.mm

Issue 854713003: More old files deletion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix tryjobs? Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/platform_font_mac.mm ('k') | ui/gfx/platform_font_pango.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/platform_font_mac_unittest.mm
diff --git a/ui/gfx/platform_font_mac_unittest.mm b/ui/gfx/platform_font_mac_unittest.mm
deleted file mode 100644
index 2584cb50d312f20b4a45c416fe5b89e931b94efc..0000000000000000000000000000000000000000
--- a/ui/gfx/platform_font_mac_unittest.mm
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <Cocoa/Cocoa.h>
-
-#include "ui/gfx/font.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-TEST(PlatformFontMacTest, DeriveFont) {
- // Use a base font that support all traits.
- gfx::Font base_font("Helvetica", 13);
-
- // Bold
- gfx::Font bold_font(base_font.Derive(0, gfx::Font::BOLD));
- NSFontTraitMask traits = [[NSFontManager sharedFontManager]
- traitsOfFont:bold_font.GetNativeFont()];
- EXPECT_EQ(NSBoldFontMask, traits);
-
- // Italic
- gfx::Font italic_font(base_font.Derive(0, gfx::Font::ITALIC));
- traits = [[NSFontManager sharedFontManager]
- traitsOfFont:italic_font.GetNativeFont()];
- EXPECT_EQ(NSItalicFontMask, traits);
-
- // Bold italic
- gfx::Font bold_italic_font(base_font.Derive(
- 0, gfx::Font::BOLD | gfx::Font::ITALIC));
- traits = [[NSFontManager sharedFontManager]
- traitsOfFont:bold_italic_font.GetNativeFont()];
- EXPECT_EQ(static_cast<NSFontTraitMask>(NSBoldFontMask | NSItalicFontMask),
- traits);
-}
-
-TEST(PlatformFontMacTest, ConstructFromNativeFont) {
- gfx::Font normal_font([NSFont fontWithName:@"Helvetica" size:12]);
- EXPECT_EQ(12, normal_font.GetFontSize());
- EXPECT_EQ("Helvetica", normal_font.GetFontName());
- EXPECT_EQ(gfx::Font::NORMAL, normal_font.GetStyle());
-
- gfx::Font bold_font([NSFont fontWithName:@"Helvetica-Bold" size:14]);
- EXPECT_EQ(14, bold_font.GetFontSize());
- EXPECT_EQ("Helvetica", bold_font.GetFontName());
- EXPECT_EQ(gfx::Font::BOLD, bold_font.GetStyle());
-
- gfx::Font italic_font([NSFont fontWithName:@"Helvetica-Oblique" size:14]);
- EXPECT_EQ(14, italic_font.GetFontSize());
- EXPECT_EQ("Helvetica", italic_font.GetFontName());
- EXPECT_EQ(gfx::Font::ITALIC, italic_font.GetStyle());
-
- gfx::Font bold_italic_font(
- [NSFont fontWithName:@"Helvetica-BoldOblique" size:14]);
- EXPECT_EQ(14, bold_italic_font.GetFontSize());
- EXPECT_EQ("Helvetica", bold_italic_font.GetFontName());
- EXPECT_EQ(gfx::Font::BOLD | gfx::Font::ITALIC, bold_italic_font.GetStyle());
-}
« no previous file with comments | « ui/gfx/platform_font_mac.mm ('k') | ui/gfx/platform_font_pango.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698