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

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

Issue 368973003: MacViews: Partially implement OSExchangeDataProviderMac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for dcheng and tapted. Created 6 years, 5 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') | ui/ui_unittests.gyp » ('j') | 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 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());
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_mac.mm ('k') | ui/ui_unittests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698