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

Unified Diff: ui/base/ime/chromeos/character_composer_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/ime/candidate_window_unittest.cc ('k') | ui/base/ime/chromeos/component_extension_ime_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/chromeos/character_composer_unittest.cc
diff --git a/ui/base/ime/chromeos/character_composer_unittest.cc b/ui/base/ime/chromeos/character_composer_unittest.cc
index 0d7a86d33f1c90f7146d27a30aebf3a76f9f0e6e..50bd466436cf417dcca7c627bd21741c30e802ee 100644
--- a/ui/base/ime/chromeos/character_composer_unittest.cc
+++ b/ui/base/ime/chromeos/character_composer_unittest.cc
@@ -6,8 +6,9 @@
#include <stdint.h>
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/event.h"
@@ -44,7 +45,7 @@ class CharacterComposerTest : public testing::Test {
// Expects key is filtered and no character is composed.
void ExpectDeadKeyFiltered(base::char16 combining_character) {
- scoped_ptr<KeyEvent> event(DeadKeyPress(combining_character));
+ std::unique_ptr<KeyEvent> event(DeadKeyPress(combining_character));
EXPECT_TRUE(character_composer_.FilterKeyPress(*event));
EXPECT_TRUE(character_composer_.composed_character().empty());
}
@@ -52,7 +53,7 @@ class CharacterComposerTest : public testing::Test {
// Expects key is filtered and the given character is composed.
void ExpectDeadKeyComposed(base::char16 combining_character,
const base::string16& expected_character) {
- scoped_ptr<KeyEvent> event(DeadKeyPress(combining_character));
+ std::unique_ptr<KeyEvent> event(DeadKeyPress(combining_character));
EXPECT_TRUE(character_composer_.FilterKeyPress(*event));
EXPECT_EQ(expected_character, character_composer_.composed_character());
}
@@ -73,7 +74,8 @@ class CharacterComposerTest : public testing::Test {
DomCode code,
int flags,
base::char16 character) {
- scoped_ptr<KeyEvent> event(UnicodeKeyPress(vkey, code, flags, character));
+ std::unique_ptr<KeyEvent> event(
+ UnicodeKeyPress(vkey, code, flags, character));
EXPECT_FALSE(character_composer_.FilterKeyPress(*event));
EXPECT_TRUE(character_composer_.composed_character().empty());
}
@@ -83,7 +85,8 @@ class CharacterComposerTest : public testing::Test {
DomCode code,
int flags,
base::char16 character) {
- scoped_ptr<KeyEvent> event(UnicodeKeyPress(vkey, code, flags, character));
+ std::unique_ptr<KeyEvent> event(
+ UnicodeKeyPress(vkey, code, flags, character));
EXPECT_TRUE(character_composer_.FilterKeyPress(*event));
EXPECT_TRUE(character_composer_.composed_character().empty());
}
@@ -94,7 +97,8 @@ class CharacterComposerTest : public testing::Test {
int flags,
base::char16 character,
const base::string16& expected_character) {
- scoped_ptr<KeyEvent> event(UnicodeKeyPress(vkey, code, flags, character));
+ std::unique_ptr<KeyEvent> event(
+ UnicodeKeyPress(vkey, code, flags, character));
EXPECT_TRUE(character_composer_.FilterKeyPress(*event));
EXPECT_EQ(expected_character, character_composer_.composed_character());
}
« no previous file with comments | « ui/base/ime/candidate_window_unittest.cc ('k') | ui/base/ime/chromeos/component_extension_ime_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698