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

Side by Side Diff: ui/views/controls/textfield/textfield_model_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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/views/controls/textfield/textfield_model.h"
6
5 #include <stddef.h> 7 #include <stddef.h>
6 8
9 #include <memory>
7 #include <vector> 10 #include <vector>
8 11
9 #include "base/auto_reset.h" 12 #include "base/auto_reset.h"
10 #include "base/macros.h" 13 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
13 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
14 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
15 #include "build/build_config.h" 17 #include "build/build_config.h"
16 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
17 #include "ui/base/clipboard/clipboard.h" 19 #include "ui/base/clipboard/clipboard.h"
18 #include "ui/base/clipboard/scoped_clipboard_writer.h" 20 #include "ui/base/clipboard/scoped_clipboard_writer.h"
19 #include "ui/gfx/range/range.h" 21 #include "ui/gfx/range/range.h"
20 #include "ui/gfx/render_text.h" 22 #include "ui/gfx/render_text.h"
21 #include "ui/views/controls/textfield/textfield.h" 23 #include "ui/views/controls/textfield/textfield.h"
22 #include "ui/views/controls/textfield/textfield_model.h"
23 #include "ui/views/test/test_views_delegate.h" 24 #include "ui/views/test/test_views_delegate.h"
24 #include "ui/views/test/views_test_base.h" 25 #include "ui/views/test/views_test_base.h"
25 26
26 #if defined(OS_WIN) 27 #if defined(OS_WIN)
27 #include "base/win/windows_version.h" 28 #include "base/win/windows_version.h"
28 #endif 29 #endif
29 30
30 #define EXPECT_STR_EQ(ascii, utf16) EXPECT_EQ(base::ASCIIToUTF16(ascii), utf16) 31 #define EXPECT_STR_EQ(ascii, utf16) EXPECT_EQ(base::ASCIIToUTF16(ascii), utf16)
31 32
32 namespace { 33 namespace {
(...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 // Test 7 1583 // Test 7
1583 // Clipboard text with lots of spaces between words should have all spaces 1584 // Clipboard text with lots of spaces between words should have all spaces
1584 // replaced with a single space. 1585 // replaced with a single space.
1585 ui::ScopedClipboardWriter(ui::CLIPBOARD_TYPE_COPY_PASTE) 1586 ui::ScopedClipboardWriter(ui::CLIPBOARD_TYPE_COPY_PASTE)
1586 .WriteText(base::ASCIIToUTF16("FOO BAR")); 1587 .WriteText(base::ASCIIToUTF16("FOO BAR"));
1587 EXPECT_TRUE(model.Paste()); 1588 EXPECT_TRUE(model.Paste());
1588 EXPECT_STR_EQ("FOO BAR", model.text()); 1589 EXPECT_STR_EQ("FOO BAR", model.text());
1589 } 1590 }
1590 1591
1591 } // namespace views 1592 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/textfield_model.h ('k') | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698