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

Unified Diff: components/browser_watcher/exit_code_watcher_win_unittest.cc

Issue 1752233002: Convert Pass()→std::move() on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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/browser_watcher/exit_code_watcher_win_unittest.cc
diff --git a/components/browser_watcher/exit_code_watcher_win_unittest.cc b/components/browser_watcher/exit_code_watcher_win_unittest.cc
index 0a8e170cdc7097b96ba84f8ee39495f869d301da..4c2c1d9dfbc78fe1526256333566095e7bff37d3 100644
--- a/components/browser_watcher/exit_code_watcher_win_unittest.cc
+++ b/components/browser_watcher/exit_code_watcher_win_unittest.cc
@@ -6,6 +6,8 @@
#include <stdint.h>
+#include <utility>
+
#include "base/command_line.h"
#include "base/process/process.h"
#include "base/strings/string16.h"
@@ -123,7 +125,7 @@ TEST_F(ExitCodeWatcherTest, ExitCodeWatcherInvalidHandleFailsInit) {
base::Process event(::CreateEvent(NULL, false, false, NULL));
// A non-process handle should fail.
- EXPECT_FALSE(watcher.Initialize(event.Pass()));
+ EXPECT_FALSE(watcher.Initialize(std::move(event)));
}
TEST_F(ExitCodeWatcherTest, ExitCodeWatcherNoAccessHandleFailsInit) {
@@ -134,7 +136,7 @@ TEST_F(ExitCodeWatcherTest, ExitCodeWatcherNoAccessHandleFailsInit) {
ASSERT_TRUE(self.IsValid());
// A process handle with insufficient access should fail.
- EXPECT_FALSE(watcher.Initialize(self.Pass()));
+ EXPECT_FALSE(watcher.Initialize(std::move(self)));
}
TEST_F(ExitCodeWatcherTest, ExitCodeWatcherSucceedsInit) {
@@ -146,7 +148,7 @@ TEST_F(ExitCodeWatcherTest, ExitCodeWatcherSucceedsInit) {
ASSERT_TRUE(self.IsValid());
// A process handle with sufficient access should succeed init.
- EXPECT_TRUE(watcher.Initialize(self.Pass()));
+ EXPECT_TRUE(watcher.Initialize(std::move(self)));
}
TEST_F(ExitCodeWatcherTest, ExitCodeWatcherOnExitedProcess) {
« no previous file with comments | « components/browser_watcher/exit_code_watcher_win.cc ('k') | components/browser_watcher/window_hang_monitor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698