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

Unified Diff: ui/aura/window_event_dispatcher_unittest.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/aura/window.cc ('k') | ui/aura/window_targeter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_event_dispatcher_unittest.cc
diff --git a/ui/aura/window_event_dispatcher_unittest.cc b/ui/aura/window_event_dispatcher_unittest.cc
index f9e80f405778b9900e35581933d31b1ad8d77b67..21a3170263423999e46689ae1480db321b542fda 100644
--- a/ui/aura/window_event_dispatcher_unittest.cc
+++ b/ui/aura/window_event_dispatcher_unittest.cc
@@ -4,6 +4,7 @@
#include "ui/aura/window_event_dispatcher.h"
+#include <utility>
#include <vector>
#include "base/bind.h"
@@ -2226,7 +2227,7 @@ class SelfDestructDelegate : public test::TestWindowDelegate {
void OnMouseEvent(ui::MouseEvent* event) override { window_.reset(); }
void set_window(scoped_ptr<aura::Window> window) {
- window_ = window.Pass();
+ window_ = std::move(window);
}
bool has_window() const { return !!window_.get(); }
@@ -2257,7 +2258,7 @@ TEST_F(WindowEventDispatcherTest, SynthesizedLocatedEvent) {
SelfDestructDelegate delegate;
scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate(
&delegate, 1, gfx::Rect(50, 50, 100, 100), root_window()));
- delegate.set_window(window.Pass());
+ delegate.set_window(std::move(window));
EXPECT_TRUE(delegate.has_window());
generator.MoveMouseTo(100, 100);
@@ -2276,7 +2277,7 @@ TEST_F(WindowEventDispatcherTest, DestroyWindowOnCaptureChanged) {
Window* window_first_raw = window_first.get();
window_first->Show();
window_first->SetCapture();
- delegate.set_window(window_first.Pass());
+ delegate.set_window(std::move(window_first));
EXPECT_TRUE(delegate.has_window());
scoped_ptr<aura::Window> window_second(
« no previous file with comments | « ui/aura/window.cc ('k') | ui/aura/window_targeter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698