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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/web_drop_target_unittest.mm

Issue 8418033: Push one function from the Mac drag/drop util code to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/web_drop_target.mm ('k') | chrome/browser/ui/cocoa/url_drop_target.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tab_contents/web_drop_target_unittest.mm
diff --git a/chrome/browser/ui/cocoa/tab_contents/web_drop_target_unittest.mm b/chrome/browser/ui/cocoa/tab_contents/web_drop_target_unittest.mm
index 1d578de4c4fcfe7ea9e6886703f4efb08ef501f9..3d93344b70df98b9e3634e5d2b085ff484dd6c38 100644
--- a/chrome/browser/ui/cocoa/tab_contents/web_drop_target_unittest.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/web_drop_target_unittest.mm
@@ -7,12 +7,12 @@
#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/drag_util.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/tab_contents/test_tab_contents.h"
#include "testing/gtest/include/gtest/gtest.h"
#import "third_party/mozilla/NSPasteboard+Utils.h"
+#import "ui/base/dragdrop/cocoa_dnd_util.h"
#include "webkit/glue/webdropdata.h"
class WebDropTargetTest : public ChromeRenderViewHostTestHarness {
@@ -82,7 +82,7 @@ TEST_F(WebDropTargetTest, URL) {
pboard = [NSPasteboard pasteboardWithUniqueName];
url = @"http://www.google.com/";
PutURLOnPasteboard(url, pboard);
- EXPECT_TRUE(drag_util::PopulateURLAndTitleFromPasteBoard(
+ EXPECT_TRUE(ui::PopulateURLAndTitleFromPasteboard(
&result_url, &result_title, pboard, NO));
EXPECT_EQ(base::SysNSStringToUTF8(url), result_url.spec());
[pboard releaseGlobally];
@@ -92,7 +92,7 @@ TEST_F(WebDropTargetTest, URL) {
url = @"http://www.google.com/";
title = @"Title of Awesomeness!",
PutCoreURLAndTitleOnPasteboard(url, title, pboard);
- EXPECT_TRUE(drag_util::PopulateURLAndTitleFromPasteBoard(
+ EXPECT_TRUE(ui::PopulateURLAndTitleFromPasteboard(
&result_url, &result_title, pboard, NO));
EXPECT_EQ(base::SysNSStringToUTF8(url), result_url.spec());
EXPECT_EQ(base::SysNSStringToUTF16(title), result_title);
@@ -103,7 +103,7 @@ TEST_F(WebDropTargetTest, URL) {
url = @"file:///tmp/dont_delete_me.txt";
title = @"very important";
PutCoreURLAndTitleOnPasteboard(url, title, pboard);
- EXPECT_TRUE(drag_util::PopulateURLAndTitleFromPasteBoard(
+ EXPECT_TRUE(ui::PopulateURLAndTitleFromPasteboard(
&result_url, &result_title, pboard, NO));
EXPECT_EQ(base::SysNSStringToUTF8(url), result_url.spec());
EXPECT_EQ(base::SysNSStringToUTF16(title), result_title);
@@ -114,7 +114,7 @@ TEST_F(WebDropTargetTest, URL) {
url = @"javascript:open('http://www.youtube.com/')";
title = @"kill some time";
PutCoreURLAndTitleOnPasteboard(url, title, pboard);
- EXPECT_TRUE(drag_util::PopulateURLAndTitleFromPasteBoard(
+ EXPECT_TRUE(ui::PopulateURLAndTitleFromPasteboard(
&result_url, &result_title, pboard, NO));
EXPECT_EQ(base::SysNSStringToUTF8(url), result_url.spec());
EXPECT_EQ(base::SysNSStringToUTF16(title), result_title);
@@ -126,9 +126,9 @@ TEST_F(WebDropTargetTest, URL) {
owner:nil];
[pboard setPropertyList:[NSArray arrayWithObject:url]
forType:NSFilenamesPboardType];
- EXPECT_FALSE(drag_util::PopulateURLAndTitleFromPasteBoard(
+ EXPECT_FALSE(ui::PopulateURLAndTitleFromPasteboard(
&result_url, &result_title, pboard, NO));
- EXPECT_TRUE(drag_util::PopulateURLAndTitleFromPasteBoard(
+ EXPECT_TRUE(ui::PopulateURLAndTitleFromPasteboard(
&result_url, &result_title, pboard, YES));
EXPECT_EQ("file://localhost/bin/sh", result_url.spec());
EXPECT_EQ("sh", UTF16ToUTF8(result_title));
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/web_drop_target.mm ('k') | chrome/browser/ui/cocoa/url_drop_target.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698