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

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: lastObject -> objectAtIndex 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..6087b6377a40245745be144da5deb488587e7d0f 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) {
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,16 +49,18 @@ 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::DO_NOT_CONVERT_FILENAMES));
data.SetURL(url, url_title);
- base::string16 output;
+ EXPECT_TRUE(data.HasURL(OSExchangeData::DO_NOT_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::DO_NOT_CONVERT_FILENAMES));
EXPECT_TRUE(data2.GetURLAndTitle(
- OSExchangeData::CONVERT_FILENAMES, &output_url, &output_title));
+ OSExchangeData::DO_NOT_CONVERT_FILENAMES, &output_url, &output_title));
EXPECT_EQ(url_spec, output_url.spec());
EXPECT_EQ(url_title, output_title);
base::string16 output_string;
« 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