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

Unified Diff: components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc

Issue 1906623003: Convert //components/mus from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
diff --git a/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc b/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
index 05adc19682dd0d639941d3e176e49f2fd1cab73d..107e3a2bfbf82826a495c57a9224a564a7317307 100644
--- a/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
+++ b/components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc
@@ -142,10 +142,11 @@ class TestInputEventHandler : public InputEventHandler {
private:
// InputEventHandler:
- void OnWindowInputEvent(Window* target,
- const ui::Event& event,
- scoped_ptr<base::Callback<void(mojom::EventResult)>>*
- ack_callback) override {
+ void OnWindowInputEvent(
+ Window* target,
+ const ui::Event& event,
+ std::unique_ptr<base::Callback<void(mojom::EventResult)>>* ack_callback)
+ override {
EXPECT_FALSE(received_event_)
<< "Observer was not reset after receiving event.";
received_event_ = true;
@@ -460,7 +461,7 @@ TEST_F(WindowTreeClientImplTest, InputEventBasic) {
TestInputEventHandler event_handler;
root->set_input_event_handler(&event_handler);
- scoped_ptr<ui::Event> ui_event(
+ std::unique_ptr<ui::Event> ui_event(
new ui::MouseEvent(ui::ET_MOUSE_MOVED, gfx::Point(), gfx::Point(),
ui::EventTimeForNow(), ui::EF_NONE, 0));
setup.window_tree_client()->OnWindowInputEvent(
@@ -769,7 +770,7 @@ TEST_F(WindowTreeClientImplTest, NewTopLevelWindowGetsAllChangesInFlight) {
// Tests that if the client has multiple unowned windows, and one of them is a
// transient child to another, the teardown can happen cleanly.
TEST_F(WindowTreeClientImplTest, MultipleUnOwnedWindowsDuringDestruction) {
- scoped_ptr<WindowTreeSetup> setup(new WindowTreeSetup());
+ std::unique_ptr<WindowTreeSetup> setup(new WindowTreeSetup());
Window* root1 = setup->GetFirstRoot();
ASSERT_TRUE(root1);
Window* root2 = setup->window_tree_connection()->NewTopLevelWindow(nullptr);
« no previous file with comments | « components/mus/public/cpp/tests/window_server_test_base.cc ('k') | components/mus/public/cpp/tests/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698