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 #import "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" | 5 #import "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/autocomplete/autocomplete.h" | 10 #include "chrome/browser/autocomplete/autocomplete.h" |
11 #include "gfx/size.h" | |
12 #include "testing/platform_test.h" | 11 #include "testing/platform_test.h" |
13 #include "ui/base/clipboard/clipboard.h" | 12 #include "ui/base/clipboard/clipboard.h" |
14 #include "ui/base/clipboard/scoped_clipboard_writer.h" | 13 #include "ui/base/clipboard/scoped_clipboard_writer.h" |
| 14 #include "ui/gfx/size.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 TEST(AutocompleteEditViewMacTest, GetClipboardText) { | 18 TEST(AutocompleteEditViewMacTest, GetClipboardText) { |
19 ui::Clipboard clipboard; | 19 ui::Clipboard clipboard; |
20 string16 text; | 20 string16 text; |
21 | 21 |
22 // Does an empty clipboard get empty text? | 22 // Does an empty clipboard get empty text? |
23 clipboard.WriteObjects(ui::Clipboard::ObjectMap()); | 23 clipboard.WriteObjects(ui::Clipboard::ObjectMap()); |
24 text = AutocompleteEditViewMac::GetClipboardText(&clipboard); | 24 text = AutocompleteEditViewMac::GetClipboardText(&clipboard); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 text = AutocompleteEditViewMac::GetClipboardText(&clipboard); | 66 text = AutocompleteEditViewMac::GetClipboardText(&clipboard); |
67 EXPECT_TRUE(text.empty()); | 67 EXPECT_TRUE(text.empty()); |
68 } | 68 } |
69 | 69 |
70 TEST(AutocompleteEditViewMacTest, GetFieldFont) { | 70 TEST(AutocompleteEditViewMacTest, GetFieldFont) { |
71 EXPECT_TRUE(AutocompleteEditViewMac::GetFieldFont()); | 71 EXPECT_TRUE(AutocompleteEditViewMac::GetFieldFont()); |
72 } | 72 } |
73 | 73 |
74 } // namespace | 74 } // namespace |
OLD | NEW |