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

Side by Side Diff: ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc

Issue 133053003: linux_aura: Fix dragging files into Dropbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplify Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_aurax11.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h" 5 #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h"
6 6
7 // Clean up X11 header polution 7 // Clean up X11 header polution
8 #undef None 8 #undef None
9 #undef Bool 9 #undef Bool
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 EXPECT_EQ(kFileName, filenames[0].path.value()); 89 EXPECT_EQ(kFileName, filenames[0].path.value());
90 90
91 // We should only receive the URL here. 91 // We should only receive the URL here.
92 GURL out_gurl; 92 GURL out_gurl;
93 base::string16 out_str; 93 base::string16 out_str;
94 EXPECT_TRUE(provider.GetURLAndTitle(&out_gurl, &out_str)); 94 EXPECT_TRUE(provider.GetURLAndTitle(&out_gurl, &out_str));
95 EXPECT_EQ(base::string16(), out_str); 95 EXPECT_EQ(base::string16(), out_str);
96 EXPECT_EQ(kGoogleURL, out_gurl.spec()); 96 EXPECT_EQ(kGoogleURL, out_gurl.spec());
97 } 97 }
98 98
99 TEST_F(OSExchangeDataProviderAuraX11Test, OnlyStringURLIsUnfiltered) {
100 const base::string16 file_url = base::UTF8ToUTF16(kFileURL);
101 provider.SetString(file_url);
102
103 EXPECT_TRUE(provider.HasString());
104 EXPECT_FALSE(provider.HasURL());
105 }
106
107 TEST_F(OSExchangeDataProviderAuraX11Test, StringAndURIListFilterString) {
108 const base::string16 file_url = base::UTF8ToUTF16(kFileURL);
109 provider.SetString(file_url);
110 AddURLList(kFileURL);
111
112 EXPECT_FALSE(provider.HasString());
113 base::string16 out_str;
114 EXPECT_FALSE(provider.GetString(&out_str));
115
116 EXPECT_TRUE(provider.HasFile());
117 }
118
99 } // namespace ui 119 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_aurax11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698