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

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..417b6a61820a896ec4efd65dc47bb128df4f43c5 100644
--- a/ui/base/dragdrop/os_exchange_data_unittest.cc
+++ b/ui/base/dragdrop/os_exchange_data_unittest.cc
@@ -104,6 +104,7 @@ TEST_F(OSExchangeDataTest, TestFileToURLConversion) {
ASSERT_TRUE(base::GetCurrentDirectory(&current_directory));
data.SetFilename(current_directory);
+
{
EXPECT_FALSE(data.HasURL(OSExchangeData::DO_NOT_CONVERT_FILENAMES));
GURL actual_url;
@@ -113,6 +114,7 @@ TEST_F(OSExchangeDataTest, TestFileToURLConversion) {
EXPECT_EQ(GURL(), actual_url);
EXPECT_EQ(base::string16(), actual_title);
}
+
{
// Filename to URL conversion is not implemented on ChromeOS or on non-X11 Linux
// builds.
@@ -130,7 +132,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