OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/scoped_nsobject.h" | 5 #include "base/scoped_nsobject.h" |
6 #include "chrome/browser/character_encoding.h" | 6 #include "chrome/browser/character_encoding.h" |
7 #include "chrome/browser/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/ui/cocoa/browser_test_helper.h" | 8 #include "chrome/browser/ui/cocoa/browser_test_helper.h" |
9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
10 #import "chrome/browser/ui/cocoa/font_language_settings_controller.h" | 10 #import "chrome/browser/ui/cocoa/font_language_settings_controller.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #import "testing/gtest_mac.h" | 12 #import "testing/gtest_mac.h" |
13 #include "testing/platform_test.h" | 13 #include "testing/platform_test.h" |
14 | 14 |
15 // The FontLanguageSettingsControllerForTest overrides the getFontFieldOrigin | 15 // The FontLanguageSettingsControllerForTest overrides the getFontFieldOrigin |
16 // method to provide a dummy point, so we don't have to actually display the | 16 // method to provide a dummy point, so we don't have to actually display the |
17 // window to test the controller. | 17 // window to test the controller. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 withLabel:label]; | 82 withLabel:label]; |
83 | 83 |
84 ASSERT_NSEQ(@"foo", [field stringValue]); | 84 ASSERT_NSEQ(@"foo", [field stringValue]); |
85 } | 85 } |
86 | 86 |
87 TEST_F(FontLanguageSettingsControllerTest, UpdateDisplayFieldNilField) { | 87 TEST_F(FontLanguageSettingsControllerTest, UpdateDisplayFieldNilField) { |
88 // Don't crash. | 88 // Don't crash. |
89 NSFont* font = [NSFont fontWithName:@"Times-Roman" size:12.0]; | 89 NSFont* font = [NSFont fontWithName:@"Times-Roman" size:12.0]; |
90 [font_controller_ updateDisplayField:nil withFont:font withLabel:nil]; | 90 [font_controller_ updateDisplayField:nil withFont:font withLabel:nil]; |
91 } | 91 } |
OLD | NEW |