Chromium Code Reviews| 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 41dd43a69234e701f5238ee6f6d4296b5cfda6ce..ea49a9de6f631da11a97c33207afd9f69efe5a73 100644 |
| --- a/ui/base/dragdrop/os_exchange_data_unittest.cc |
| +++ b/ui/base/dragdrop/os_exchange_data_unittest.cc |
| @@ -26,10 +26,13 @@ class OSExchangeDataTest : public PlatformTest { |
| TEST_F(OSExchangeDataTest, StringDataGetAndSet) { |
|
dcheng
2014/07/07 18:42:19
Since you're updating this anyway, is it possible
dcheng
2014/07/07 18:43:03
Actually, I'll just add this test separately since
Andre
2014/07/07 20:10:51
I think you can just add the test that fails on th
|
| OSExchangeData data; |
| base::string16 input = base::ASCIIToUTF16("I can has cheezburger?"); |
| + EXPECT_FALSE(data.HasString()); |
| data.SetString(input); |
| + EXPECT_TRUE(data.HasString()); |
| OSExchangeData data2(data.provider().Clone()); |
| base::string16 output; |
| + EXPECT_TRUE(data2.HasString()); |
| EXPECT_TRUE(data2.GetString(&output)); |
| EXPECT_EQ(input, output); |
| std::string url_spec = "http://www.goats.com/"; |
| @@ -46,14 +49,16 @@ TEST_F(OSExchangeDataTest, TestURLExchangeFormats) { |
| std::string url_spec = "http://www.google.com/"; |
| GURL url(url_spec); |
| base::string16 url_title = base::ASCIIToUTF16("www.google.com"); |
| + EXPECT_FALSE(data.HasURL(OSExchangeData::CONVERT_FILENAMES)); |
|
dcheng
2014/07/07 18:42:19
Can we explicitly use DO_NOT_CONVERT_FILENAMES her
Andre
2014/07/07 20:10:51
Done.
|
| data.SetURL(url, url_title); |
| - base::string16 output; |
| + EXPECT_TRUE(data.HasURL(OSExchangeData::CONVERT_FILENAMES)); |
| OSExchangeData data2(data.provider().Clone()); |
| // URL spec and title should match |
| GURL output_url; |
| base::string16 output_title; |
| + EXPECT_TRUE(data2.HasURL(OSExchangeData::CONVERT_FILENAMES)); |
|
dcheng
2014/07/07 18:42:19
Ditto.
Andre
2014/07/07 20:10:51
Done.
|
| EXPECT_TRUE(data2.GetURLAndTitle( |
| OSExchangeData::CONVERT_FILENAMES, &output_url, &output_title)); |
| EXPECT_EQ(url_spec, output_url.spec()); |