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/clipboard.h" | 7 #include "app/clipboard/clipboard.h" |
| 8 #include "app/clipboard/scoped_clipboard_writer.h" |
8 #include "base/gfx/size.h" | 9 #include "base/gfx/size.h" |
9 #include "base/scoped_clipboard_writer.h" | |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/sys_string_conversions.h" | 11 #include "base/sys_string_conversions.h" |
12 #include "chrome/browser/autocomplete/autocomplete.h" | 12 #include "chrome/browser/autocomplete/autocomplete.h" |
13 #include "testing/platform_test.h" | 13 #include "testing/platform_test.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 TEST(AutocompleteEditViewMacTest, GetClipboardText) { | 17 TEST(AutocompleteEditViewMacTest, GetClipboardText) { |
18 Clipboard clipboard; | 18 Clipboard clipboard; |
19 std::wstring text; | 19 std::wstring text; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const string16 markup(ASCIIToUTF16("<strong>Hi!</string>")); | 60 const string16 markup(ASCIIToUTF16("<strong>Hi!</string>")); |
61 ScopedClipboardWriter clipboard_writer(&clipboard); | 61 ScopedClipboardWriter clipboard_writer(&clipboard); |
62 clipboard_writer.WriteHTML(markup, url); | 62 clipboard_writer.WriteHTML(markup, url); |
63 } | 63 } |
64 | 64 |
65 text = AutocompleteEditViewMac::GetClipboardText(&clipboard); | 65 text = AutocompleteEditViewMac::GetClipboardText(&clipboard); |
66 EXPECT_TRUE(text.empty()); | 66 EXPECT_TRUE(text.empty()); |
67 } | 67 } |
68 | 68 |
69 } // namespace | 69 } // namespace |
OLD | NEW |