OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_drag_source_mac.h" | 5 #import "content/browser/web_contents/web_drag_source_mac.h" |
6 | 6 |
7 #include "content/browser/web_contents/web_contents_impl.h" | 7 #include "content/browser/web_contents/web_contents_impl.h" |
8 #include "content/public/common/drop_data.h" | 8 #include "content/public/common/drop_data.h" |
9 #include "content/public/test/test_renderer_host.h" | 9 #include "content/public/test/test_renderer_host.h" |
10 #include "googleurl/src/gurl.h" | |
11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "url/gurl.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 typedef RenderViewHostTestHarness WebDragSourceMacTest; | 15 typedef RenderViewHostTestHarness WebDragSourceMacTest; |
16 | 16 |
17 TEST_F(WebDragSourceMacTest, DragInvalidlyEscapedBookmarklet) { | 17 TEST_F(WebDragSourceMacTest, DragInvalidlyEscapedBookmarklet) { |
18 scoped_ptr<WebContents> contents(CreateTestWebContents()); | 18 scoped_ptr<WebContents> contents(CreateTestWebContents()); |
19 base::scoped_nsobject<NSView> view( | 19 base::scoped_nsobject<NSView> view( |
20 [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 10, 10)]); | 20 [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 10, 10)]); |
21 | 21 |
(...skipping 10 matching lines...) Expand all Loading... |
32 pasteboard:[NSPasteboard pasteboardWithUniqueName] | 32 pasteboard:[NSPasteboard pasteboardWithUniqueName] |
33 dragOperationMask:NSDragOperationCopy]); | 33 dragOperationMask:NSDragOperationCopy]); |
34 | 34 |
35 // Test that this call doesn't throw any exceptions: http://crbug.com/128371 | 35 // Test that this call doesn't throw any exceptions: http://crbug.com/128371 |
36 base::scoped_nsobject<NSPasteboard> pasteboard( | 36 base::scoped_nsobject<NSPasteboard> pasteboard( |
37 [NSPasteboard pasteboardWithUniqueName]); | 37 [NSPasteboard pasteboardWithUniqueName]); |
38 [source lazyWriteToPasteboard:pasteboard forType:NSURLPboardType]; | 38 [source lazyWriteToPasteboard:pasteboard forType:NSURLPboardType]; |
39 } | 39 } |
40 | 40 |
41 } // namespace content | 41 } // namespace content |
OLD | NEW |