Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Side by Side Diff: chrome/browser/cocoa/web_drop_target_unittest.mm

Issue 342020: First of several patches to get rid of MessageLoop caching now that we have C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "base/scoped_nsautorelease_pool.h" 5 #include "base/scoped_nsautorelease_pool.h"
6 #include "base/sys_string_conversions.h" 6 #include "base/sys_string_conversions.h"
7 #import "chrome/browser/cocoa/cocoa_test_helper.h" 7 #import "chrome/browser/cocoa/cocoa_test_helper.h"
8 #import "chrome/browser/cocoa/web_drop_target.h" 8 #import "chrome/browser/cocoa/web_drop_target.h"
9 #include "chrome/browser/renderer_host/test/test_render_view_host.h" 9 #include "chrome/browser/renderer_host/test/test_render_view_host.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #import "third_party/mozilla/include/NSPasteboard+Utils.h" 11 #import "third_party/mozilla/include/NSPasteboard+Utils.h"
12 #include "webkit/glue/webdropdata.h" 12 #include "webkit/glue/webdropdata.h"
13 13
14 class WebDropTargetTest : public RenderViewHostTestHarness { 14 class WebDropTargetTest : public RenderViewHostTestHarness {
15 public: 15 public:
16 WebDropTargetTest() { 16 WebDropTargetTest() {
17 RenderViewHostTestHarness::SetUp();
18 drop_target_.reset([[WebDropTarget alloc] initWithTabContents:contents()]); 17 drop_target_.reset([[WebDropTarget alloc] initWithTabContents:contents()]);
19 } 18 }
20 19
21 virtual ~WebDropTargetTest() { 20 virtual ~WebDropTargetTest() {
22 RenderViewHostTestHarness::TearDown(); 21 RenderViewHostTestHarness::TearDown();
23 22
24 } 23 }
25 24
26 void PutURLOnPasteboard(NSString* urlString, NSPasteboard* pboard) { 25 void PutURLOnPasteboard(NSString* urlString, NSPasteboard* pboard) {
27 [pboard declareTypes:[NSArray arrayWithObject:NSURLPboardType] 26 [pboard declareTypes:[NSArray arrayWithObject:NSURLPboardType]
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 EXPECT_EQ(data.plain_text, base::SysNSStringToUTF16(textString)); 101 EXPECT_EQ(data.plain_text, base::SysNSStringToUTF16(textString));
103 EXPECT_EQ(data.text_html, base::SysNSStringToUTF16(htmlString)); 102 EXPECT_EQ(data.text_html, base::SysNSStringToUTF16(htmlString));
104 103
105 [pboard releaseGlobally]; 104 [pboard releaseGlobally];
106 } 105 }
107 106
108 TEST_F(WebDropTargetTest, EnterExitDrop) { 107 TEST_F(WebDropTargetTest, EnterExitDrop) {
109 // TODO(pinkerton): Call enter/exit/drop and see what happens. This is a bit 108 // TODO(pinkerton): Call enter/exit/drop and see what happens. This is a bit
110 // harder to test. 109 // harder to test.
111 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698