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

Unified Diff: ui/base/dragdrop/os_exchange_data_unittest.cc

Issue 542203004: MacViews: Get OSExchangeDataTest to pass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « ui/base/dragdrop/os_exchange_data_provider_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dragdrop/os_exchange_data_unittest.cc
diff --git a/ui/base/dragdrop/os_exchange_data_unittest.cc b/ui/base/dragdrop/os_exchange_data_unittest.cc
index 8f685c8f6974823c932f26aa72c63b5eba5d44e4..02e353787a5b7c33ecb9b425e434f84cebec03f6 100644
--- a/ui/base/dragdrop/os_exchange_data_unittest.cc
+++ b/ui/base/dragdrop/os_exchange_data_unittest.cc
@@ -104,6 +104,10 @@ TEST_F(OSExchangeDataTest, TestFileToURLConversion) {
ASSERT_TRUE(base::GetCurrentDirectory(&current_directory));
data.SetFilename(current_directory);
+
+// NSPasteboard does not support not converting, writing NSFilenamesPboardType
dcheng 2014/09/10 00:22:54 We need to manually clear it in the code that read
Andre 2014/09/13 01:10:50 I couldn't find a way to clear the URL from the pa
+// will automatically populates URL types as well.
+#if !defined(OS_MACOSX)
{
EXPECT_FALSE(data.HasURL(OSExchangeData::DO_NOT_CONVERT_FILENAMES));
GURL actual_url;
@@ -113,6 +117,8 @@ TEST_F(OSExchangeDataTest, TestFileToURLConversion) {
EXPECT_EQ(GURL(), actual_url);
EXPECT_EQ(base::string16(), actual_title);
}
+#endif
+
{
// Filename to URL conversion is not implemented on ChromeOS or on non-X11 Linux
// builds.
@@ -130,7 +136,9 @@ TEST_F(OSExchangeDataTest, TestFileToURLConversion) {
expected_success,
data.GetURLAndTitle(
OSExchangeData::CONVERT_FILENAMES, &actual_url, &actual_title));
- EXPECT_EQ(expected_url, actual_url);
+ // Some Mac OS versions return the URL in file://localhost form instead
+ // of file:///, so we compare the url's path not its absolute string.
+ EXPECT_EQ(expected_url.path(), actual_url.path());
EXPECT_EQ(base::string16(), actual_title);
}
EXPECT_TRUE(data.HasFile());
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698