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

Unified Diff: ui/views/animation/ink_drop_hover_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/views/animation/ink_drop_hover.h ('k') | ui/views/animation/scroll_animator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/ink_drop_hover_unittest.cc
diff --git a/ui/views/animation/ink_drop_hover_unittest.cc b/ui/views/animation/ink_drop_hover_unittest.cc
index 5657569ad2353668b818db36d427ed17f749c091..c53e0470694cc39395951fe7b52248d993323188 100644
--- a/ui/views/animation/ink_drop_hover_unittest.cc
+++ b/ui/views/animation/ink_drop_hover_unittest.cc
@@ -4,8 +4,10 @@
#include "ui/views/animation/ink_drop_hover.h"
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/gfx/geometry/size.h"
@@ -19,11 +21,11 @@ class InkDropHoverTest : public testing::Test {
~InkDropHoverTest() override;
protected:
- scoped_ptr<InkDropHover> CreateInkDropHover() const;
+ std::unique_ptr<InkDropHover> CreateInkDropHover() const;
private:
// Enables zero duration animations during the tests.
- scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
+ std::unique_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
DISALLOW_COPY_AND_ASSIGN(InkDropHoverTest);
};
@@ -35,18 +37,18 @@ InkDropHoverTest::InkDropHoverTest() {
InkDropHoverTest::~InkDropHoverTest() {}
-scoped_ptr<InkDropHover> InkDropHoverTest::CreateInkDropHover() const {
- return make_scoped_ptr(
+std::unique_ptr<InkDropHover> InkDropHoverTest::CreateInkDropHover() const {
+ return base::WrapUnique(
new InkDropHover(gfx::Size(10, 10), 3, gfx::Point(), SK_ColorBLACK));
}
TEST_F(InkDropHoverTest, InitialStateAfterConstruction) {
- scoped_ptr<InkDropHover> ink_drop_hover = CreateInkDropHover();
+ std::unique_ptr<InkDropHover> ink_drop_hover = CreateInkDropHover();
EXPECT_FALSE(ink_drop_hover->IsFadingInOrVisible());
}
TEST_F(InkDropHoverTest, IsHoveredStateTransitions) {
- scoped_ptr<InkDropHover> ink_drop_hover = CreateInkDropHover();
+ std::unique_ptr<InkDropHover> ink_drop_hover = CreateInkDropHover();
ink_drop_hover->FadeIn(base::TimeDelta::FromMilliseconds(0));
EXPECT_TRUE(ink_drop_hover->IsFadingInOrVisible());
« no previous file with comments | « ui/views/animation/ink_drop_hover.h ('k') | ui/views/animation/scroll_animator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698