| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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/ui/cocoa/url_drop_target.h" | 5 #import "chrome/browser/ui/cocoa/url_drop_target.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 9 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #import "third_party/ocmock/OCMock/OCMock.h" | 11 #import "third_party/ocmock/OCMock/OCMock.h" |
| 12 #import "third_party/ocmock/ocmock_extensions.h" | 12 #import "third_party/ocmock/ocmock_extensions.h" |
| 13 #include "ui/base/clipboard/clipboard_util_mac.h" | 13 #include "ui/base/clipboard/clipboard_util_mac.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 constexpr NSPoint kDropPoint = {10, 10}; | 16 constexpr NSPoint kDropPoint = {10, 10}; |
| 17 } // namespace | 17 } // namespace |
| 18 | 18 |
| 19 @interface TestViewDropTarget : NSView<URLDropTarget> { | 19 @interface TestViewDropTarget : NSView<URLDropTarget> { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 NSArray* titles = [NSArray arrayWithObject:@"abc"]; | 148 NSArray* titles = [NSArray arrayWithObject:@"abc"]; |
| 149 | 149 |
| 150 [[ControllerMock() expect] dropURLs:urls inView:View() at:kDropPoint]; | 150 [[ControllerMock() expect] dropURLs:urls inView:View() at:kDropPoint]; |
| 151 | 151 |
| 152 base::scoped_nsobject<NSPasteboardItem> item = | 152 base::scoped_nsobject<NSPasteboardItem> item = |
| 153 ui::ClipboardUtil::PasteboardItemFromUrls(urls, titles); | 153 ui::ClipboardUtil::PasteboardItemFromUrls(urls, titles); |
| 154 | 154 |
| 155 [View() performDragOperation:GetFakeDragInfoForPasteboardItem(item.get())]; | 155 [View() performDragOperation:GetFakeDragInfoForPasteboardItem(item.get())]; |
| 156 [ControllerMock() verify]; | 156 [ControllerMock() verify]; |
| 157 } | 157 } |
| OLD | NEW |