Chromium Code Reviews| Index: content/browser/tab_contents/web_drag_dest_mac_unittest.mm |
| diff --git a/chrome/browser/ui/cocoa/tab_contents/web_drop_target_unittest.mm b/content/browser/tab_contents/web_drag_dest_mac_unittest.mm |
| similarity index 90% |
| rename from chrome/browser/ui/cocoa/tab_contents/web_drop_target_unittest.mm |
| rename to content/browser/tab_contents/web_drag_dest_mac_unittest.mm |
| index 3d93344b70df98b9e3634e5d2b085ff484dd6c38..8f6d8a0072921da4ce48f7e83eea9e938a5d1d61 100644 |
| --- a/chrome/browser/ui/cocoa/tab_contents/web_drop_target_unittest.mm |
| +++ b/content/browser/tab_contents/web_drag_dest_mac_unittest.mm |
| @@ -6,21 +6,20 @@ |
| #import "base/memory/scoped_nsobject.h" |
| #include "base/sys_string_conversions.h" |
| #include "base/utf_string_conversions.h" |
| -#import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
| -#import "chrome/browser/ui/cocoa/tab_contents/web_drop_target.h" |
| -#include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| +#include "content/browser/renderer_host/test_render_view_host.h" |
| #include "content/browser/tab_contents/test_tab_contents.h" |
| +#import "content/browser/tab_contents/web_drag_dest_mac.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| #import "third_party/mozilla/NSPasteboard+Utils.h" |
| #import "ui/base/dragdrop/cocoa_dnd_util.h" |
| +#import "ui/base/test/ui_cocoa_test_helper.h" |
| #include "webkit/glue/webdropdata.h" |
| -class WebDropTargetTest : public ChromeRenderViewHostTestHarness { |
| +class WebDragDestTest : public RenderViewHostTestHarness { |
| public: |
| virtual void SetUp() { |
| - ChromeRenderViewHostTestHarness::SetUp(); |
| - CocoaTest::BootstrapCocoa(); |
| - drop_target_.reset([[WebDropTarget alloc] initWithTabContents:contents()]); |
| + RenderViewHostTestHarness::SetUp(); |
| + drop_target_.reset([[WebDragDest alloc] initWithTabContents:contents()]); |
| } |
| void PutURLOnPasteboard(NSString* urlString, NSPasteboard* pboard) { |
| @@ -45,16 +44,16 @@ class WebDropTargetTest : public ChromeRenderViewHostTestHarness { |
| } |
| base::mac::ScopedNSAutoreleasePool pool_; |
| - scoped_nsobject<WebDropTarget> drop_target_; |
| + scoped_nsobject<WebDragDest> drop_target_; |
|
jochen (gone - plz use gerrit)
2011/11/01 19:26:03
nit rename variable as well?
Avi (use Gerrit)
2011/11/01 20:19:23
Done.
|
| }; |
| // Make sure nothing leaks. |
| -TEST_F(WebDropTargetTest, Init) { |
| +TEST_F(WebDragDestTest, Init) { |
| EXPECT_TRUE(drop_target_); |
| } |
| // Test flipping of coordinates given a point in window coordinates. |
| -TEST_F(WebDropTargetTest, Flip) { |
| +TEST_F(WebDragDestTest, Flip) { |
| NSPoint windowPoint = NSZeroPoint; |
| scoped_nsobject<NSWindow> window([[CocoaTestHelperWindow alloc] init]); |
| NSPoint viewPoint = |
| @@ -71,7 +70,7 @@ TEST_F(WebDropTargetTest, Flip) { |
| EXPECT_NE(0, screenPoint.y); |
| } |
| -TEST_F(WebDropTargetTest, URL) { |
| +TEST_F(WebDragDestTest, URL) { |
| NSPasteboard* pboard = nil; |
| NSString* url = nil; |
| NSString* title = nil; |
| @@ -135,7 +134,7 @@ TEST_F(WebDropTargetTest, URL) { |
| [pboard releaseGlobally]; |
| } |
| -TEST_F(WebDropTargetTest, Data) { |
| +TEST_F(WebDragDestTest, Data) { |
| WebDropData data; |
| NSPasteboard* pboard = [NSPasteboard pasteboardWithUniqueName]; |