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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_unittest.cc ('k') | ui/base/idle/idle_query_x11.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h"
6
7 #include <memory>
8
5 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
6 #include "base/memory/scoped_ptr.h"
7 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
8 #include "base/win/scoped_hglobal.h" 11 #include "base/win/scoped_hglobal.h"
9 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/base/clipboard/clipboard.h" 13 #include "ui/base/clipboard/clipboard.h"
11 #include "ui/base/dragdrop/os_exchange_data.h"
12 #include "ui/base/dragdrop/os_exchange_data_provider_win.h" 14 #include "ui/base/dragdrop/os_exchange_data_provider_win.h"
13 #include "url/gurl.h" 15 #include "url/gurl.h"
14 16
15 namespace ui { 17 namespace ui {
16 18
17 // Test getting using the IDataObject COM API 19 // Test getting using the IDataObject COM API
18 TEST(OSExchangeDataWinTest, StringDataAccessViaCOM) { 20 TEST(OSExchangeDataWinTest, StringDataAccessViaCOM) {
19 OSExchangeData data; 21 OSExchangeData data;
20 std::wstring input = L"O hai googlz."; 22 std::wstring input = L"O hai googlz.";
21 data.SetString(input); 23 data.SetString(input);
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 OSExchangeData data2(data.provider().Clone()); 344 OSExchangeData data2(data.provider().Clone());
343 ASSERT_TRUE(data2.HasURL(OSExchangeData::CONVERT_FILENAMES)); 345 ASSERT_TRUE(data2.HasURL(OSExchangeData::CONVERT_FILENAMES));
344 GURL read_url; 346 GURL read_url;
345 std::wstring title; 347 std::wstring title;
346 EXPECT_TRUE(data2.GetURLAndTitle( 348 EXPECT_TRUE(data2.GetURLAndTitle(
347 OSExchangeData::CONVERT_FILENAMES, &read_url, &title)); 349 OSExchangeData::CONVERT_FILENAMES, &read_url, &title));
348 EXPECT_EQ(GURL("http://google.com"), read_url); 350 EXPECT_EQ(GURL("http://google.com"), read_url);
349 } 351 }
350 352
351 } // namespace ui 353 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_unittest.cc ('k') | ui/base/idle/idle_query_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698