Chromium Code Reviews| Index: ui/views/cocoa/drag_drop_client_mac_unittest.mm |
| diff --git a/ui/views/cocoa/drag_drop_client_mac_unittest.mm b/ui/views/cocoa/drag_drop_client_mac_unittest.mm |
| index 364b73e0d6991b27205bbb58e3892dc1517a5b94..e078492c2cbe1bb8535bcbedab3de2b83bee5a95 100644 |
| --- a/ui/views/cocoa/drag_drop_client_mac_unittest.mm |
| +++ b/ui/views/cocoa/drag_drop_client_mac_unittest.mm |
| @@ -10,6 +10,7 @@ |
| #include "base/mac/sdk_forward_declarations.h" |
| #include "base/strings/utf_string_conversions.h" |
| #include "base/threading/thread_task_runner_handle.h" |
| +#include "ui/base/clipboard/clipboard_util_mac.h" |
|
tapted
2016/11/29 23:00:37
nit: import?
erikchen
2016/11/29 23:08:38
Done.
|
| #import "ui/views/cocoa/bridged_native_widget.h" |
| #include "ui/views/test/widget_test.h" |
| #include "ui/views/view.h" |
| @@ -279,17 +280,17 @@ TEST_F(DragDropClientMacTest, InvalidFormatDragDrop) { |
| TEST_F(DragDropClientMacTest, PasteboardToOSExchangeTest) { |
| target_->set_formats(ui::OSExchangeData::STRING); |
| - NSPasteboard* pasteboard = [NSPasteboard pasteboardWithUniqueName]; |
| + scoped_refptr<ui::UniquePasteboard> pasteboard = new ui::UniquePasteboard; |
| // The test should reject the data if the pasteboard is empty. |
| - EXPECT_EQ(DragUpdate(pasteboard), NSDragOperationNone); |
| + EXPECT_EQ(DragUpdate(pasteboard->get()), NSDragOperationNone); |
| EXPECT_EQ(Drop(), NSDragOperationNone); |
| drag_drop_client()->EndDrag(); |
| // Add valid data to the pasteboard and check to see if the target accepts |
| // it. |
| - [pasteboard setString:@"text" forType:NSPasteboardTypeString]; |
| - EXPECT_EQ(DragUpdate(pasteboard), NSDragOperationCopy); |
| + [pasteboard->get() setString:@"text" forType:NSPasteboardTypeString]; |
| + EXPECT_EQ(DragUpdate(pasteboard->get()), NSDragOperationCopy); |
| EXPECT_EQ(Drop(), NSDragOperationMove); |
| } |