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

Unified Diff: chrome/test/chromedriver/session_unittest.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (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
Index: chrome/test/chromedriver/session_unittest.cc
diff --git a/chrome/test/chromedriver/session_unittest.cc b/chrome/test/chromedriver/session_unittest.cc
index 83230612a46cce4c48be054188820cd1e6ab2569..bc7d13641df9dcc538d002b654008ae1b240a77d 100644
--- a/chrome/test/chromedriver/session_unittest.cc
+++ b/chrome/test/chromedriver/session_unittest.cc
@@ -2,13 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/test/chromedriver/session.h"
+
#include <string>
+#include <utility>
#include "base/memory/scoped_ptr.h"
#include "chrome/test/chromedriver/chrome/status.h"
#include "chrome/test/chromedriver/chrome/stub_chrome.h"
#include "chrome/test/chromedriver/chrome/stub_web_view.h"
-#include "chrome/test/chromedriver/session.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -40,7 +42,7 @@ TEST(Session, GetTargetWindowNoChrome) {
TEST(Session, GetTargetWindowTargetWindowClosed) {
scoped_ptr<Chrome> chrome(new MockChrome());
- Session session("1", chrome.Pass());
+ Session session("1", std::move(chrome));
session.window = "2";
WebView* web_view;
ASSERT_EQ(kNoSuchWindow, session.GetTargetWindow(&web_view).code());
@@ -48,7 +50,7 @@ TEST(Session, GetTargetWindowTargetWindowClosed) {
TEST(Session, GetTargetWindowTargetWindowStillOpen) {
scoped_ptr<Chrome> chrome(new MockChrome());
- Session session("1", chrome.Pass());
+ Session session("1", std::move(chrome));
session.window = "1";
WebView* web_view = NULL;
ASSERT_EQ(kOk, session.GetTargetWindow(&web_view).code());
@@ -57,7 +59,7 @@ TEST(Session, GetTargetWindowTargetWindowStillOpen) {
TEST(Session, SwitchToParentFrame) {
scoped_ptr<Chrome> chrome(new MockChrome());
- Session session("1", chrome.Pass());
+ Session session("1", std::move(chrome));
// Initial frame should be top frame.
ASSERT_EQ(std::string(), session.GetCurrentFrameId());
@@ -83,7 +85,7 @@ TEST(Session, SwitchToParentFrame) {
TEST(Session, SwitchToTopFrame) {
scoped_ptr<Chrome> chrome(new MockChrome());
- Session session("1", chrome.Pass());
+ Session session("1", std::move(chrome));
// Initial frame should be top frame.
ASSERT_EQ(std::string(), session.GetCurrentFrameId());

Powered by Google App Engine
This is Rietveld 408576698