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

Side by Side Diff: app/os_exchange_data_unittest.cc

Issue 113169: Move win_util.h from common to app. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | « app/os_exchange_data.cc ('k') | app/win_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <atlbase.h> 5 #include <atlbase.h>
6 #include <shlobj.h> 6 #include <shlobj.h>
7 7
8 #include "app/os_exchange_data.h" 8 #include "app/os_exchange_data.h"
9 #include "base/clipboard_util.h" 9 #include "base/clipboard_util.h"
10 #include "base/pickle.h" 10 #include "base/pickle.h"
11 #include "base/ref_counted.h" 11 #include "base/ref_counted.h"
12 #include "base/scoped_handle.h" 12 #include "base/scoped_handle.h"
13 #include "base/scoped_ptr.h"
13 #include "base/string_util.h" 14 #include "base/string_util.h"
14 #include "chrome/common/win_util.h"
15 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 typedef testing::Test OSExchangeDataTest; 18 typedef testing::Test OSExchangeDataTest;
19 19
20 // Test setting/getting using the OSExchangeData API 20 // Test setting/getting using the OSExchangeData API
21 TEST(OSExchangeDataTest, StringDataGetAndSet) { 21 TEST(OSExchangeDataTest, StringDataGetAndSet) {
22 OSExchangeData* data = new OSExchangeData; 22 OSExchangeData* data = new OSExchangeData;
23 std::wstring input = L"I can has cheezburger?"; 23 std::wstring input = L"I can has cheezburger?";
24 data->SetString(input); 24 data->SetString(input);
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 scoped_refptr<OSExchangeData> data(new OSExchangeData); 356 scoped_refptr<OSExchangeData> data(new OSExchangeData);
357 data->SetString(L"http://google.com"); 357 data->SetString(L"http://google.com");
358 358
359 scoped_ptr<OSExchangeData> data2(new OSExchangeData(data.get())); 359 scoped_ptr<OSExchangeData> data2(new OSExchangeData(data.get()));
360 ASSERT_TRUE(data2->HasURL()); 360 ASSERT_TRUE(data2->HasURL());
361 GURL read_url; 361 GURL read_url;
362 std::wstring title; 362 std::wstring title;
363 EXPECT_TRUE(data2->GetURLAndTitle(&read_url, &title)); 363 EXPECT_TRUE(data2->GetURLAndTitle(&read_url, &title));
364 EXPECT_EQ(GURL("http://google.com"), read_url); 364 EXPECT_EQ(GURL("http://google.com"), read_url);
365 } 365 }
OLDNEW
« no previous file with comments | « app/os_exchange_data.cc ('k') | app/win_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698